mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 17:20:35 +08:00
FlightTask: add distance to bottom
This commit is contained in:
committed by
Lorenz Meier
parent
1759e181dc
commit
73b4f452cc
@@ -59,6 +59,12 @@ bool FlightTask::_evaluateVehicleLocalPosition()
|
||||
_position = matrix::Vector3f(&_sub_vehicle_local_position->get().x);
|
||||
_velocity = matrix::Vector3f(&_sub_vehicle_local_position->get().vx);
|
||||
_yaw = _sub_vehicle_local_position->get().yaw;
|
||||
_dist_to_bottom = NAN;
|
||||
|
||||
if (_sub_vehicle_local_position->get().dist_bottom_valid) {
|
||||
_dist_to_bottom = _sub_vehicle_local_position->get().dist_bottom;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user