Extended Kalman Filter

How Does a Drone Know Where It Is? How does an autonomous drone know its position, speed, altitude, and direction? And how can it keep flying when GPS becomes unreliable? The answer is EKF2 — Extended Kalman Filter, one of the most important components of the PX4 autopilot system. In this video, we break down how EKF2 works, from the mathematics behind Kalman filtering to the sensors that help drones navigate and maintain stable flight.

You'll learn how PX4 combines information from six major sensor sources: 🔹 IMU (Gyroscope + Accelerometer) — Measures rotation and acceleration, allowing EKF2 to predict motion in real time. 🔹 Magnetometer — Measures Earth's magnetic field and helps determine the drone's heading. 🔹 Barometer — Uses atmospheric pressure to help estimate altitude. 🔹 GPS / GNSS — Provides global position and velocity measurements. 🔹 Optical Flow — Tracks movement across the ground, helping drones navigate when GPS is unavailable. 🔹 External Vision — Supplies position and motion estimates from visual-inertial odometry (VIO) or motion-capture systems.