Wind Estimation & Drag Fusion
Executive Summary
Knowing the wind speed is critical for accurate navigation, especially for Return-to-Launch calculations ("Do I have enough battery to fight this headwind?"). While Planes use Pitot tubes, Multicopters typically don't. ArduPilot solves this using Drag Fusion: estimating wind by analyzing how much the drone has to lean to hold position or move.
Theory & Concepts
1. Aerodynamic Drag Modeling
Every object moving through air creates a drag force.
- Form Drag: The force required to push the air out of the way. It increases with the square of speed.
- Momentum Drag: The force required to ingest air into the propellers and accelerate it. It increases linearly with speed.
- The Physics: By measuring the "Lean Angle" required to remain stationary, ArduPilot effectively turns the entire drone into a giant Anemometer (wind sensor).
2. Relative Airspeed
Inertial sensors (IMUs) measure acceleration relative to the ground. But drag is a function of acceleration relative to the Air.
The EKF uses the difference between its Inertial Velocity State and its Wind Velocity State to calculate the Relative Airspeed, which is the variable used in the drag math.
Architecture (The Engineer's View)
1. The Physics Model
A multicopter is a "Bluff Body" (a brick flying through air).
- Drag Force: Air resistance pushes against the body.
- Lean Angle: To hold position against wind, the drone must tilt into the wind.
- The Logic: If the drone is tilting 5 degrees North but the GPS says Velocity is 0, the EKF infers a strong Wind from the North.
2. Drag Fusion (FuseDragForces)
The EKF uses a drag model to predict the acceleration the drone should feel based on its airspeed.
- Inputs:
- IMU Accelerometers (Measured Force).
- Vehicle Velocity (from GPS/Optical Flow).
- Wind Velocity (State Estimate).
- Correction: If the measured acceleration doesn't match the prediction, the EKF updates its Wind Velocity Estimate (States 22 & 23) to resolve the discrepancy.
- Code Path:
NavEKF3_core::FuseDragForces().
3. Airspeed Fusion (FuseAirspeed)
For vehicles with a Pitot tube (Planes), the logic is simpler.
- Measurement: True Airspeed (TAS).
- Calculation:
Wind_Vector = Ground_Velocity_Vector - Air_Velocity_Vector. - Code Path:
NavEKF3_core::FuseAirspeed().
Why This Matters
- Dead Reckoning: If GPS fails, the drone must fly blind using accelerometers. If the EKF has a good Wind Estimate, it can compensate for wind drift even without GPS, lasting much longer before crashing.
- Landing Accuracy: Knowing the wind allows the drone to fight drift more aggressively during precision landings.
Key Parameters
| Parameter | Default | Description |
|---|---|---|
EK3_DRAG_BCOEF_X |
0 | Ballistic Coefficient (Bluff Body Drag). Determines how much the body "catches the wind". Needs tuning for accurate wind estimation on copters. |
EK3_DRAG_MCOEF |
0 | Momentum Drag Coefficient. Account for the "intake momentum" of air going into the propellers. |
EK3_ENABLE |
1 | Must be enabled for any of this to work. |
Source Code Reference
- Fusion Logic:
AP_NavEKF3_AirDataFusion.cpp