MAVLINKHUD

Overview

The SOAR parameter group configures the Autonomous Soaring engine for ArduPlane. This allows gliders to automatically detect thermals (rising air), bank into them to gain altitude, and then continue on their mission, significantly extending flight endurance.

Key Concepts

1. Thermal Detection

The autopilot monitors the vertical velocity of the aircraft (via EKF and TE airspeed). If it detects a climb that cannot be explained by throttle or pitch changes, it assumes it has found a thermal.

  • SOAR_VSPEED: The minimum lift (m/s) required to trigger soaring behavior.

2. Loitering in Thermals (SOAR_THML_...)

Once a thermal is found, the plane switches to a circular loiter to stay within the rising air column.

  • SOAR_THML_BANK: The bank angle used while circling in the thermal.
  • SOAR_THML_ARSPD: The target airspeed for efficient climbing.

3. Altitude Limits

  • SOAR_ALT_MAX: The height at which the plane will exit the thermal and resume its mission.
  • SOAR_ALT_MIN: The minimum altitude below which the plane will ignore thermals and use its motor to stay aloft.

Parameter Breakdown

  • SOAR_ENABLE: Master switch.
  • SOAR_POLAR_K / B: Aerodynamic "Polar" coefficients for the specific glider wing.
  • SOAR_ALT_CUTOFF: Altitude at which to stop using the motor during a climb.

Integration Guide

  1. Requirement: A glider with an airspeed sensor and high efficiency.
  2. Config: Set your wing polar values (see Wiki for common airframes).
  3. Mode: Switch to AUTO or CRUISE and enable soaring via an RC switch (RCx_OPTION = 88).

Developer Notes

  • Library: libraries/AP_Soaring.
  • Algorithm: Uses the Total Energy rate of change to estimate environmental air movement.

SOAR_ALT_CUTOFF

m
Default 250.0
Range 0 5000.0

Soaring Cutoff Altitude (SOAR_ALT_CUTOFF)

Description

SOAR_ALT_CUTOFF defines the "Start of Mission" altitude for autonomous gliders.

When the drone is climbing using its motor, it will continue until it hits this altitude. At that point, ArduSoar kills the motor and begins the search for lift.

Tuning & Behavior

  • Default Value: 250.0 meters.
  • Recommendation: Set high enough to ensure you find lift, but low enough to save battery for multiple climb cycles.

SOAR_ALT_MAX

m
Default 350.0
Range 0 5000.0

Maximum Soaring Altitude (SOAR_ALT_MAX)

Description

SOAR_ALT_MAX is the "Ceiling" for thermal hunting.

When the drone is circling in a thermal and reaches this altitude, it will automatically exit the circle and return to its mission. This is used for both legal compliance (staying below 400ft/120m) and performance (avoiding thin air where glide performance drops).

Tuning & Behavior

  • Default Value: 350.0 meters.
  • Recommendation: Set to your local legal altitude limit.

SOAR_ALT_MIN

m
Default 50.0
Range 0 1000.0

Minimum Soaring Altitude (SOAR_ALT_MIN)

Description

SOAR_ALT_MIN is your "Safety Floor."

If the drone's altitude falls below this limit, ArduSoar stops trying to be clever and just turns on the motor to climb back to safety. This prevents the drone from getting stuck in a weak thermal so low that it can't safely return home.

Tuning & Behavior

  • Default Value: 50.0 meters.
  • Recommendation: Set to at least 2x the height of the tallest obstacles in your area.

SOAR_CRSE_ARSPD

m/s
Default 0
Range -1 50

Soaring Cruise Airspeed (SOAR_CRSE_ARSPD)

Description

SOAR_CRSE_ARSPD determines the speed of travel when hunting for the next thermal.

  • 0 (Default): Use AIRSPEED_CRUISE.
  • -1: Speed-To-Fly (STF) Mode. This is the "Genius Mode." The autopilot uses your drag polar to calculate the mathematically perfect speed to fly based on the current wind and expected strength of the next thermal.
  • Positive Value: Hold this specific speed.

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Set to -1 for the most advanced autonomous glider performance.

