Handle failed coordinate syncing with EQMOD

Issue #311 resolved
Simon Kapadia created an issue

EQMod sometimes refuses to accept syncs from a NINA platesolve, if for example the “real” coordinates are further out than 15 minutes, or if it conflicts with arbitrary data in the EQMod “sync history”. When this happens, NINA knows that the Sync to coordinates has failed (we can see this from the logs) – but then it keeps on retrying ad infinitum (you can turn this off when platesolving manually, but not when NINA is autocentering during a sequence or following a meridian flip). Unfortunately further attempts to sync are unlikely to succeed once this failure happens. The logs at this point look like this:

[2019-09-13T22:32:27]      [TRACE]      [MemberName] CaptureSolveSyncAndReslew
[2019-09-13T22:32:27]      [TRACE]      [FileName] D:\Projects\nina\NINA\ViewModel\PlatesolveVM.cs
[2019-09-13T22:32:27]      [TRACE]      [Message] Solved successfully. Current Coordinates RA: 20:56:30 Dec: 31° 29' 38" Epoch: J2000

[2019-09-13T22:32:27]      [TRACE]      [MemberName] SynchronizeTelescope
[2019-09-13T22:32:27]      [TRACE]      [FileName] D:\Projects\nina\NINA\ViewModel\PlatesolveVM.cs
[2019-09-13T22:32:27]      [TRACE]      [Message] Trying to sync to coordinates - RA: 20:57:20 Dec: 31° 34' 22"

[2019-09-13T22:32:27]      [WARNING]      [MemberName] SynchronizeTelescope
[2019-09-13T22:32:27]      [WARNING]      [FileName] D:\Projects\nina\NINA\ViewModel\PlatesolveVM.cs
[2019-09-13T22:32:27]      [WARNING]      [Message] Sync to coordinates failed

[2019-09-13T22:32:27]      [TRACE]      [MemberName] CaptureSolveSyncAndReslew
[2019-09-13T22:32:27]      [TRACE]      [FileName] D:\Projects\nina\NINA\ViewModel\PlatesolveVM.cs
[2019-09-13T22:32:27]      [TRACE]      [Message] Telescope not inside tolerance. Tolerance: 1; Error Distance: 7.95579376904888 - Repeating...

When this happens, the only “fix” for it currently requires manual intervention – you need to go to the EQMod application and hit the button on the advanced panel to clear stored sync information. From experience, the next sync from NINA will be accepted, even if it is significantly out compared to where the mount thinks it is.

There are a couple of approaches to fixing this. We could stop retrying and put up an error message to the user that they need to manually intervene. However this isn’t all that useful during automated operation 🙂. Perhaps there could be some kind of external notification (wouldn’t it be nice if we could get NINA to send say a text message or email?). Another other option is to “hope” that the location is not too far off and keep imaging, after displaying a warning (note: display the warning clearly, don’t just dump it in the log). This might be better, as the images may still be usable (better to have tried and saved than to have completely not taken any images and wasted cloudless skies!).

I have a suggestion for another option, which might be possible but would require investigation. The EQMod documentation for its ASCOM driver is available here:

http://eq-mod.sourceforge.net/docs/EQASCOM_compliancy.pdf

From that documentation, it seems that it should be possible to use the EQASCOM “CommandString Interface” (which appears to be an ASCOM extension available to ASCOM client code) to automatically clear the sync information:

Function          –  Clear sync
Command String    –  :ALIGN_CLEAR_SYNC#
EQASCOM Responds  –  1# (success) 0# (failure)

So perhaps the right approach would be to optionally invoke this CommandString if we get a failed Sync, and then try the sync again?

-simon

Comments (1)

  1. Stefan B repo owner

    Nightly 57 will check if a sync failes or did not work and use offset calculation to recenter instead of using sync.

  2. Log in to comment