mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FlightTask: add distance to bottom
This commit is contained in:
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 {
|
||||
|
||||
@ -126,6 +126,7 @@ protected:
|
||||
matrix::Vector3f _thrust_setpoint;
|
||||
float _yaw_setpoint;
|
||||
float _yawspeed_setpoint;
|
||||
float _dist_to_bottom;
|
||||
|
||||
/**
|
||||
* Get the output data
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user