mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 07:00:34 +08:00
ekf2 - preflt checks: scale flow innovation checks
Opt flow raw innovations can be really large on ground due to the small distance to the ground (vel = flow / dist). To make the pre-flight check more meaningful, scale it with the current distance.
This commit is contained in:
@@ -1296,6 +1296,10 @@ void EKF2::PublishInnovations(const hrt_abstime ×tamp)
|
||||
_preflt_checker.setUsingGpsAiding(_ekf.control_status_flags().gps);
|
||||
#if defined(CONFIG_EKF2_OPTICAL_FLOW)
|
||||
_preflt_checker.setUsingFlowAiding(_ekf.control_status_flags().opt_flow);
|
||||
|
||||
// set dist bottom to scale flow innovation
|
||||
const float dist_bottom = _ekf.getTerrainVertPos() - _ekf.getPosition()(2);
|
||||
_preflt_checker.setDistBottom(dist_bottom);
|
||||
#endif // CONFIG_EKF2_OPTICAL_FLOW
|
||||
|
||||
#if defined(CONFIG_EKF2_EXTERNAL_VISION)
|
||||
|
||||
Reference in New Issue
Block a user