mirror of https://github.com/ArduPilot/ardupilot
AP_NavEKF3: ignore VelZ of body odometry if SRCn_VELZ is set to None
This commit is contained in:
parent
4df758f52a
commit
1f11c6add6
|
@ -2031,7 +2031,10 @@ void NavEKF3_core::SelectBodyOdomFusion()
|
|||
// Check for body odometry data (aka visual position delta) at the fusion time horizon
|
||||
const bool bodyOdomDataToFuse = storedBodyOdm.recall(bodyOdmDataDelayed, imuDataDelayed.time_ms);
|
||||
if (bodyOdomDataToFuse && frontend->sources.useVelXYSource(AP_NavEKF_Source::SourceXY::EXTNAV)) {
|
||||
|
||||
// If VelZ source is set to none, don't use the odometry data for Z velocity
|
||||
if (!frontend->sources.haveVelZSource()) {
|
||||
bodyOdmDataDelayed.vel.z = stateStruct.velocity.z;
|
||||
}
|
||||
// Fuse data into the main filter
|
||||
FuseBodyVel();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue