×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

GPS date and time wrong

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic GPS date and time wrong

Hi Nigel,
I configure it through INDI, but I did some commands in the comando window, set it to NEMA mode and pointed it to correct port, is that NTP or INDI ?

I have tested it more now. I can see that the time is corrected but normally not the date. But this evening it even corrected the date. When started the date was 6th but when GPS update it was set to 9th which is correct. I have no explanation why it sometimes only correct the time and sometimes both time and date. For me it takes about 5 minutes until it lock on satellites and get a stable location and time. It doesn't matter for me because it takes an hour to cool down the optics.

/Lars
1 year 1 week ago #91844

Please Log in or Create an account to join the conversation.

  • Posts: 155
  • Thank you received: 12
Hi Lars

I think you can ignore what I was saying as I’ve checked the astroberry source and it configures chrony (which it uses in place of ntp) to get the date/time from the gps :-

# Set chrony to update time from GPS
if [ -e /etc/chrony/chrony.conf ] && [ -z "$(grep 'refclock SHM 0 offset 0.5 delay 0.2 refid GPS' /etc/chrony/chrony.conf)" ]; then
echo "refclock SHM 0 offset 0.5 delay 0.2 refid GPS" >> /etc/chrony/chrony.conf
fi
1 year 1 week ago #91871

Please Log in or Create an account to join the conversation.

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic GPS date and time wrong

Hi Nigel,
Sorry to ask so much, but do you type that command once and after that it always use chrono ? I haven't got it to work yet.

And one more question, does it only set the KStars time and date or does it also correct the Raspberry clock time and date ?

I have now got the KSTars clock and time correct, but it's the offset from the Raspberry clock. Raspberrys clock still wrong and then also the time stamp of the photo files. I don't understand why KStars take the Raspberry clock and not it's own time which is correct.

/Lars
11 months 4 weeks ago #92273

Please Log in or Create an account to join the conversation.

  • Posts: 155
  • Thank you received: 12
Hi

that command was from the astroberry setup scripts, you don’t need to type that in. Check the file /etc/chrony/chrony.conf to see if that line is there, also check that chrony is running using sudo systemctl status chrony (I believe that’s the correct systemctl command).

If chrony is configured and running then it should be picking up updates from gpsd using the shared memory interface. These updates will then enable it to correct the system time of the raspberry. This is all outside of ekos/kstars/indi. There are commands that can show whether the updates are being seen at least for ntp and I would expect for chrony (chrony and ntp do similar jobs it’s just one of those linux choice things ). Note if you are connecting the raspberry to a network with internet access it’s quite possible that chrony will get the date/time from an internet time server which is what my system does now. There are commands (again at least for ntp but I expect the same for chrony) that show which source it has decided to use as you can configure a priority to each source.

There’s a diagram somewhere in the astroberry faqs showing how the gps system hangs together I believe.

Regards

Nigel
11 months 4 weeks ago #92276

Please Log in or Create an account to join the conversation.

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic GPS date and time wrong

Now we have come to the dark period in Sweden and I can start test the changes I have done.

With help of the Crony time handler I at last got thing to work. I got a lot of help for this, from here and friends. Now I can use the equipment outside the internet range and let the GPS sync the system clock. Earlier it only synched the KStars cloc and it caused some problem when polar align the mount. I have updated my instructions to this new setting, not much is changed, most important was the option "-n" in GPSD. It must be set to have Chrony to work as suppused. This is the normal setting but I had changed it to "" according instructions, but that was for Astroberry before version 2.0.1, from version 2.0.1 Astroberry use Chrony as standard. At least I think this is how it works.

Here is my instructions:
www.astrofriend.eu/astronomy/projects/project-heq5/07-heq5.html

Next problem to solve, how to sync the clock in a DSLR Canon camera. It looks that it's possibly in the Ekos settings. But for that problem I start a new thread.

Lars
Last edit: 7 months 2 weeks ago by Lars.
7 months 2 weeks ago #95322

Please Log in or Create an account to join the conversation.

Moderators: Radek Kaczorek
Time to create page: 0.513 seconds