mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
Fixed-wing autoland: Remove the dynamic altitude acceptance calculation and just use a simple separate landing altitude acceptance radius instead. This gives users that do not use LOITER-TO-ALT waypoints more control over their landing procedure
This commit is contained in:
committed by
Daniel Agar
parent
953cff7ba0
commit
334aa57a5f
@@ -868,15 +868,11 @@ float
|
||||
Navigator::get_altitude_acceptance_radius()
|
||||
{
|
||||
if (!get_vstatus()->is_rotary_wing) {
|
||||
// The fixed-wing altitude acceptance radius default is the respective parameter. However, before a landing
|
||||
// approach it needs to be tighter: Assume a 30% error w.r.t. the remaining descent altitude is OK, but enforce
|
||||
// min/max values (e.g. min=3m to make sure that the waypoint can still be reached in case of wrong user input).
|
||||
|
||||
const position_setpoint_s &next_sp = get_position_setpoint_triplet()->next;
|
||||
const position_setpoint_s &curr_sp = get_position_setpoint_triplet()->current;
|
||||
|
||||
if (next_sp.type == position_setpoint_s::SETPOINT_TYPE_LAND && next_sp.valid) {
|
||||
return math::constrain(0.3f * (curr_sp.alt - next_sp.alt), 3.0f, _param_fw_alt_acceptance_radius.get());
|
||||
// Use separate (tighter) altitude acceptance for clean altitude starting point before landing
|
||||
return _param_fw_alt_lnd_acceptance_radius.get();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user