Astroberry configuration and accurate times

  • Posts: 184
  • Thank you received: 13
I am taking images and would like to ensure the time captured in the FITS file is accurate.  I notice astroberry default install isn't set up to use NTP servers. Timedatectl reports NTP Service: Inactive.
Should I install NTP and configure to get time from specific NTP servers or is the default configuration sufficiently accurate? 
2 years 11 months ago #76956

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

  • Posts: 3
  • Thank you received: 1
Hi David,

I understand that Astroberry uses "chrony", not ntpd, for the NTP protocol.  "sudo systemctl status chronyd" should show if this service is running.
chrony is running on my astroberry but timedatectl does indeed report "NTP Service: Inactive".  I do not know why this is.

Anyway, as the regular Raspberry Pi has no battery backed realtime clock, the date would default to 1970-01-01 on power up without an NTP client running and/or without network connection.
If you have a valid date/time and no battery realtime clock added, ntp must be running
Note: commercial RPi based astrocomputers will typically add a battery backed RTC  - valid date time is then no indication of running NTP. I have added a DS3231 based realtime clock to my  RPi (connects via I2C). for portable, off grid use.

As for accuracy: Without NTP the RPi clock is based on the processors crystal oscillator which is not temperature compensated. Time will drift with seconds per day. The DS3231 based RTC that I use, has a temperature compensated oscillator which (from memory) should drift less than a second per month. With NTP available, accuracy depends on many factors but will typically keep your clock within 10 of ms, but may drift up to 100 ms in congested, high latency networks. If time accuracy requirements are more strict (asteroid occultation measurements?) you could use GPS as a highly accurate local time source,

If you are going to use a GPS device , please note that USB3 signals can cause significant interference with the GPS signal (just as the widely reported interference that USB3 causes with 2,4GHz Wifi). I use a GPS dongle and place it as far as possible from RPi and USB3 cabels and camera. Even then I sometimes need to disconnect my USB3 camera to get initial GPS lock - but that is topic for another discussion.

Hope this helps,
Erik
 


 
2 years 11 months ago #76967

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

  • Posts: 184
  • Thank you received: 13
Hi Erik. Yes your reply helps. Thanks for the tips. 'sudo systemctl status chronyd' indicates the clock is set on boot up and IP addresses of 3 servers are referenced. I am no expert but from I have read chronyd seems appropriate for an Astroberry client and is a later development to NTP although it uses the underlying NTP protocol. I normally turn off the raspberry pi after an observing session so it boots up regularly and must set the clock each time. I don't know how often chronyd checks when Pi is running? I guess there is a log that captures when the time is adjusted or a config setting that specifies how often it checks or maybe it works this out for itself based on how fast it drifts. Anyway I am assuming the system adjusts the time and doesn't drift with the crystal and I would have hoped the Astroberry developers would have flavoured raspberry with the best set up? It's just a case how accurate . To fractions of a second I hope.

The other factor possibly more significant is how accurate the fits file captures the start of the exposure because this is the time used in later analysis.

I have an observatory so don't change location but I notice Ekos does have GPS and interested in your suggestion of using a GPS dongle. Will it give me significantly more accurate time?
2 years 10 months ago #76989

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

Astroberry configuration and accurate times - INDI Forum
  • Posts: 348
  • Thank you received: 69

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

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

  • Posts: 348
  • Thank you received: 69
The common USB GPS dongles will not supply time in an accurate way (to the nearest second), you need a more expensive GPS with a different port for GPSD to supply time accurately to ntpd/chronyd.
The following user(s) said Thank You: David Bennett
2 years 10 months ago #76994

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


×

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

Bi-monthly release with minor bug fixes and improvements

  • Posts: 348
  • Thank you received: 69

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

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

  • Posts: 3
  • Thank you received: 1
Giles, thank you for the useful pointers to chronyc commands. According to the man pages  "An absolute bound on the computer's clock accuracy (assuming the stratum-1 computer is correct) is given by: clock_error <= |system_time_offset| + root_dispersion + (0.5 * root_delay)"

With your sample output of the "watch chronic tracking" command the absolute bound clock error appears to be: 23,6 ms. I just tested with my RPi and end up with similar order of magnitude values: approx 13.1 ms after 30 min uptime, improving to 10.8ms after 75 min of uptime. So indeed the order of 10ms magnitude that can be expected with NTP over a good nework connection (and nobody watching netflix here at the moment :-).

David, I should have clarified that I choose the RTC and a GPS dongle primarily because I have a portable setup with NTP connection not easily available and I am fine with a time error of a second or so. I configured EKOS that the mount gets time and location information from GPSD as a convenience. The RTC will be synchronized by NTP every time I do have a network connection.

I have been looking into using GPS as an accurate local time source but as Giles points out, this will not work with a serial GPS dongle.  A GPS hat that also makes an accurate 1s time pulse available on an GPIO pin should work though - see for example this project github.com/domschl/RaspberryNtpServer. In my setup that would require a different case and then there is the concern of USB3 interference I mentioned so I have not yet pursued this.

In your case I would first check if your  NTP time synchronization over your network is good enough for you.  If this is not sufficiently accurate, given that you are on a network, you could setup a GPS based time server in any convenient location on your network (based on another RPi or  otherwise) away from any interference  and then configure the RPi in your observatory to use this as one time source.
2 years 10 months ago #77004

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

  • Posts: 184
  • Thank you received: 13
With the information received I will go and make some checks now Eric. Thanks.
2 years 10 months ago #77009

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

  • Posts: 983
  • Thank you received: 375

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

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

Moderators: Radek Kaczorek
Time to create page: 0.362 seconds