Plane: Support a different landing airspeed for fw quadplane landings
This commit is contained in:
parent
1a45755ffd
commit
05484c3987
@ -430,8 +430,6 @@ void Plane::do_landing_vtol_approach(const AP_Mission::Mission_Command& cmd)
|
||||
}
|
||||
|
||||
vtol_approach_s.approach_stage = LOITER_TO_ALT;
|
||||
|
||||
set_flight_stage(AP_Vehicle::FixedWing::FLIGHT_LAND);
|
||||
}
|
||||
|
||||
void Plane::loiter_set_direction_wp(const AP_Mission::Mission_Command& cmd)
|
||||
|
@ -139,7 +139,17 @@ void Plane::calc_airspeed_errors()
|
||||
} else if (flight_stage == AP_Vehicle::FixedWing::FLIGHT_LAND) {
|
||||
// Landing airspeed target
|
||||
target_airspeed_cm = landing.get_target_airspeed_cm();
|
||||
|
||||
} else if ((control_mode == AUTO) &&
|
||||
(quadplane.options & QuadPlane::OPTION_MISSION_LAND_FW_APPROACH) &&
|
||||
((vtol_approach_s.approach_stage == Landing_ApproachStage::APPROACH_LINE) ||
|
||||
(vtol_approach_s.approach_stage == Landing_ApproachStage::VTOL_LANDING))) {
|
||||
float land_airspeed = SpdHgt_Controller->get_land_airspeed();
|
||||
if (is_positive(land_airspeed)) {
|
||||
target_airspeed_cm = SpdHgt_Controller->get_land_airspeed() * 100;
|
||||
} else {
|
||||
// fallover to normal airspeed
|
||||
target_airspeed_cm = aparm.airspeed_cruise_cm;
|
||||
}
|
||||
} else {
|
||||
// Normal airspeed target
|
||||
target_airspeed_cm = aparm.airspeed_cruise_cm;
|
||||
|
Loading…
Reference in New Issue
Block a user