mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 00:33:33 +08:00
mc_pos_control/FlightTask: apply nit-pick review findings
This commit is contained in:
@@ -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 */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user