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
| Sensor | Provides | Update rate | Characteristic lie |
|---|---|---|---|
| Gyroscope (IMU) | Angular rate → attitude backbone | 1–8 kHz | Bias drift with temperature; vibration aliasing |
| Accelerometer (IMU) | Specific force → attitude reference, velocity damping | 1–8 kHz | Clipping under vibration; scale/offset errors |
| Barometer | Pressure altitude | ~25–100 Hz | Weather drift; prop-wash and airflow pressure fields |
| Magnetometer | Heading reference | ~100 Hz | Current-draw interference; steel structures |
| GNSS | Absolute position/velocity | 5–20 Hz | Multipath; mode changes (fix/float) |
| Airspeed (pitot) | Indicated airspeed (FW/VTOL) | ~100 Hz | Blockage, icing, calibration offset |
| Rangefinder (lidar/radar) | Height above ground | 10–100 Hz | Vegetation, water, dust returns |
| Optical flow | Velocity without GNSS | ~50–400 Hz | Low 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.
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.