A drone's confidence about where it is and which way is up comes from a committee of imperfect sensors, chaired by an Extended Kalman Filter. Understanding what each member contributes — and how each one lies — is the fastest route to diagnosing the estimator problems that eat integration weeks.

The committee and its portfolios

SensorProvidesUpdate rateCharacteristic lie
Gyroscope (IMU)Angular rate → attitude backbone1–8 kHzBias drift with temperature; vibration aliasing
Accelerometer (IMU)Specific force → attitude reference, velocity damping1–8 kHzClipping under vibration; scale/offset errors
BarometerPressure altitude~25–100 HzWeather drift; prop-wash and airflow pressure fields
MagnetometerHeading reference~100 HzCurrent-draw interference; steel structures
GNSSAbsolute position/velocity5–20 HzMultipath; mode changes (fix/float)
Airspeed (pitot)Indicated airspeed (FW/VTOL)~100 HzBlockage, icing, calibration offset
Rangefinder (lidar/radar)Height above ground10–100 HzVegetation, water, dust returns
Optical flowVelocity without GNSS~50–400 HzLow texture, low light, needs accurate range

The IMU: everything rests on it

The EKF integrates gyro rates thousands of times a second; every other sensor exists to correct that integration's drift. Two practical consequences:

  • Vibration is the enemy. Prop-induced vibration at blade-passing frequencies aliases into the gyro band and, worse, clips accelerometers — once clipped, no filter recovers the truth. Balance props (see the prop guide), mount the FC properly (see FC selection), and watch clip counters in logs. RPM-based notch filtering via bidirectional DShot or ESC telemetry is a major quality-of-life upgrade.
  • Temperature is the slow enemy. Gyro bias walks with temperature; a controller calibrated on the bench at 22 °C behaves differently launched at −5 °C. Heated, temperature-calibrated IMUs exist precisely for this.

Barometer: precise, not accurate

Baros resolve ~10 cm of relative altitude but drift metres with weather fronts, and they measure the pressure where they sit — which on a multirotor includes prop wash and airframe aerodynamic fields. Symptoms: altitude "breathing" in hover, height jumps at speed changes. Fixes: foam over the baro, port placement away from airflow, dual baros, and a rangefinder for the flight phases where height truly matters (landing, terrain following).

Magnetometer: the sensor everyone learns to distrust

The compass measures Earth's field plus every field your aircraft manufactures: power leads (see the wiring notes in the ESC guide), motors, and the customer's steel infrastructure. Interference shows up as heading error → toilet-bowling in position hold → flyaway lore. Mitigation ladder: mount the mag on a GNSS mast away from power wiring → calibrate with payload installed and motors known → enable current-based compensation → on aircraft that work near steel, replace magnetic heading with dual-antenna GNSS heading and demote the mag to a consistency check.

Airspeed and rangefinders: the specialists

Airspeed is stall protection on fixed-wing and VTOL aircraft: ground speed is not airspeed, and the difference is exactly the wind that kills. Spend for a heated pitot in any cold/humid operating envelope; calibrate; fair the tube into clean air. Rangefinders (single-beam lidar, or radar for dust/fog tolerance) own the last ten metres: landing flare, terrain following, obstacle floor. Know their surface pathologies — lidar reads into vegetation canopies and off water unpredictably; radar sees through dust that blinds lidar.

Debugging estimator problems

Work the checklist in this order — it's sorted by base rate: 1) vibration metrics and accel clipping, 2) compass interference vs throttle, 3) baro placement, 4) GNSS quality flags and antenna siting, 5) EKF innovation levels per sensor in the logs. Both major stacks expose all of these; the log review habit is the difference between a two-hour and a two-week diagnosis. Log review is also a standing item in a healthy flight test program.

Redundancy: sensors as a safety architecture

Commercial aircraft carry redundant IMUs and baros not for accuracy but for voting: the estimator detects a sensor whose story diverges and excludes it mid-flight. Design the redundancy consciously — independent buses and power, mixed sensor models to dodge common-mode bugs, and failsafe behaviour defined for each degradation level (see failsafes & redundancy). A sensor suite is a safety case input, not a spec-sheet line.

Frequently asked questions

Why does my drone drift when GPS is fine?

Horizontal position comes from GNSS, but attitude and velocity damping come from the IMU and the estimator's fusion. Vibration-corrupted gyro data, poor accelerometer calibration or magnetometer interference all cause drift or toilet-bowling even with perfect GPS.

What does the EKF in a flight controller do?

The Extended Kalman Filter fuses IMU, GNSS, barometer, magnetometer and optional sensors into a single best estimate of attitude, velocity and position — weighting each source by its expected noise and rejecting measurements that disagree too much with the prediction.

Do drones need airspeed sensors?

Multirotors don't. Fixed-wing and VTOL aircraft should have one: without measured airspeed, the aircraft can only infer it from ground speed and wind estimates, and a strong tailwind can push it below stall speed. Heated pitot tubes prevent icing in cold, humid conditions.