Changeset 102 in flair-src for trunk/lib/FlairSensorActuator
- Timestamp:
- Oct 6, 2016, 11:21:23 AM (8 years ago)
- Location:
- trunk/lib/FlairSensorActuator/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/Gx3_25_imu.cpp
r101 r102 38 38 } else if (command == AccelerationAngularRateAndOrientationMatrix) { 39 39 //Thread::Err("oneaxis rotation of rotation matrix is not yet implemented\n"); 40 } else if (command == Quaternion) { 41 40 42 } else { 41 43 Thread::Err("command not supported (%i)\n", command); -
trunk/lib/FlairSensorActuator/src/Gx3_25_imu.h
r15 r102 44 44 AccelerationAngularRateAndOrientationMatrix = 45 45 0xc8, /*!< Acceleration, angular rate and orientation matrix */ 46 Quaternion = 0xdf, /*!< Quaternion */ 46 47 }; 47 48 -
trunk/lib/FlairSensorActuator/src/Gx3_25_imu_impl.cpp
r100 r102 113 113 } 114 114 115 // periode a passer an argument (reglable)115 // periode a passer en argument (reglable) 116 116 // ou plutot laisser la periode geree par le centrale (polling) 117 117 // self->SetPeriodMS(2); … … 168 168 filteredAngRates); 169 169 imuData->SetRawAcc(rawAcc); 170 } else if (command == Gx3_25_imu::Quaternion) { 171 uint8_t response[23] = {0}; 172 uint8_t *buf = &response[1]; 173 GetData(response, sizeof(response), &imuTime); 174 175 Quaternion quaternion; 176 quaternion.q0 = Dequeue(&buf); 177 quaternion.q1 = Dequeue(&buf); 178 quaternion.q2 = Dequeue(&buf); 179 quaternion.q3 = Dequeue(&buf); 180 181 Vector3D filteredAngRates; 182 filteredAngRates.x = 0; 183 filteredAngRates.y = 0; 184 filteredAngRates.z = 0; 185 186 ahrsData->SetQuaternionAndAngularRates(quaternion, 187 filteredAngRates); 170 188 } 171 189
Note:
See TracChangeset
for help on using the changeset viewer.