Expand description
Wind from the air’s push on a rotor-borne vehicle: drag inverted to air velocity, one axis at a time, and filtered on world wind.
Thrust acts along the thrust frame’s z, so the specific force along its x and y is
the air’s push alone. Each axis’s drag model, a bluff-body term ½ρv²/B plus rotor
momentum drag μv (ArduPilot’s and PX4’s drag fusion: NavEKF3_core::FuseDragForces,
Ekf::fuseDrag), is inverted to the air velocity along it; the wind along it is
the ground velocity’s component less that. A two-state Kalman filter on wind (north, east)
takes each axis as a scalar measurement whose noise is the force noise over the drag’s
slope there, so an axis with little drag (a tailsitter’s span in hover) counts for little,
and the wind across it is learned once a turn puts more drag on it. Both stacks fit the
drag frame to the body with thrust along z and treat X and Y alike apart from their
coefficients; per-axis noise is what lets a flat-plate airframe use it.
The measurement is averaged over UPDATE_PERIOD_S, as both stacks do, before each
update. Allocation-free and fixed-size.
Structs§
- Wind
Config - The drag model, per thrust-frame axis (
x,y), and the filter’s noise. - Wind
Estimate - The wind and its uncertainty.
- Wind
Estimator - Estimates the wind from the vehicle state while the caller says it is airborne on rotors.
Constants§
- AIR_
DENSITY_ KGPM3 - Sea-level air density, in kg/m³ (ISA).
- DEFAULT_
FORCE_ NOISE_ MPS2 - Default
WindConfig::force_noise_mps2: ArduPilot’sEK3_DRAG_M_NSE(AP_NavEKF3.cpp). - DEFAULT_
GATE_ SIGMA - Default
WindConfig::gate_sigma: both stacks gate drag at 5σ (NavEKF3_core::FuseDragForces,Ekf::fuseDrag). - DEFAULT_
INITIAL_ SD_ MPS - Default
WindConfig::initial_sd_mps, in m/s: past any wind a rotor-borne vehicle flies in, so the first measurements set the estimate. - DEFAULT_
MAX_ AXIAL_ SPEED_ MPS - Default
WindConfig::max_axial_speed_mps, in m/s: at 1 m/s a sim tailsitter’s calm-air estimate is 0.14 m/s off 10 s after its takeoff, 0.22 m/s with no skip (#608). - DEFAULT_
PROCESS_ NOISE_ MPS_ PER_ RT_ S - Default
WindConfig::process_noise_mps_per_rt_s: lets a steady wind’s estimate move about 0.1 m/s a second, slow beside a hover’s drift. - UPDATE_
PERIOD_ S - Seconds the measurement is averaged over before each update: about 5 Hz, as both stacks
average their specific force (
NavEKF3_core::SampleDragData,EstimatorInterface::setDragData).
Functions§
- specific_
force_ ned - The specific force on the vehicle (what an accelerometer reads: acceleration less gravity),
in m/s², in NED, the frame
state.attituderotates the body into:(0, 0, −g)at rest.