mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 12:51:36 +08:00
vehicle constraints: remove landing gear
- landing_gear: refactor state name - Add the keep state to the landing gear message - Adapt FlightTaskManual, FlightTaskAutoMapper, mc_pos_control, to review message definition
This commit is contained in:
committed by
Dennis Mannhart
parent
6dbed6636d
commit
de185726b3
@@ -89,7 +89,7 @@ bool FlightTaskAutoMapper::update()
|
||||
// during mission and reposition, raise the landing gears but only
|
||||
// if altitude is high enough
|
||||
if (_highEnoughForLandingGear()) {
|
||||
_constraints.landing_gear = vehicle_constraints_s::GEAR_UP;
|
||||
_gear.landing_gear = landing_gear_s::GEAR_UP;
|
||||
}
|
||||
|
||||
// update previous type
|
||||
@@ -121,7 +121,7 @@ void FlightTaskAutoMapper::_generateLandSetpoints()
|
||||
// set constraints
|
||||
_constraints.tilt = MPC_TILTMAX_LND.get();
|
||||
_constraints.speed_down = MPC_LAND_SPEED.get();
|
||||
_constraints.landing_gear = vehicle_constraints_s::GEAR_DOWN;
|
||||
_gear.landing_gear = landing_gear_s::GEAR_DOWN;
|
||||
}
|
||||
|
||||
void FlightTaskAutoMapper::_generateTakeoffSetpoints()
|
||||
@@ -134,7 +134,7 @@ void FlightTaskAutoMapper::_generateTakeoffSetpoints()
|
||||
_constraints.speed_up = math::gradual(_alt_above_ground, MPC_LAND_ALT2.get(),
|
||||
MPC_LAND_ALT1.get(), MPC_TKO_SPEED.get(), _constraints.speed_up);
|
||||
|
||||
_constraints.landing_gear = vehicle_constraints_s::GEAR_DOWN;
|
||||
_gear.landing_gear = landing_gear_s::GEAR_DOWN;
|
||||
}
|
||||
|
||||
void FlightTaskAutoMapper::_generateVelocitySetpoints()
|
||||
@@ -173,4 +173,4 @@ bool FlightTaskAutoMapper::_highEnoughForLandingGear()
|
||||
{
|
||||
// return true if altitude is above two meters
|
||||
return _alt_above_ground > 2.0f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user