mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_NavEKF2: Don't correct range finder for zero position offset
This commit is contained in:
parent
9a0ce1d5eb
commit
f025c96e63
@ -655,8 +655,10 @@ void NavEKF2_core::selectHeightForFusion()
|
||||
// co-located with the IMU
|
||||
if (rangeDataToFuse) {
|
||||
Vector3f posOffsetBody = rangeDataDelayed.body_offset - accelPosOffset;
|
||||
Vector3f posOffsetEarth = prevTnb.mul_transpose(posOffsetBody);
|
||||
rangeDataDelayed.rng += posOffsetEarth.z / prevTnb.c.z;
|
||||
if (!posOffsetBody.is_zero()) {
|
||||
Vector3f posOffsetEarth = prevTnb.mul_transpose(posOffsetBody);
|
||||
rangeDataDelayed.rng += posOffsetEarth.z / prevTnb.c.z;
|
||||
}
|
||||
}
|
||||
|
||||
// read baro height data from the sensor and check for new data in the buffer
|
||||
|
Loading…
Reference in New Issue
Block a user