AP_NavEKF2: Get IMU accelerometer body position offset data

This commit is contained in:
priseborough 2016-10-12 08:30:01 +11:00 committed by Andrew Tridgell
parent 397033b7c3
commit 064a106808
2 changed files with 4 additions and 0 deletions

View File

@ -276,8 +276,10 @@ void NavEKF2_core::readIMUData()
// use the nominated imu or primary if not available
if (ins.use_accel(imu_index)) {
readDeltaVelocity(imu_index, imuDataNew.delVel, imuDataNew.delVelDT);
accelPosOffset = ins.get_imu_pos_offset(imu_index);
} else {
readDeltaVelocity(ins.get_primary_accel(), imuDataNew.delVel, imuDataNew.delVelDT);
accelPosOffset = ins.get_imu_pos_offset(ins.get_primary_accel());
}
// Get delta angle data from primary gyro or primary if not available

View File

@ -908,6 +908,8 @@ private:
bool gndOffsetValid; // true when the ground offset state can still be considered valid
Vector3f delAngBodyOF; // bias corrected delta angle of the vehicle IMU measured summed across the time since the last OF measurement
float delTimeOF; // time that delAngBodyOF is summed across
Vector3f accelPosOffset; // position of IMU accelerometer unit in body frame (m)
// Range finder
float baroHgtOffset; // offset applied when when switching to use of Baro height