SOAR_DIST_AHEAD

m
Default 5.0
Range 0 100

Soaring Thermal Entry Look-Ahead (SOAR_DIST_AHEAD)

Description

SOAR_DIST_AHEAD defines the "Starting Guess" for the autopilot when it first detects a thermal.

When the Variometer (climb rate sensor) indicates lift, the autopilot knows it is near a thermal, but it doesn't know exactly where the center is. This parameter tells the aircraft to assume the thermal core is this many meters directly ahead. The aircraft will then begin a turn toward that estimated spot. As it circles, the EKF updates this estimate based on the actual lift experienced.

Tuning & Behavior

  • Default: 5.0 meters.
  • Recommendation: Leave at 5.0 for most small electric gliders. For larger, faster aircraft, you may need to increase this to 10.0 or 15.0 to account for the larger turning radius.
  • Significance: Correct initialization leads to faster "centering" of the thermal and better climb rates.

SOAR_ENABLE

Default 0
Range 0 1

Soaring Enable (SOAR_ENABLE)

Description

SOAR_ENABLE activates "ArduSoar" – a sophisticated suite of algorithms that allow a glider to autonomously find, track, and orbit inside thermals (rising columns of air) to gain altitude without using the motor.

When enabled, the autopilot monitors the Variometer (climb rate) and longitudinal acceleration. If it detects that the plane is being lifted by a thermal, it can automatically switch to THERMAL mode, bank into a circle, and climb. Once the thermal weakens or the altitude limit is reached, it returns to its mission.

  • 0: Disabled (Default).
  • 1: Enabled.

Tuning & Behavior

  • Default Value: 0.
  • Operational Standard: This is typically mapped to an RC switch using RCx_OPTION = 88 (Soaring Enable). This allows the pilot to give the drone permission to "Go Hunting" for lift.
  • Prerequisite: Requires a well-calibrated airspeed sensor for best performance.

SOAR_MAX_DRIFT

m
Default -1
Range 0 1000

SOAR_MAX_DRIFT: Maximum drift distance to allow when thermalling

Description

The previous mode will be restored if the horizontal distance to the thermalling start location exceeds this value. -1 to disable.

Values

  • Range: 0 to 1000
  • Units: m
  • Default: -1 (Disabled)

Description

This parameter defines a "Geofence" for autonomous thermalling.

  • Function: When the glider detects lift and enters THERMAL mode, it starts circling. The wind will naturally push the thermal (and the glider) downwind.
  • Safety: If the glider drifts too far from the point where it started thermalling, it might get blown too far downwind to return home safely. SOAR_MAX_DRIFT sets the maximum allowable distance.
  • Trigger: If exceeded, the glider exits THERMAL mode and resumes its previous navigation task (e.g., AUTO waypoints or CRUISE).

SOAR_MAX_RADIUS

m
Default 200
Range 0 500

SOAR_MAX_RADIUS: Maximum thermal radius

Description

Maximum radius to allow the thermal to grow to. If the radius estimate exceeds this value then thermalling is stopped.

Values

  • Range: 0 to 500
  • Units: m
  • Default: 200

Description

This parameter limits the size of the circling pattern when soaring.

  • Function: The Soaring EKF constantly estimates the size and strength of the thermal.
  • Trigger: If the estimated size of the thermal core grows larger than this radius, the autopilot assumes the lift is too diffuse or the estimate is invalid, and it abandons the thermal to continue the mission.

SOAR_MIN_CRSE_S

s
Default 10
Range 0 600

Minimum Soaring Cruise Time (SOAR_MIN_CRSE_S)

Description

SOAR_MIN_CRSE_S prevents the glider from "Hunting" or flickering between thermalling and cruising states.

When the glider leaves a thermal, it enters the Cruise (glide) mode to head toward the next waypoint. This parameter ensures it stays in that mode for a minimum amount of time before it is allowed to search for or enter a new thermal. This prevents the plane from circling in weak, broken lift immediately after exiting a good thermal.

