mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 16:13:34 +08:00
SensorRangeFinder: add distBottom function to get the vertical distance
This commit is contained in:
committed by
Mathieu Bresciani
parent
a998da1781
commit
572ad2df0a
+1
-1
@@ -227,7 +227,7 @@ void Ekf::resetHeight()
|
||||
|
||||
// reset the vertical position
|
||||
if (_control_status.flags.rng_hgt) {
|
||||
const float new_pos_down = _hgt_sensor_offset - _range_sensor.getRange() * _range_sensor.getCosTilt();
|
||||
const float new_pos_down = _hgt_sensor_offset - _range_sensor.getDistBottom();
|
||||
|
||||
// update the state and associated variance
|
||||
_state.pos(2) = new_pos_down;
|
||||
|
||||
Reference in New Issue
Block a user