My futuristic variant is that around a static magnet there are sections of coils (or a magnetic screens with a Foucault current) with compensation of the magnetic field in the opposite direction.
My last guess before going to bed was that there are three electromagnets facing different directions. They turn on one after another. The magnetic sensor measures each value over synced time. The software calculates the triangulation from these values.
Do you mechanically rotate a large neodymium magnet?