MAD simulator
Fly a total-field magnetometer past a magnetic dipole. Set the magnetic latitude, target, geometry and noise, then see the anomaly, the plan-view field and what an Anderson-function detector makes of it.
What the magnetometer records
Total-field anomaly along the track, centred on the closest point of approach.
Anderson-function detector
Energy in the three Anderson basis functions, normalised by the noise. A detection is declared where it crosses the threshold.
Plan view at sensor height
Total-field anomaly in the horizontal plane the sensor flies through. Blue is negative, teal positive; north is up.
How it works
The target is a point dipole. Its field is B = (μ0/4π)[3(m·r̂)r̂ − m]/r³, and a total-field sensor records its projection onto the Earth's field direction, ΔT ≈ B·F̂. That projection is why the same target gives a different-looking signature at every latitude and heading.
For a straight pass, every possible signature is a combination of three Anderson functions uk/(1 + u²)5/2, k = 0, 1, 2, with u the along-track distance divided by the range at closest approach. The detector slides a window along the record, projects the data onto those three functions (after removing a local linear trend), and sums the squared coefficients. For white noise that statistic is χ² with three degrees of freedom, which sets the threshold for the chosen false-alarm probability. The window is matched to the true CPA range here; a real system runs a bank of windows.
Noise is synthesised as white sensor noise, a 1/f component built from a bank of first-order filters, and slowly varying platform residual. Because coloured noise is not white, the realised false-alarm rate will differ from the nominal one. Re-run the noise a few times to get a feel for it.