Tuning & Behavior

  • Default: 10 seconds.
  • Recommendation: Leave at 10-15 seconds.
  • Significance: Ensures the aircraft gains enough horizontal distance from the previous thermal's turbulence before attempting to detect the next one.

SOAR_MIN_THML_S

s
Default 20
Range 0 600

Minimum Soaring Thermal Time (SOAR_MIN_THML_S)

Description

SOAR_MIN_THML_S sets a "Timer" for how long the glider must commit to a thermal once it starts circling.

Thermals can be turbulent and noisy. Without this parameter, the autopilot might think it's found a thermal, circle once, and then immediately "Lose" it and exit because of a brief downdraft. This setting forces the plane to stay in the circling state for at least this many seconds, providing enough time for the climb rate filters to stabilize and confirm if the lift is genuine.

Tuning & Behavior

  • Default: 20 seconds.
  • Recommendation: Keep at 20-30 seconds. This is typically enough for one or two full circles, allowing the EKF and Soaring logic to build a reliable estimate of the thermal's strength and center.

SOAR_POLAR_B

Default 0.031
Range 0.005 0.05

Induced Drag Coefficient (SOAR_POLAR_B)

Description

SOAR_POLAR_B describes how much speed the glider loses when it pulls up or turns.

As an aircraft produces more lift (e.g., during a turn), it creates "Induced Drag." This parameter tells the soaring controller how much extra sink rate to expect when the plane is banking in a thermal.

Tuning & Behavior

  • Default Value: 0.031.
  • Recommendation: High aspect ratio wings (long, skinny wings) have a lower B value (more efficient). Stubby wings have a higher B.

SOAR_POLAR_CD0

Default 0.027
Range 0.005 0.5

Zero Lift Drag Coefficient (SOAR_POLAR_CD0)

Description

SOAR_POLAR_CD0 is a fundamental aerodynamic constant for your glider. It represents the "Parasite Drag" – the air resistance caused by the fuselage, tail, and skin friction when the wing is not producing lift.

ArduSoar uses this (along with SOAR_POLAR_B and K) to build a mathematical model of how fast your plane sinks at any given airspeed. Without an accurate model, the autopilot cannot distinguish between a "Good Thermal" and the plane simply gliding efficiently.

The Mathematics

The sink rate ($V\_z$) is calculated using the drag polar equation:

$$ V\_z = \frac{\text{CD0} \cdot V^3}{K} + \frac{B \cdot K}{V \cdot \cos(\phi)^2} $$

Where:

  • $V$ is airspeed.
  • $K$ is the loading factor.
  • $B$ is the induced drag coefficient.

Tuning & Behavior

  • Default Value: 0.027.
  • Recommendation:
    • High Performance Glider: 0.015 - 0.025.
    • Foam Glider (Bixler/Skywalker): 0.030 - 0.045.
  • Calibration: If the drone thinks it's in lift even when the air is perfectly still, your CD0 is likely set too high (it expects more drag than the plane actually has).

SOAR_POLAR_K

m²/s²
Default 25.6
Range 20 400

Wing Loading Factor (SOAR_POLAR_K)

Description

SOAR_POLAR_K accounts for the weight and wing area of your glider.

It acts as the "Scaling Constant" for the entire drag polar. A heavy glider needs to fly faster to stay in the air, and this parameter tells the math model exactly how much faster.

The Mathematics

$$ K = \frac{2 \cdot m \cdot g}{\rho \cdot S} $$

Where:

  • $m$ is mass (kg).
  • $g$ is gravity (9.81).
  • $ ho$ is air density (~1.225 at sea level).
  • $S$ is wing area ($m^2$).

Tuning & Behavior

  • Default Value: 25.6.
  • Recommendation: If you add a larger battery (making the plane heavier), you must increase K proportionally to maintain accuracy.

SOAR_Q1

