mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 01:00:35 +08:00
EKF: range_finder parameterize range sensor quality hysteresis time
Signed-off-by: Claudio Micheli <claudio@auterion.com> Co-authored-by: bresch <brescianimathieu@gmail.com>
This commit is contained in:
+3
-1
@@ -124,11 +124,13 @@ void Ekf::controlFusionModes()
|
||||
// Get range data from buffer and check validity
|
||||
const bool is_rng_data_ready = _range_buffer.pop_first_older_than(_imu_sample_delayed.time_us, _range_sensor.getSampleAddress());
|
||||
_range_sensor.setDataReadiness(is_rng_data_ready);
|
||||
_range_sensor.runChecks(_imu_sample_delayed.time_us, _R_to_earth);
|
||||
|
||||
// update range sensor angle parameters in case they have changed
|
||||
_range_sensor.setPitchOffset(_params.rng_sens_pitch);
|
||||
_range_sensor.setCosMaxTilt(_params.range_cos_max_tilt);
|
||||
_range_sensor.setQualityHysteresis(_params.range_valid_quality_s);
|
||||
|
||||
_range_sensor.runChecks(_imu_sample_delayed.time_us, _R_to_earth);
|
||||
}
|
||||
|
||||
if (_range_sensor.isDataHealthy()) {
|
||||
|
||||
Reference in New Issue
Block a user