Magnetic declination command - smart-underworld/seestar_alp GitHub Wiki

Seestar has a bug with compass calibration.

If you image in an area where the magnetic north is not pointing due North, you will have issues. This manifests itself when you try to find the Moon or the Sun in daylight, where Seestar uses the compass to orient itself.

The problem is that it will wrongly determine how North is oriented. This is called Magnetic Declination.

To fix this, I implemented the magnetic declination command that will use your site location specified in Alp, do a lookup to determine the current offset of where true North is, and apply that to the result from compass calibration.

The result from mag declination command will persist after reboot. Therefore it should only be called after a new compass calibration. In fact, if you call it repeatedly, it will contaminate the calculation.

You should redo compass calibration if your setup changed or if new magnetic or metal objects are introduced or removed nearby