Compass calibration plotter

GY-271 (QMC5883L) via ESP32-DevKitM-1 — Web Serial

Web Serial API not supported. Use Chrome or Edge (desktop).
Disconnected
Heading
degrees
Direction
cardinal
Samples
0
points

Raw X/Y during calibration

Without calibration the data forms an ellipse offset from the origin — caused by hard-iron distortion from nearby electronics. A perfect sensor would produce a circle centred at (0,0). The calibration computes offsets and scale factors to correct this.

Heading over time (post-calibration)

After calibration, heading is derived via atan2(y, x) — a non-linear arctangent function. Small changes in X/Y near 180° produce large heading jumps while changes near 0/90° are more gradual. The 359° to 0° wrap discontinuity is expected behaviour.