diff --git a/src/modules/ekf2/EKF/control.cpp b/src/modules/ekf2/EKF/control.cpp index f36872f28c..e8ebe931fc 100644 --- a/src/modules/ekf2/EKF/control.cpp +++ b/src/modules/ekf2/EKF/control.cpp @@ -828,7 +828,7 @@ void Ekf::checkVerticalAccelerationHealth() void Ekf::controlHeightFusion() { checkRangeAidSuitability(); - const bool do_range_aid = (_params.range_aid == 1) && isRangeAidSuitable(); + const bool do_range_aid = (_params.range_aid == 1) && _is_range_aid_suitable; switch (_params.vdist_sensor_type) { default: diff --git a/src/modules/ekf2/EKF/ekf.h b/src/modules/ekf2/EKF/ekf.h index fcbcdef301..07e308a4e9 100644 --- a/src/modules/ekf2/EKF/ekf.h +++ b/src/modules/ekf2/EKF/ekf.h @@ -899,7 +899,6 @@ private: // determine if flight condition is suitable to use range finder instead of the primary height sensor void checkRangeAidSuitability(); - bool isRangeAidSuitable() const { return _is_range_aid_suitable; } // set control flags to use baro height void setControlBaroHeight();