|
|
@ -184,9 +184,11 @@ void Ekf::controlFusionModes() |
|
|
|
_control_status.flags.rng_hgt = false; |
|
|
|
_control_status.flags.rng_hgt = false; |
|
|
|
// adjust the height offset so we can use the GPS
|
|
|
|
// adjust the height offset so we can use the GPS
|
|
|
|
_hgt_sensor_offset = _state.pos(2) + gps_init.hgt - _gps_alt_ref; |
|
|
|
_hgt_sensor_offset = _state.pos(2) + gps_init.hgt - _gps_alt_ref; |
|
|
|
|
|
|
|
if (!baro_hgt_available) { |
|
|
|
printf("EKF baro hgt timeout - switching to gps\n"); |
|
|
|
printf("EKF baro hgt timeout - switching to gps\n"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// handle the case we are using GPS for height
|
|
|
|
// handle the case we are using GPS for height
|
|
|
|
if (_control_status.flags.gps_hgt) { |
|
|
|
if (_control_status.flags.gps_hgt) { |
|
|
|