Default 0.001
Range 0.0001 0.01

Soaring EKF Thermal Strength Noise (SOAR_Q1)

Description

SOAR_Q1 is a low-level tuning parameter for the soaring Kalman Filter.

It defines how much the autopilot expects the strength of a thermal to change over time. A higher value tells the filter that thermals are turbulent and their strength can change rapidly. A lower value tells the filter that thermals are steady, resulting in a smoother but slower-reacting estimate of the climb rate.

Tuning & Behavior

  • Default: 0.001.
  • Recommendation: Leave at 0.001. Only adjust if you are a developer testing the soaring estimator's response to artificial lift profiles.

SOAR_Q2

Default 0.001
Range 0.0001 0.01

Soaring EKF Position Noise (SOAR_Q2)

Description

SOAR_Q2 defines how much the autopilot expects the center of a thermal to "drift" or move.

SOAR_R

Default 0.1
Range 0.01 1.0

Soaring EKF Measurement Noise (SOAR_R)

Description

SOAR_R defines how much the autopilot "Trusts" the data coming from your Variometer/Barometer.

SOAR_THML_ARSPD

m/s
Default 0
Range 0 50

Soaring Thermal Airspeed (SOAR_THML_ARSPD)

Description

SOAR_THML_ARSPD is the "Best Glide" speed for circling.

When you are inside a thermal, you want to stay in the air as long as possible (minimum sink rate).

  • 0 (Default): Use AIRSPEED_CRUISE.
  • Value: Hold this specific speed.

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Set to your plane's "Minimum Sink Speed" (usually slightly slower than your best glide speed).

SOAR_THML_BANK

deg
Default 30.0
Range 20 50

Thermalling Bank Angle (SOAR_THML_BANK)

Description

SOAR_THML_BANK determines the "Tightness" of your search circle.

To stay inside a narrow thermal, the glider must bank its wings.

  • Shallow Bank (20°): Large circles. Good for wide, weak thermals, but easy to fall out of a small one.
  • Steep Bank (45°): Tight circles. Good for centering on small, strong thermals, but increases the "Induced Drag," which makes the plane sink faster.

Tuning & Behavior

  • Default Value: 30.0°.
  • Recommendation: 30° to 35° is a good sweet spot for most foam gliders.

SOAR_THML_FLAP

%
Default 0
Range 0 100

Soaring Thermal Flap Setting (SOAR_THML_FLAP)

Description

SOAR_THML_FLAP defines the specialized wing configuration used for maximum lift during the "Thermalling" phase.

When a glider is circling in a thermal, it typically flies at a much lower speed than during cross-country cruise. Deploying a specific amount of flap increases the wing's camber, providing more lift and allowing the plane to circle tightly and slowly without stalling. This parameter overrides the usual flight mode flap settings specifically for soaring.

Tuning & Behavior

  • Default: 0%.
  • Recommendation: Set this to the "Thermal" or "Launch" flap position recommended by your glider's manufacturer (typically 10% to 30%).
  • Significance: Higher flap settings improve the "Climb" efficiency but increase drag, which is fine while you are inside the lifting air of a thermal.

SOAR_VSPEED

m/s
Default 0.7
Range 0 10

Soaring Vertical Speed Trigger (SOAR_VSPEED)

Description

SOAR_VSPEED is the "Excitement Threshold" for your glider.

It defines how strong a thermal must be before the drone decides to stop its mission and start circling. If the "Nettorate" (the vertical speed of the air around the plane, with the plane's own sink rate removed) exceeds this value, the drone declares "Lift Detected!"

  • Low Value (e.g. 0.5): Very sensitive. The drone will try to circle in almost any rising air.
  • High Value (e.g. 2.0): Selective. The drone only stops for strong, reliable thermals.

Tuning & Behavior

  • Default Value: 0.7 m/s.
  • Recommendation: Match this to your glider's performance. A high-performance carbon glider might circle in 0.5m/s, while a draggy foam glider might need 1.0m/s to make any real progress.