KronTalk

Chronos => Chronos User Discussion => Topic started by: Matom on August 01, 2018, 12:22:21 AM

Title: NTP for precise timing
Post by: Matom on August 01, 2018, 12:22:21 AM
Dear All,

I am using the camera for scientific purposes and I need precise timing. Ideally I would like to install ntp (network time protocol) and use it to synchronize the camera time to my computer which is connected to a GPS. I am trying to find a ntp package already compiled for the camera processor type (armv7l), but so far, no luck.

Do any of you have experience with this or other methods for precise timing on the camera?

Cheers, Maja
Title: Re: NTP for precise timing
Post by: Tabatha_Hughes on August 02, 2018, 03:17:19 PM
Hiya there,
We have had NTP working with Debian, not the current Arago. So in the next few months it could be possible. For now, I will see if our software engineers have a work around.
Title: Re: NTP for precise timing
Post by: NiNeff on August 03, 2018, 07:25:24 AM
You could just connect via the USB to Ethernet bridge and use the date command (http://linuxcommand.org/lc3_man_pages/date1.html) to set the time/ date from another machine which has NTP sync. Since you already want to use your computer with GPS this should be relatively easy.
Title: Re: NTP for precise timing
Post by: Matom on August 03, 2018, 07:51:50 AM
Thank you both for the answers.

NiNeff, do you have experience with the delay/accuracy with this method?
Title: Re: NTP for precise timing
Post by: NiNeff on August 03, 2018, 08:31:53 AM
I think you can easily get within a few tenths of a second using the setting of the clock via commandline using a script. If you measure the responsetime of your connection you should be able to sync the time to within a few hundredths of a second compared to your reference pc. You'd need to do this quite regulary to compensate for drift however. If you need the accuracy to be very high you might just wait for NTP insted of hacking your own solution together which would just recreate the functionality ;)
A quick qoogeling reveals NTP usually is within 10 milliseconds over the "open" internet and can go down to microseconds using a special kernel and a local time reference as well as a stable oscillator.
This can get as complicated as you'd like, especially in a research environment  :P
I'm pretty sure the cameras systemclock is only used for timestamping your saved videos, so +/- a few seconds should suffice there.

EDIT: if you really need precision, maybe look into PTP (http://"https://en.wikipedia.org/wiki/Precision_Time_Protocol") instead of NTP