mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 05:43:34 +08:00
fw pos ctrl: use max function for landing approach entrance rel alt
This commit is contained in:
committed by
Daniel Agar
parent
217efcb12d
commit
9fab914687
@@ -2534,11 +2534,7 @@ FixedwingPositionControl::initializeAutoLanding(const hrt_abstime &now, const po
|
|||||||
local_approach_entrance = local_position;
|
local_approach_entrance = local_position;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (height_above_land_point < FLT_EPSILON) {
|
_landing_approach_entrance_rel_alt = math::max(height_above_land_point, FLT_EPSILON);
|
||||||
height_above_land_point = FLT_EPSILON;
|
|
||||||
}
|
|
||||||
|
|
||||||
_landing_approach_entrance_rel_alt = height_above_land_point;
|
|
||||||
|
|
||||||
const Vector2f landing_approach_vector = local_land_point - local_approach_entrance;
|
const Vector2f landing_approach_vector = local_land_point - local_approach_entrance;
|
||||||
float landing_approach_distance = landing_approach_vector.norm();
|
float landing_approach_distance = landing_approach_vector.norm();
|
||||||
|
|||||||
Reference in New Issue
Block a user