Changeset 173 in flair-src for trunk/lib/FlairSensorActuator/src/Imu.cpp


Ignore:
Timestamp:
Apr 26, 2017, 11:12:59 AM (7 years ago)
Author:
Sanahuja Guillaume
Message:

modif imu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/Imu.cpp

    r167 r173  
    6464}
    6565
    66 void Imu::UpdateImu() {
     66void Imu::ApplyRotation(Vector3Df& vector) {
    6767  if (rotation == NULL) {
    6868    Err("not applicable for simulation part.\n");
    6969    return;
    7070  }
    71   Vector3Df rawAcc, rawMag, rawGyr;
    72   imuData->GetRawAccMagAndGyr(rawAcc, rawMag, rawGyr);
    73   rotation->ComputeRotation(rawAcc);
    74   rotation->ComputeRotation(rawGyr);
    75   rotation->ComputeRotation(rawMag);
    76   imuData->SetRawAccMagAndGyr(rawAcc, rawMag, rawGyr);
     71  rotation->ComputeRotation(vector);
     72}
     73
     74void Imu::ApplyRotation(Quaternion& quaternion) {
     75  if (rotation == NULL) {
     76    Err("not applicable for simulation part.\n");
     77    return;
     78  }
     79  rotation->ComputeRotation(quaternion);
    7780}
    7881
Note: See TracChangeset for help on using the changeset viewer.