Takeoff Mode (Fixed-Wing)
The Takeoff flight mode causes the vehicle to take off to a specified height and then enter Hold mode.
Vehicles are hand or catapult launched by default, but can also be configured to use a runway takeoff when supported by the hardware.
INFO
- Mode is automatic - no user intervention is required to control the vehicle.
- Mode requires at least a valid altitude estimation.
- Flying vehicles can't switch to this mode without valid altitude.
- Flying vehicles will failsafe if they lose the altitude estimate.
- Disarmed vehicles can switch to mode without valid altitude estimate but can't arm.
- RC control switches can be used to change flight modes.
- RC stick movement is ignored in catapult takeoff but can be used to nudge the vehicle in runway takeoff.
- The Failure Detector will automatically stop the engines if there is a problem on takeoff.
Technical Summary
Takeoff mode (and fixed wing mission takeoff) has two modalities: catapult/hand-launch or runway takeoff (hardware-dependent). The mode defaults to catapult/hand launch, but can be set to runway takeoff by setting RWTO_TKOFF to 1.
To use Takeoff mode you first switch to the mode, and then arm the vehicle (or send the MAV_CMD_NAV_TAKEOFF command which does both). The acceleration of hand/catapult launch triggers the motors to start. For runway launch, motors ramp up automatically once the vehicle has been armed.
Irrespective of the modality, a flight path (starting point and takeoff course) and clearance altitude are defined:
- The starting point is the vehicle position when the takeoff mode is first entered.
- The course is set to the vehicle heading on arming by default. If a valid waypoint latitude/longitude is set the vehicle will instead track towards the waypoint.
- The clearance altitude is set to MIS_TAKEOFF_ALT by default. If a valid waypoint altitude is set is set the vehicle will instead use it as the clearance altitude.
By default, on takeoff the aircraft will follow the line defined by the starting point and course, climbing at the maximum climb rate (FW_T_CLMB_MAX) until reaching the clearance altitude. Reaching the clearance altitude causes the vehicle to enter Hold mode.
If a valid waypoint target is set, using MAV_CMD_NAV_TAKEOFF or the VehicleCommand uORB topic, the vehicle will instead track towards the waypoint, and enter Hold mode after reaching the waypoint altitude (within the acceptance radius).
TIP
If the local position is invalid or becomes invalid while executing the takeoff, the controller is not able to track a course setpoint and will instead proceed climbing while keeping the wings level until the clearance altitude is reached.
INFO
- Takeoff towards a target position was added in PX4 v1.17.
- Holding wings level and ascending to clearance attitude when local position is invalid during takeoff was added in PX4 v1.17.
- QGroundControl does not support
MAV_CMD_NAV_TAKEOFF(at time of writing).
Mode Requirements
The following requirements must be met to arm in this mode, or to switch to this mode when it is armed.
mode_req_angular_velocity— Angular velocitymode_req_attitude— Attitude/posemode_req_local_alt— Local altitude relative to EKF2 origin ('0') position
Parameters
Parameters that affect both catapult/hand-launch and runway takeoffs:
| Parameter | Description |
|---|---|
| MIS_TAKEOFF_ALT | This is the relative altitude (above launch altitude) the system will take off to if not otherwise specified. takeoff. |
| FW_TKO_AIRSPD | Takeoff airspeed (is set to FW_AIRSPD_MIN if not defined by operator) |
| FW_TKO_PITCH_MIN | This is the minimum pitch angle setpoint during the climbout phase |
| FW_T_CLMB_MAX | Climb rate setpoint during climbout to takeoff altitude. |
| FW_FLAPS_TO_SCL | Flaps setpoint during takeoff |
| FW_AIRSPD_FLP_SC | Factor applied to the minimum airspeed when flaps are fully deployed. Needed if FW_TKO_AIRSPD is below FW_AIRSPD_MIN. |
INFO
The vehicle always respects normal FW max/min throttle settings during takeoff (FW_THR_MIN, FW_THR_MAX).
Catapult/Hand Launch
In catapult/hand-launch mode the vehicle waits to detect launch (based on acceleration trigger). On launch it enables the motor(s) and climbs with the maximum climb rate FW_T_CLMB_MAX while keeping the pitch setpoint above FW_TKO_PITCH_MIN. Once it reaches MIS_TAKEOFF_ALT it will automatically switch to Hold mode and loiter. It is possible to delay the activation of the motors and control surfaces separately, see parameters FW_LAUN_MOT_DEL, FW_LAUN_CS_LK_DY and CA_CS_LAUN_LK. The later is also exposed in the actuator configuration page under the advanced view.
All RC stick movement is ignored during the full takeoff sequence.
To launch in this mode:
- Arm the vehicle
- Put the vehicle into Takeoff mode
- Launch/throw the vehicle (firmly) directly into the wind. You can also shake the vehicle first, wait till the motor spins up and then throw it
Parameters (Launch Detector)
The launch detector is affected by the following parameters:
| Parameter | Description |
|---|---|
| FW_LAUN_DETCN_ON | Enable automatic launch detection. If disabled motors spin up on arming already |
| FW_LAUN_AC_THLD | Acceleration threshold (norm of acceleration must be above this value) |
| FW_LAUN_AC_T | Trigger time (acceleration must be above threshold for this amount of seconds) |
| FW_LAUN_MOT_DEL | Delay from launch detection to motor spin up |
| FW_LAUN_CS_LK_DY | Delay from launch detection to unlocking the control surfaces |
| CA_CS_LAUN_LK | Bitmask to select which control surfaces are to be locked during launch |
Runway Takeoff
Runway takeoffs can be used by vehicles with landing gear and steerable wheel (only). You will first need to enable the wheel controller using the parameter FW_W_EN.
Vehicle should be centered and aligned with runway when takeoff is initiated. The operator can "nudge" the vehicle while on the runway to help keeping it centered and aligned (see RWTO_NUDGE).
The runway takeoff mode has the following phases:
- Throttle ramp: Throttle is ramped up within RWTO_RAMP_TIME to RWTO_MAX_THR.
- Clamped to runway: Pitch fixed, no roll and takeoff path controlled until the rotation airspeed (RWTO_ROT_AIRSPD) is reached. The operator is able to nudge the vehicle left/right via yaw stick.
- Climbout: Increase pitch setpoint and climb to takeoff altitude. To prevent wingstrikes, the controller will keep the roll setpoint locked to 0 when close to the ground, and then gradually allow more roll while climbing. It is based on the vehicle geometry as configured in FW_WING_SPAN and FW_WING_HEIGHT.
Wheel Controller
The wheel controller steers the vehicle on the ground using the steerable nose/tail wheel. It is enabled with FW_W_EN and only runs in automatic modes during runway takeoff and during the landing rollout. Whenever it is not active (in all manual modes, or if it is disabled), the yaw stick is mapped directly to the wheel.
The controller is cascaded:
- Heading controller: The heading (yaw) error is converted into a yaw rate setpoint with a fixed time constant of 0.1s, limited to FW_W_RMAX.
- Rate controller: A P-I-FF controller (FW_WR_P, FW_WR_I, FW_WR_FF, integrator limited by FW_WR_IMAX) turns the yaw rate setpoint into a normalized wheel steering command in the range [-1, 1].
The heading setpoint during the ground roll is the bearing from the takeoff position to the takeoff waypoint, so the nose is kept aligned with the intended runway direction. If no navigation reference is available (takeoff without takeoff waypoint), and during the landing rollout, the controller instead holds the heading that was captured at the moment the wheel steering engaged.
Operator yaw stick input is added on top of the controller output to "nudge" the vehicle (enabled with RWTO_NUDGE for takeoff, and FW_LND_NUDGE for landing).
INFO
The gains are scaled with groundspeed (using FW_AIRSPD_STALL as the reference speed) so that the steering becomes less aggressive as the vehicle accelerates. This means the controller should be tuned at low speed, around stall airspeed.
For a smooth takeoff the wheel controller usually needs to be tuned:
- Start with FW_WR_P and FW_WR_FF only (set FW_WR_I to 0) and taxi/roll the vehicle in Mission mode with active Takeoff waypoint item at low speed.
- Increase the gains until the vehicle tracks the runway heading without noticeable oscillation of the nose.
- Add FW_WR_I to remove a remaining constant heading offset (e.g. caused by wheel misalignment or crosswind).
WARNING
Excessive gains lead to oscillations of the nose during the ground roll, which can quickly become dangerous at higher groundspeed. Always test with increasing speed step by step.
Parameters (Runway Takeoff)
Runway takeoff is affected by the following parameters:
| Parameter | Description |
|---|---|
| RWTO_TKOFF | Enable runway takeoff |
| FW_W_EN | Enable wheel controller |
| RWTO_MAX_THR | Max throttle during runway takeoff |
| RWTO_RAMP_TIME | Throttle ramp up time |
| RWTO_ROT_AIRSPD | Airspeed threshold to start rotation (pitching up). If not configured by operator is set to 0.9*FW_TKO_AIRSPD. |
| RWTO_ROT_TIME | This is the time desired to linearly ramp in takeoff pitch constraints during the takeoff rotation. |
| FW_TKO_AIRSPD | Airspeed setpoint during the takeoff climbout phase (after rotation). If not configured by operator is set to FW_AIRSPD_MIN. |
| RWTO_NUDGE | Enable wheel controller nudging while on the runway |
| FW_WING_SPAN | The wingspan of the vehicle. Used to prevent wingstrikes. |
| FW_WING_HEIGHT | The height of the wings above ground (ground clearance). Used to prevent wingstrikes. |
Parameters (Wheel Controller)
The wheel controller is affected by the following parameters:
| Parameter | Description |
|---|---|
| FW_W_EN | Enable wheel controller |
| FW_W_RMAX | Maximum yaw rate setpoint the heading controller outputs |
| FW_WR_P | Yaw rate controller proportional gain |
| FW_WR_I | Yaw rate controller integrator gain (trims a constant heading error) |
| FW_WR_IMAX | Yaw rate controller integrator limit |
| FW_WR_FF | Yaw rate controller feed forward gain |