Visual walkthrough — Sensor fusion — complementary filter (simple), Kalman filter (optimal)
Before any algebra, three plain-English promises about the words we will use:
Step 1 — Draw a guess as a hill, not a dot
WHAT. Instead of drawing our guess as a single point on a number line, we draw it as a bell-shaped hill (a Gaussian distribution). The peak sits at our estimate ; the width of the hill is the uncertainty .
WHY. A single dot pretends we know the answer exactly — we don't. A hill honestly says "probably near the peak, maybe a bit to either side." The whole Kalman machinery only works because it reasons about whole hills, not dots. This is the language of Bayesian estimation.
PICTURE. Two hills: a narrow tall one (confident guess, small ) and a wide flat one (unsure guess, big ). Same peak location, very different meaning.

Step 2 — We have TWO hills, and they disagree
WHAT. Now bring in both informants at once. Hill A is our prior guess (from the gyro's prediction): peak , width . The minus sign () means "before we looked at the new measurement." Hill B is the measurement hill: peak , width .
WHY. Fusion is the act of combining two disagreeing hills into one better hill. To combine them we must first see them side by side and notice they overlap but do not coincide — the truth is somewhere in the overlap.
PICTURE. The blue prior hill and the orange measurement hill drawn on the same axis, peaks apart, both fairly wide.

Here is just shorthand for "a bell hill centred at peak with this width."
Step 3 — Multiply the hills → the fused hill lands between them
WHAT. To fuse two independent hills we multiply them point by point and re-normalise. The result is a third bell hill — taller and narrower than both parents, with its peak pulled toward whichever parent was narrower.
WHY multiply? Each hill is a statement of "how believable each value is." When two independent informants both weigh in, believability multiplies (this is Bayes' rule for independent evidence). And multiplying two bells always gives another bell — that lucky fact is why the Kalman filter stays simple.
PICTURE. The blue and orange parent hills, with the green fused hill sitting between their peaks, clearly taller and thinner than either.

Step 4 — Write the fused peak as a "walk from A toward B"
WHAT. Instead of jumping straight to the messy product formula, we parameterise the answer. The fused peak must lie between and , so write it as a partial step from the prior toward the measurement:
WHY this shape. It guarantees the answer sits between the two peaks for any between and , and it isolates the one unknown we actually care about: how far to walk, the number . We named it the gain.
PICTURE. A number line: start at (blue dot), target (orange dot). An arrow of length lands us at the green fused point. The gap is labelled the innovation — the surprise, "how much the measurement disagreed with our guess."

- → don't move → ignore the measurement, keep the old guess.
- → walk all the way → throw away the guess, believe the measurement.
- between → a blend. Which is best? That is Step 5.
Step 5 — The uncertainty of our walk is a parabola in
WHAT. Every choice of produces a fused guess with some leftover uncertainty . Because the two error sources are independent, their variances add after weighting:
WHY these weights. The prior's error survives scaled by (we kept a fraction of it); the measurement's error enters scaled by (we let in a fraction of it). Squaring turns "scaled error" into "scaled variance." No cross term, because the two noises are independent.
PICTURE. Plot against . It is a smiling parabola (a valley). Far left (): , all prior uncertainty. Far right (): , all measurement uncertainty. Somewhere in the middle sits the lowest point — the best .

Step 6 — Slide to the bottom of the valley → the gain formula
WHAT. At the very bottom of a smooth valley, the ground is momentarily flat: the slope is zero. The slope of with respect to is written (a derivative — it answers "how fast does change as I nudge ?"). Set that slope to zero.
WHY the derivative and not something else. We need the turning point of the parabola. The derivative is exactly the tool that reports the local slope; where it hits zero is where the curve stops falling and starts rising — the minimum. No other tool pinpoints a bottom so directly.
PICTURE. The same parabola with a flat tangent line touching its lowest point, and a dashed line dropping to the -axis marking .

Solve for (divide by 2, expand, gather ):
Step 7 — The fused width, and why "information adds"
WHAT. Put back into the parabola. After algebra it collapses to the clean bottom-value:
WHY this is beautiful. Flip every variance into its reciprocal — call that precision (bigness of certainty). The last equation says: precisions simply add. Two clues → add their information → the fused hill is always sharper than both parents.
PICTURE. Three horizontal "certainty bars": prior precision , sensor precision , and their sum — the fused bar is literally the two stacked end to end.

Step 8 — The edge cases (nothing should surprise you)
WHAT & WHY. A formula you trust must survive every extreme. Walk the corners of :
| Situation | becomes | Meaning |
|---|---|---|
| Perfect sensor, | Walk all the way — believe the measurement entirely. Fused . | |
| Useless sensor, | Don't move — keep the old guess. Fused . | |
| Perfectly sure already, | Ignore the sensor — we can't improve on certainty. | |
| Totally lost, | Grab the sensor with both hands. | |
| (equal trust) | Split the difference — plain average. |
PICTURE. The trust-fraction plotted as sweeps from to large, for a fixed : a smooth curve falling from down toward , passing through exactly where .

The one-picture summary
Everything above is one loop: Predict (guess drifts, hill widens by ) → compute gain (bottom of the valley) → Update (walk toward the measurement, hill narrows). Then repeat.

Recall Feynman retelling — the whole walk in plain words
Picture your belief about the drone's angle as a hill on a line: the peak is your best guess, the width is how unsure you are. You get a second hill from a sensor — a different peak, its own width. To combine two honest hills you multiply them, which magically gives a third hill sitting between the peaks, narrower than both — because two clues always beat one. Now, where exactly does the new peak sit? Write it as "start at the old guess and walk a fraction toward the sensor." Every leaves you with some leftover fuzziness, and if you plot that fuzziness against you get a valley. The best is the bottom of the valley, found by asking "where is the ground flat?" — that's the derivative equals zero. Out pops : a simple trust fraction that leans toward the sensor when your own guess is shaky and toward your guess when the sensor is noisy. Flip the widths into "certainties" and the punchline appears — certainties just add. The complementary filter (see Low-pass and High-pass filters) is the same walk with a frozen ; the Kalman filter recomputes the perfect every single tick. That is the whole idea behind Attitude estimation (AHRS) and Inertial Navigation Systems, and the Extended Kalman Filter is just this walk done on curved terrain.
Recall Quick self-check
What does the innovation mean in words? ::: The "surprise" — how much the fresh measurement disagreed with our prediction. Why is the fused hill always narrower than both parents? ::: Because independent clues add certainty (precisions add), never subtract it. As sensor noise grows, does gain rise or fall? ::: It falls — we trust a shakier sensor less. Where does the optimal come from geometrically? ::: The bottom of the variance-vs- parabola, where the slope .