mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 19:03:33 +08:00
EKF: Consolidate range finder checking
This brings all the range finder data checks (excluding innovation consistency checks) into one place and eliminates the need to perform range checking external to the library. The hard coded optical flow tilt limit is changed to use the same value as the range finder. Variable names are changed to make a clear distinction between the max/min values calculated by the stuck range check and the max/min valid values for the sensor.
This commit is contained in:
committed by
Lorenz Meier
parent
e1661a92c3
commit
4d59c834eb
+2
-2
@@ -1060,9 +1060,9 @@ hagl_max : Maximum height above ground (meters). NaN when limiting is not needed
|
||||
void Ekf::get_ekf_ctrl_limits(float *vxy_max, float *vz_max, float *hagl_min, float *hagl_max)
|
||||
{
|
||||
// Calculate range finder limits
|
||||
float rangefinder_hagl_min = _rng_min_distance;
|
||||
float rangefinder_hagl_min = _rng_valid_min_val;
|
||||
// Allow use of 75% of rangefinder maximum range to allow for angular motion
|
||||
float rangefinder_hagl_max = 0.75f * _rng_max_distance;
|
||||
float rangefinder_hagl_max = 0.75f * _rng_valid_max_val;
|
||||
|
||||
// Calculate optical flow limits
|
||||
// Allow ground relative velocity to use 50% of available flow sensor range to allow for angular motion
|
||||
|
||||
Reference in New Issue
Block a user