mc_pos_control/FlightTask: apply nit-pick review findings

This commit is contained in:
Matthias Grob
2019-12-11 14:03:16 +01:00
parent 82b4e766a5
commit a3d30fc970
3 changed files with 8 additions and 6 deletions
@@ -164,7 +164,7 @@ void FlightTask::_evaluateVehicleLocalPosition()
void FlightTask::_evaluateDistanceToGround()
{
// Altitude above ground is by default just the negation of the current local position in D-direction.
// Altitude above ground is local z-position or altitude above home or distance sensor altitude depending on what's available
_dist_to_ground = -_position(2);
if (PX4_ISFINITE(_dist_to_bottom)) {
@@ -211,7 +211,7 @@ protected:
matrix::Vector3f _position; /**< current vehicle position */
matrix::Vector3f _velocity; /**< current vehicle velocity */
float _yaw = 0.f; /**< current vehicle yaw heading */
float _dist_to_bottom = 0.0f; /**< current height above ground level */
float _dist_to_bottom = 0.f; /**< current height above ground level */
float _dist_to_ground = 0.f; /**< equals _dist_to_bottom if valid, height above home otherwise */
/**