forked from Archive/PX4-Autopilot
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:
parent
953cff7ba0
commit
334aa57a5f
|
@ -345,6 +345,8 @@ private:
|
|||
(ParamFloat<px4::params::NAV_ACC_RAD>) _param_acceptance_radius, /**< acceptance for takeoff */
|
||||
(ParamFloat<px4::params::NAV_FW_ALT_RAD>)
|
||||
_param_fw_alt_acceptance_radius, /**< acceptance radius for fixedwing altitude */
|
||||
(ParamFloat<px4::params::NAV_FW_ALTL_RAD>)
|
||||
_param_fw_alt_lnd_acceptance_radius, /**< acceptance radius for fixedwing altitude before landing*/
|
||||
(ParamFloat<px4::params::NAV_MC_ALT_RAD>)
|
||||
_param_mc_alt_acceptance_radius, /**< acceptance radius for multicopter altitude */
|
||||
(ParamInt<px4::params::NAV_FORCE_VT>) _param_force_vtol, /**< acceptance radius for multicopter altitude */
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,6 +83,20 @@ PARAM_DEFINE_FLOAT(NAV_ACC_RAD, 10.0f);
|
|||
*/
|
||||
PARAM_DEFINE_FLOAT(NAV_FW_ALT_RAD, 10.0f);
|
||||
|
||||
/**
|
||||
* FW Altitude Acceptance Radius before a landing
|
||||
*
|
||||
* Altitude acceptance used for the last waypoint before a fixed-wing landing. This is usually smaller
|
||||
* than the standard vertical acceptance because close to the ground higher accuracy is required.
|
||||
*
|
||||
* @unit m
|
||||
* @min 0.05
|
||||
* @max 200.0
|
||||
* @decimal 1
|
||||
* @group Mission
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(NAV_FW_ALTL_RAD, 5.0f);
|
||||
|
||||
/**
|
||||
* MC Altitude Acceptance Radius
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue