indilib / indi

INDI Core Library Repository
https://www.indilib.org
GNU Lesser General Public License v2.1
377 stars 394 forks source link

Celestron GPS, incorrect handling of time and DST #2140

Open jojje70 opened 1 month ago

jojje70 commented 1 month ago

Describe the bug There is a bug in how the Celestron GPS driver for CG-5 handles time. If you set "current time" + set "Daylight Saving" instead of "Standard Time" in the handcontroller, the mount and Ekos will not agree when a Meridian Flip should take place. Ekos is ahead of the mount in time, and it seems to be about 2 hours (30 degrees azimuth).

A workaround is to set the handcontroller to use Standard Time, regardless of whether it is daylight saving time or not, and subtract one hour when entering the current time. The corresponding time also needs to be manually set in the operating system for Ekos so that these are compliant. However, the workaround doesn't work if you use the Stellarmate APP to control the mount. I suppose it doent´t work because the correct time is synced via GPS and not set with a -1 hour manually in the OS.

This applies to CG-5 with firmware: HC GEM 4.22 and MC 5.20, 5.20

To Reproduce Startup the mount, set:

Startup Stellarmate on Raspberry Pi

When HA>5 Ekos will start sending Gotos, but the mount will not agree its time and the Goto command repeats (i suppose it will try until the mounts azimuth is near RA Limit, and in this case it is a 30 degree diff)

Mount Azimuth when Ekos tries to Meridian Flip: 156 53'00" Mount RA West Limit: -6 (+186 degrees Azimuth) Mount RA East Limit: -6 (+354 derees Azimuth)

Expected behavior Mount and Ekos should agree when its time for Meridian Flip.

Desktop (please complete the following information):

**Logfiles Incorrect handling of time and an incomplete Meridian Flip: log_19-07-54.txt Workaround handling of time and an complete Meridian Flip: log_20-02-10.txt

log_19-07-54.txt log_20-02-10.txt