I have another post on this issue, but just saw this.

I have Sherlocked that a c++ function that convert time to epoch set the DST parameter to inactive. I do not have a confirmation that this is the case though, just a find in the driver (lx200 driver).

This suggests (for me at least) that the time from the mount is correct when DST is inactive.

My suggestion is try to use Julian Day instead, in this case: Convert mount time to julian->Add UTC offset (in Julian hours)->Convert back to gregorian. Need to be tested if DST also is an issue with Julian Day though.

Mount is Meade EXT90

Read More...

Just an idea,

if the c++ mktime is causing trouble because it need DST info, eventually Julian Day can be used instead?

I.e. the current code is calculating UTC, this can perhaps be done like this:

- get local time from the mount
- get date from the mount
- get utc-offset from the mount

- calculate Julian day from local time and date above
- add utc-offset (converted to julian hours)
- reverse the Julian day calculation back to Gregorian time and date and the returned time is UTC

this calculation is mount independent

Read More...

Hi again,

the logs show that the GH command is sent, but I get no response in the RES tag:
...
SCOPE 8.496287 sec : CMD <:GG#>
SCOPE 8.511057 sec : RES <-02>
SCOPE 8.511228 sec : VAL [-2]
SCOPE 8.511298 sec : CMD <:GL#>
SCOPE 8.532468 sec : RES <17:43:19>
SCOPE 8.532602 sec : VAL [17.7219]
SCOPE 8.532703 sec : <getCalendarDate>
SCOPE 8.532739 sec : CMD <:GC#>
SCOPE 8.552438 sec : RES <04/10/23>
SCOPE 8.552566 sec : CMD <:GH#>
DEBUG 13.566517 sec : Mount controller UTC Time: 2023-04-10T16:43:19
DEBUG 13.570088 sec : Mount controller UTC Offset: 2.00
SCOPE 13.570227 sec : CMD <:GVD#>
SCOPE 13.596546 sec : RES <Apr 03 2007>

I have some python code, that get a value from :GH# - in this code as a bool that is true - so the GH is supported in my mount,

Best Regards,
Martin

Read More...

Hi Jasem,

first attempt with this version gives same result,

will troubleshoot, as this is my first compile on astroberry :-)

I post back when I have more info,

Cheers,
Martin

Read More...

Hi Jasem,

thanks for the reply :-)

If I understand your question correctly, the DST setting can be obtained from the mount with the command (the 2010 serial meade protocol):
:GH# Get Daylight Savings Time Setting [Autostar II only]
Returns:
1# if daylight savings is enabled.
0# if daylight savings time is disabled.

After reading up on the mktime c++ function, it seems that tm_isdst can be set to -1 when dst is undefined, 0 when dst is inactive and 1 when dst is active,

Best Regards,
Martin

Read More...

Hi all,

new to this forum!

I can find several posts with 'one-hour-off' issues, and I have the same issue with my Meade ETX90.

I get around this by changing the INDI settings in KStars (to not touch date/time in the mount), but I have spent way too many hours finding this issue.

Think I have narrowed it down a bit below, by testing the UTC calculation when DST is active, and when it is inactive.

The test show that DST active, gives a one hour off calculation, whereas DST inactive, gives a correct calculation.

The calculation is performed in lx200telescope.cpp

I'm not a c++ programmer, so I'm not able to create a patch.


The test is:


Location: Denmark
Timezone: GMT+1
Timeformat: 24
Local time - yyyy-mm-ddThh:mm:ss: 2023-04-06T10:01:38
DST is active
UTC is - yyyy-mm-ddThh:mm:ss: 2023-04-06T08:01:38
INDI settings in KStars: Mount Updates KStars. Time and Location checkboxes are checked.


:GG# is: Get UTC offset time
:GL# is: Get Local Time in 24 hour format
:GC# is: Get current date

