Changeset 173 in flair-src for trunk/lib/FlairSensorActuator/src/Imu.cpp
- Timestamp:
- Apr 26, 2017, 11:12:59 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/Imu.cpp
r167 r173 64 64 } 65 65 66 void Imu:: UpdateImu() {66 void Imu::ApplyRotation(Vector3Df& vector) { 67 67 if (rotation == NULL) { 68 68 Err("not applicable for simulation part.\n"); 69 69 return; 70 70 } 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 74 void Imu::ApplyRotation(Quaternion& quaternion) { 75 if (rotation == NULL) { 76 Err("not applicable for simulation part.\n"); 77 return; 78 } 79 rotation->ComputeRotation(quaternion); 77 80 } 78 81
Note:
See TracChangeset
for help on using the changeset viewer.