FlightTask: add distance to bottom

This commit is contained in:
Dennis Mannhart
2018-04-18 11:17:53 +02:00
committed by Lorenz Meier
parent 1759e181dc
commit 73b4f452cc
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -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 {
+1
View File
@@ -126,6 +126,7 @@ protected:
matrix::Vector3f _thrust_setpoint;
float _yaw_setpoint;
float _yawspeed_setpoint;
float _dist_to_bottom;
/**
* Get the output data