GY-271 (QMC5883L) via ESP32-DevKitM-1 — Web Serial
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.
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.