Visual Fixed-Wing Landing
Introduction
Visual Fixed-wing Landing (FWL) is an AuterionOS application designed for precision landings at a specified location. The application supports two operational modes: landing at a global position (GPS coordinates), or navigating to a landing point using a Line-of-Sight (LOS) rate vector received from the tracking-service app.
Visual Fixed-wing landing operates as an external PX4 flight mode, allowing it to be engaged or disengaged from the AMC ground control station. Upon activation, if neither a landing position nor an LOS rate vector is available, the application will level the aircraft and enter a standby state, waiting for the LOS rate vector to be received. Once the LOS rate vector becomes available, the app will guide the vehicle based on that vector.
Required inputs
The FWL app primarily consumes a LOS and LOS rate vector - published by the tracking service app, or generated internally when GPS landing is enabled.
From PX4, the app requires the following:
Required
Attitude - PX4 mode requirement. If
attitude_invalid, PX4 will deactivate the modeAngular velocity - PX4 mode requirement. If
angular_velocity_invalid, PX4 will deactivate the mode.Local position relaxed - PX4 mode requirement. If
local_position_invalid_relaxed, PX4 will deactivate the mode.Filtered accelerometer data - checked internally by the app. Supplied by the
VehicleAcceleration.msg. If absent or stale, the app returns a safe setpoint until restored. The safe setpoint commands a height rate and a lateral acceleration:If manual control input is available, the pitch stick maps to height rate and the roll stick to lateral acceleration.
Otherwise, the app commands zero height rate and zero lateral acceleration to keep the vehicle level at the current altitude and heading.
Optional
Airspeed measurements - if absent or zero/non-finite, the airspeed controller is disabled and thrust is fixed at 50%.
Manual control input - used exclusively to populate the safe setpoint. If the app falls back to the safe setpoint (e.g. due to missing accelerometer data), the pilot's pitch stick maps to height rate and roll stick to lateral acceleration. If manual input is also absent, the safe setpoint commands level flight.
Local position - used to hold altitude before the landing approach, and to trigger flare if enabled.
Guidance State Machine
The guidance logic runs as a state machine with three sequential phases.
1. Heading alignment
The initial phase, entered when the mode is activated. If the vehicle is not facing the landing point, the vehicle aligns it's heading while holding altitude.
2. Midcourse
The vehicle enters midcourse guidance, holding altitude while flying towards the landing location. If the approach angle (FWL_APR_FLT_ANG) is set to zero, this phase is skipped and the vehicle transitions directly to approach.
3. Approach
The vehicle follows the LOS vector downward to the landing point. This phase persists until landing or mode deactivation.
Bank-to-turn vs. Skid-to-turn
Bank-to-Turn (BTT) is the standard and most efficient way for fixed-wing aircraft to turn. It involves rolling (banking) the aircraft to tilt the wing's lift, creating a horizontal turning force, while the rudder is used to coordinate the turn. BTT is used as the default turning method.
Skid-to-Turn (STT) uses the rudder to create a sideslip angle, causing the vehicle to skid laterally and change its course without additional bank angle. It allows for wings-level turns, beneficial for video tracking from onboard cameras and for vehicles with high yaw authority. Using only STT requires large vertical surfaces to generate enough lateral acceleration. STT is disabled by default.
Visual Fixed-wing Landing allows the use of a mixed BTT and STT approach, enabling control through both skidding and banking. The amount of side acceleration allocated to STT before the vehicle would start to bank can be adjusted using FWL_MAX_SIDE_ACC. The optimal ratio is dependent on the vehicle's ability to skid-to-turn, which can be assessed in flight by attempting yaw-only turns (e.g., maintaining level flight in altitude mode with full yaw stick deflection).
For APX4 versions older than v3.3.3, FW_ACRO_YAW_EN needs to be enabled to allow yaw rate control when the app is active.
To enable STT:
Set
FWL_SF_R_I_GAINto 0.Set
FWL_MAX_SIDE_ACCto the maximum lateral acceleration you want to generate through STT. Beyond this, the vehicle will BTT.Tune the lateral acceleration loop:
FWL_ACC_Y_GAIN_P, FWL_ACC_Y_GAIN_I
Global approach
To tune the application or test the accuracy, it’s possible to set a global landing location using GPS coordinates. To enable GPS-based landing:
Disable visual tracking input (
FWL_TRCK_VISUAL: false) and enable global coordinates landing (FWL_VIRT_APR_GLB: true)Set global landing location with parameters
FWL_VIRT_APR_MSL, FWL_VIRT_APR_LAT and FWL_VIRT_APR_LON.Restart the FWL app.
The vehicle will then approach the global landing location. It is the pilot's responsibility to abort the approach.
Flare
The flare is the phase of flight where the vehicle slightly raises the nose of the aircraft just before touchdown. This maneuver transitions the aircraft from a descent to a level or slightly nose-up attitude, reducing the rate of descent. Flare is disabled by default and can be enabled by setting the FWL_FLR_LAND parameter accordingly. The desired pitch angle and transition pitch rate are defined by FWL_FLR_PITCH and FWL_FLR_PRATE parameters.
Tuning Guide
The tuning guide relies on the autotune.py script that can be found here.
The tuning procedure consists of tuning several control loops in the following order:
1
PX4 Autopilot rate controller
Tune the PX4 rate controller first. Keep the response smooth. Minimize overshoot and steady-state error.
Input: vehicle_torque_setpoint/
Output: vehicle_angular_velocity
For rate controller tuning guidance, refer to PX4 documentation or watch this video.
2
Airspeed
Perform manual throttle changes while cruising level.
Input: vehicle_thrust_setpoint/xyz[0].0
Output: airspeed_validated/true_airspeed_m_s.0
Write the obtained values to FWL_ASPD_GAIN_P and FWL_ASPD_GAIN_I.
3
Vertical Acceleration
Perform manual sine wave sweeps on the pitch axis while flying in Stabilized mode.
Input: vehicle_rates_setpoint/pitch.0
Output: vehicle_acceleration/xyz[2].0
Write the obtained values to FWL_ACC_Z_GAIN_P and FWL_ACC_Z_GAIN_P.
4
Roll
Perform manual sine wave sweeps on the roll axis while flying in Stabilized.
Input: vehicle_rates_setpoint/roll.0
Output: vehicle_acceleration/xyz[1].0
Write the obtained values to FWL_ROLL_GAIN and FWL_SF_R_I_GAIN.
5
Lateral Acceleration
Perform manual sine wave sweeps on the yaw axis while flying in Stabilized. Then try a full yaw turn by deflecting the yaw stick to one side and waiting.
Input: vehicle_rates_setpoint/yaw.0
Output: vehicle_acceleration/xyz[1].0
Write the obtained values to FWL_ACC_Z_GAIN_P and FWL_ACC_Z_GAIN_I. Check the log file for the maximum side acceleration at vehicle_acceleration/xyz[1].0, then write that value to FWL_MAX_SIDE_ACC with some margin.
Pitch Limitation
The app can actively limit the vehicle pitch rate to keep the tracked object within the camera's vertical field of view. To enable the pitch limiter, the following camera parameters must be set:
FWL_P_LIM_VFOV- Camera sensor vertical FOV in which the tracked object should remain. Vertical FOV of the camera sensor. The limiter constrains pitch rate to keep the tracked object within this field of view. Set to 0 or less to disable.FWL_CAM_TILT- Camera mounting tilt angle relative to the vehicle body (positive = pitched up). Used to correctly offset the FOV boundaries when the camera is not forward-facing.
For a visual representation of the pitch limitation configuration, refer to the image in the MC Follow documentation.
Last updated