terrain_estimator: introduce quality metric in rng

This commit introduces a quality measure in the range data. It is
used to properly decide whether to initialize the HAGL estimate on
 sensor data or MIN_HGT parameter, as well as in the decision of
whether a 'fake' measurement should be published on the ground to
allow for optical flow take-offs.
This commit is contained in:
Nico van Duijn
2019-09-12 17:45:37 +10:00
committed by Paul Riseborough
parent 3e05fd552e
commit a12186c285
5 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -1198,7 +1198,7 @@ void Ekf::checkRangeDataValidity()
return;
} else {
// reset fault status when we get new data
_rng_hgt_faulty = false;
_rng_hgt_faulty = (_range_sample_delayed.quality == 0);
}
// Check if excessively tilted
@@ -1244,7 +1244,7 @@ void Ekf::checkRangeDataValidity()
}
_control_status.flags.rng_stuck = true;
_rng_hgt_faulty = true;
_rng_hgt_faulty = (_range_sample_delayed.quality == 0);
}
} else {