EKF: Enable use of range finder for primary height source

This commit is contained in:
Paul Riseborough
2016-03-13 18:44:34 +11:00
parent 699ec17cc3
commit 370f643f42
4 changed files with 41 additions and 11 deletions
+12
View File
@@ -247,10 +247,22 @@ void Ekf::controlFusionModes()
}
// Control the soure of height measurements for the main filter
if (_params.vdist_sensor_type == VDIST_SENSOR_BARO) {
_control_status.flags.baro_hgt = true;
_control_status.flags.rng_hgt = false;
_control_status.flags.gps_hgt = false;
} else if (_params.vdist_sensor_type == VDIST_SENSOR_RANGE) {
_control_status.flags.baro_hgt = false;
_control_status.flags.rng_hgt = true;
_control_status.flags.gps_hgt = false;
} else {
// TODO functionality to fuse GPS height
_control_status.flags.baro_hgt = false;
_control_status.flags.rng_hgt = false;
_control_status.flags.gps_hgt = false;
}
// Placeholder for control of wind velocity states estimation
// TODO add methods for true airspeed and/or sidelsip fusion or some type of drag force measurement