KStars log show:
[2023-04-06T10:01:40.502 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GG#> "
[2023-04-06T10:01:40.502 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <-02> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [-2] "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GL#> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <10:01:38> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [10.0272] "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] <getCalendarDate> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GC#> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <04/06/23> "
[2023-04-06T10:01:40.504 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Time: 2023-04-06T09:01:38 "
[2023-04-06T10:01:40.504 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Offset: 2.00 "


i.e. the calculation of UTC from local time, is one hour off, it should read: 2023-04-06T08:01:38

Right after this has been calculated, KStars updates the local time to 11:01:38, where local time is actually 10:01:38.


Doing the same test when DST is not active, correctly gives:
Location: Denmark
Timezone: GMT+1
Timeformat: 24
Local time - yyyy-mm-ddThh:mm:ss: 2023-02-06T10:01:17
DST is inactive
UTC is - yyyy-mm-ddThh:mm:ss: 2023-02-06T09:01:17
INDI settings in KStars: Mount Updates KStars. Time and Location checkboxes are checked.

KStars log show:
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GG#> "
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <-01> "
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [-1] "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GL#> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <10:01:17> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [10.0214] "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] <getCalendarDate> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GC#> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <02/06/23> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Time: 2023-02-06T09:01:17 "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Offset: 1.00 "



The calculation takes place in:
github.com/indilib/indi/blob/602be288b3a...e/lx200telescope.cpp

in the function: bool LX200Telescope::sendScopeTime()

and I assume it is the snippet:

ltm.tm_isdst = 0;
// Get local time epoch in UNIX seconds
time_epoch = mktime(<m);

that always sets DST to inactive (ltm.tm_isdst = 0).

Regards,
MBantz

Read More...

Hi all,

new to this forum - hmm. I don't seem to be able to reply to forum posts yet. Well:

I can find several posts with 'one-hour-off' issues, and I have the same issue with my Meade ETX90.

I get around this by changing the INDI settings in KStars (to not touch date/time in the mount), but I have spent way too many hours finding this issue.

Think I have narrowed it down a bit below, by testing the UTC calculation when DST is active, and when it is inactive.

The test show that DST active, gives a one hour off calculation, whereas DST inactive, gives a correct calculation.

The calculation is performed in lx200telescope.cpp

I'm not a c++ programmer, so I'm not able to create a patch.


The test is:


Location: Denmark
Timezone: GMT+1
Timeformat: 24
Local time - yyyy-mm-ddThh:mm:ss: 2023-04-06T10:01:38
DST is active
UTC is - yyyy-mm-ddThh:mm:ss: 2023-04-06T08:01:38
INDI settings in KStars: Mount Updates KStars. Time and Location checkboxes are checked.


:GG# is: Get UTC offset time
:GL# is: Get Local Time in 24 hour format
:GC# is: Get current date

KStars log show:
[2023-04-06T10:01:40.502 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GG#> "
[2023-04-06T10:01:40.502 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <-02> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [-2] "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GL#> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <10:01:38> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [10.0272] "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] <getCalendarDate> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GC#> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <04/06/23> "
[2023-04-06T10:01:40.504 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Time: 2023-04-06T09:01:38 "
[2023-04-06T10:01:40.504 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Offset: 2.00 "


i.e. the calculation of UTC from local time, is one hour off, it should read: 2023-04-06T08:01:38

Right after this has been calculated, KStars updates the local time to 11:01:38, where local time is actually 10:01:38.


Doing the same test when DST is not active, correctly gives:
Location: Denmark
Timezone: GMT+1
Timeformat: 24
Local time - yyyy-mm-ddThh:mm:ss: 2023-02-06T10:01:17
DST is inactive
UTC is - yyyy-mm-ddThh:mm:ss: 2023-02-06T09:01:17
INDI settings in KStars: Mount Updates KStars. Time and Location checkboxes are checked.

KStars log show:
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GG#> "
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <-01> "
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [-1] "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GL#> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <10:01:17> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [10.0214] "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] <getCalendarDate> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GC#> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <02/06/23> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Time: 2023-02-06T09:01:17 "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Offset: 1.00 "



The calculation takes place in:
github.com/indilib/indi/blob/602be288b3a...e/lx200telescope.cpp

in the function: bool LX200Telescope::sendScopeTime()

and I assume it is the snippet:

ltm.tm_isdst = 0;
// Get local time epoch in UNIX seconds
time_epoch = mktime(<m);

that always sets DST to inactive (ltm.tm_isdst = 0).

Regards,
MBantz

Read More...

Hi all,

new to this forum :-)

I can find several posts with 'one-hour-off' issues, and I have the same issue with my Meade ETX90.

I get around this by changing the INDI settings in KStars (to not touch date/time in the mount), but I have spent way too many hours finding this issue.

Think I have narrowed it down a bit below, by testing the UTC calculation when DST is active, and when it is inactive.

The test show that DST active, gives a one hour off calculation, whereas DST inactive, gives a correct calculation.

The calculation is performed in lx200telescope.cpp

I'm not a c++ programmer, so I'm not able to create a patch.


The test is:


Location: Denmark
Timezone: GMT+1
Timeformat: 24
Local time - yyyy-mm-ddThh:mm:ss: 2023-04-06T10:01:38
DST is active
UTC is - yyyy-mm-ddThh:mm:ss: 2023-04-06T08:01:38
INDI settings in KStars: Mount Updates KStars. Time and Location checkboxes are checked.


:GG# is: Get UTC offset time
:GL# is: Get Local Time in 24 hour format
:GC# is: Get current date

KStars log show:
[2023-04-06T10:01:40.502 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GG#> "
[2023-04-06T10:01:40.502 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <-02> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [-2] "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GL#> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <10:01:38> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [10.0272] "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] <getCalendarDate> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GC#> "
[2023-04-06T10:01:40.503 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <04/06/23> "
[2023-04-06T10:01:40.504 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Time: 2023-04-06T09:01:38 "
[2023-04-06T10:01:40.504 CEST DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Offset: 2.00 "


i.e. the calculation of UTC from local time, is one hour off, it should read: 2023-04-06T08:01:38

Right after this has been calculated, KStars updates the local time to 11:01:38, where local time is actually 10:01:38.


Doing the same test when DST is not active, correctly gives:
Location: Denmark
Timezone: GMT+1
Timeformat: 24
Local time - yyyy-mm-ddThh:mm:ss: 2023-02-06T10:01:17
DST is inactive
UTC is - yyyy-mm-ddThh:mm:ss: 2023-02-06T09:01:17
INDI settings in KStars: Mount Updates KStars. Time and Location checkboxes are checked.

KStars log show:
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GG#> "
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <-01> "
[2023-02-06T10:01:18.677 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [-1] "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GL#> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <10:01:17> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] VAL [10.0214] "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] <getCalendarDate> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] CMD <:GC#> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[SCOPE] RES <02/06/23> "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Time: 2023-02-06T09:01:17 "
[2023-02-06T10:01:18.678 CET DEBG ][ org.kde.kstars.indi] - ETX90 : "[DEBUG] Mount controller UTC Offset: 1.00 "



The calculation takes place in:
github.com/indilib/indi/blob/602be288b3a...e/lx200telescope.cpp

in the function: bool LX200Telescope::sendScopeTime()

and I assume it is the snippet:

ltm.tm_isdst = 0;
// Get local time epoch in UNIX seconds
time_epoch = mktime(<m);

that always sets DST to inactive (ltm.tm_isdst = 0).

Regards,
MBantz

Read More...