mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 19:13:33 +08:00
EKF: Clean up terrain estimation functionality.
This is a functionally equivalent. It moves all of the code for the terrain estimator into a single function call from the main filter update, making it clear that it is independent of the main filter.
This commit is contained in:
@@ -744,12 +744,6 @@ void Ekf::controlRangeFinderFusion()
|
||||
Vector3f pos_offset_earth = _R_to_earth * pos_offset_body;
|
||||
_range_sample_delayed.rng += pos_offset_earth(2) / _R_rng_to_earth_2_2;
|
||||
|
||||
// always fuse available range finder data into a terrain height estimator if the estimator has been initialised
|
||||
if (_terrain_initialised) {
|
||||
fuseHagl();
|
||||
|
||||
}
|
||||
|
||||
// only use range finder as a height observation in the main filter if specifically enabled
|
||||
if (_control_status.flags.rng_hgt) {
|
||||
_fuse_height = true;
|
||||
|
||||
Reference in New Issue
Block a user