ekf2: fix comments about primary height sources

Having the xxx_hgt flag set only means that the sensor is fused for
altitude/height aiding. It's not necessarily the height reference.
This commit is contained in:
bresch
2025-01-07 09:53:24 +01:00
committed by Mathieu Bresciani
parent 374e70c48f
commit b1773df441
5 changed files with 10 additions and 11 deletions
@@ -78,7 +78,7 @@ void Ekf::controlRangeHaglFusion(const imuSample &imu_sample)
}
} else {
// If we are supposed to be using range finder data as the primary height sensor, have bad range measurements
// If we are supposed to be using range finder data but have bad range measurements
// and are on the ground, then synthesise a measurement at the expected on ground value
if (!_control_status.flags.in_air
&& _range_sensor.isRegularlySendingData()
+3 -3
View File
@@ -573,10 +573,10 @@ union filter_control_status_u {
uint64_t mag_dec : 1; ///< 6 - true if synthetic magnetic declination measurements fusion is intended
uint64_t in_air : 1; ///< 7 - true when the vehicle is airborne
uint64_t wind : 1; ///< 8 - true when wind velocity is being estimated
uint64_t baro_hgt : 1; ///< 9 - true when baro height is being fused as a primary height reference
uint64_t baro_hgt : 1; ///< 9 - true when baro data is being fused
uint64_t rng_hgt :
1; ///< 10 - true when range finder height is being fused as a primary height reference
uint64_t gps_hgt : 1; ///< 11 - true when GPS height is being fused as a primary height reference
1; ///< 10 - true when range finder data is being fused for height aiding
uint64_t gps_hgt : 1; ///< 11 - true when GPS altitude is being fused
uint64_t ev_pos : 1; ///< 12 - true when local position data fusion from external vision is intended
uint64_t ev_yaw : 1; ///< 13 - true when yaw data from external vision measurements fusion is intended
uint64_t ev_hgt : 1; ///< 14 - true when height data from external vision measurements is being fused
-1
View File
@@ -345,7 +345,6 @@ void Ekf::get_ekf_ctrl_limits(float *vxy_max, float *vz_max, float *hagl_min, fl
// TODO : calculate visual odometry limits
const bool relying_on_rangefinder = isOnlyActiveSourceOfVerticalPositionAiding(_control_status.flags.rng_hgt);
// Keep within range sensor limit when using rangefinder as primary height source
if (relying_on_rangefinder) {
*hagl_min = rangefinder_hagl_min;
*hagl_max = rangefinder_hagl_max;