GPS time synchronization with several Pi's at different locations.


Jeff Estal
 

I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.

I have a cheap gps-usb device from Amazon and have been recieving data from it with python, but the time data only displays seconds always with .00 for any portion of the seconds which seems odd.

How might i approach this?
Is certain hardware better or worse?
When data is pulled from a gps device, is there timing considerations as to when to get the data or when to store it?
I"d probably need to also have a realtime clock to update.

thanks,


 

You want GPS with PPS like the DRAWS™ HAT (see: http://NWDigitalRadio.com/draws)

Or a GPSDO

On Tue, Oct 15, 2019, 18:54 Jeff Estal <jeff.estal@...> wrote:
I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.

I have a cheap gps-usb device from Amazon and have been recieving data from it with python, but the time data only displays seconds always with .00 for any portion of the seconds which seems odd.

How might i approach this?
Is certain hardware better or worse?
When data is pulled from a gps device, is there timing considerations as to when to get the data or when to store it?
I"d probably need to also have a realtime clock to update.

thanks,


Willem Schreuder
 

On Tue, 15 Oct 2019, Jeff Estal wrote:

I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.
pico second accuracy is not realistic. Light travels one third of a millimeter in a picosecond. You can get down to microsecond range, but you need to worry about wire lengths, capacitance of lines, and such things. And a cheap gps may not cut it.

You also need very high frequency stability and temperature compensation on things like the CPU and clock.

That said, an rPi does make a good device for GPS slaved time sources, and can probably get you into the 10-100 microseconds rang, but if you really need nano or pico second precision you will need MUCH more sophisticated hardware.

73 -Willem

================================================================
Dr. Willem A. Schreuder, President, Principia Mathematica
Address: 445 Union Blvd, Suite 230, Lakewood, CO 80228, USA
Tel: (303) 716-3573 Fax: (303) 716-3575
WWW: www.prinmath.com Email: Willem.Schreuder@prinmath.com


Max
 

Why on earth would you recommend a $150 product just to get a GPS? While the DRAWS Hat is nice, it's way overpriced for what it does!

Max KG4PID 

On Tuesday, October 15, 2019, 09:09:13 PM CDT, John D Hays - K7VE <john@...> wrote:


You want GPS with PPS like the DRAWS™ HAT (see: http://NWDigitalRadio.com/draws)

Or a GPSDO

On Tue, Oct 15, 2019, 18:54 Jeff Estal <jeff.estal@...> wrote:
I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.

I have a cheap gps-usb device from Amazon and have been recieving data from it with python, but the time data only displays seconds always with .00 for any portion of the seconds which seems odd.

How might i approach this?
Is certain hardware better or worse?
When data is pulled from a gps device, is there timing considerations as to when to get the data or when to store it?
I"d probably need to also have a realtime clock to update.

thanks,


Max
 

You can't just read the time and expect it to be exact. You need to run something like NTP to set the system clock from the GPS. Even then NTP has to run for a while to be accurate. Here is output from ntpq -p on my time server.

*SHM(1)          .PPS.            0 l   33   64   377   0.0000   0.0049   0.1355
xSHM(0)          .GPS.            0 l    9   64   377   0.0000 -164.881   2.9651
+time-a-g.nist.g .NIST.           1 u   45   512  377  52.8595  -0.3803   0.9560
-time-a-wwv.nist .NIST.           1 u   32   512  377  71.1654   0.1656   1.6690
+time-a-b.nist.g .NIST.           1 u   20   512  377  70.2103   0.0453   0.4452
-time-e-wwv.nist .NIST.           1 u   34   512  377  74.7242  -1.8691   0.9848

The system clock is currently 0.0049 milliseconds or 4.9 microsecomds from being the exact time. But note it won't always be this accurate and will vary. One thing that varies greatly between GPSs is when the PPS pulse is generated in relationship to the serial data. But NTP figures that out. Also the more time sources NTP has the more accurate it will be. There are also other programs that will do the same thing.


Max KG4PID


On Tuesday, October 15, 2019, 08:54:24 PM CDT, Jeff Estal <jeff.estal@...> wrote:


I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.

I have a cheap gps-usb device from Amazon and have been recieving data from it with python, but the time data only displays seconds always with .00 for any portion of the seconds which seems odd.

How might i approach this?
Is certain hardware better or worse?
When data is pulled from a gps device, is there timing considerations as to when to get the data or when to store it?
I"d probably need to also have a realtime clock to update.

thanks,


 

If one chooses a different product, the key is PPS. If the DRAWS™ HAT set of features are not wanted, there are other PPS solutions from folks like Adafruit's Ultimate GPS HAT, which also provide PPS. 

NTPD to remote hosts are a lower Stratum than a GPS with PPS. 

On Tue, Oct 15, 2019, 21:06 Max via Groups.Io <kg4pid=yahoo.com@groups.io> wrote:
Why on earth would you recommend a $150 product just to get a GPS? While the DRAWS Hat is nice, it's way overpriced for what it does!

Max KG4PID 

On Tuesday, October 15, 2019, 09:09:13 PM CDT, John D Hays - K7VE <john@...> wrote:


You want GPS with PPS like the DRAWS™ HAT (see: http://NWDigitalRadio.com/draws)

Or a GPSDO

On Tue, Oct 15, 2019, 18:54 Jeff Estal <jeff.estal@...> wrote:
I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.

I have a cheap gps-usb device from Amazon and have been recieving data from it with python, but the time data only displays seconds always with .00 for any portion of the seconds which seems odd.

How might i approach this?
Is certain hardware better or worse?
When data is pulled from a gps device, is there timing considerations as to when to get the data or when to store it?
I"d probably need to also have a realtime clock to update.

thanks,


Ray Wells
 

Having recently set up a RPi/GPS for the purpose of making a time server I learned that getting really accurate results requires more than just marrying a GPS to the RPi. For the record I wasn't after super accurate time, I only wanted to go through the exercise of seeing what I could end up with. I learned along the way that ...
1. the majority of USB GPS's are not capable of accurate time because they don't provide PPS. There are few exceptions but most convert RS232 to USB in the GPS and don't provide PPS
2. PPS is an absolute requirement for accurate time
3. Modern Linux kernels have "kernel pps" to minimise latency. Older kernels could be patched.
4. Navigation GPS units are not necessarily providers of really accurate time, timing grade GPS's are made for that purpose

My time server uses a uBlox LEA4 GPS which is not a timing standard unit, the uBlox MAX8 is MUCH better in that regard. My server is located in a steel clad shed with poor thermal stability and ntpstat currently reports 5mS accuracy, better than I need for my LAN. The RPi (model 2) is fitted with a DS2321 RTC, set up as per instructions on this site
http://www.trinityos.com/HAM/CentosDigitalModes/RPi/rpi2-setup.html

There are numerous places on the web to gather information about accurate time, hardware requirements, and instructional howtos. Many utilise the RPi.
https://www.lammertbies.nl/comm/info/GPS-time.html
https://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html
https://www.ntpsec.org/white-papers/stratum-1-microserver-howto/
https://www.febo.com/time-freq/index.html
https://en.wikipedia.org/wiki/Network_Time_Protocol

The third link above contains a link to suitable (and some unsuitable) GPS units. I followed the instructions on that site when setting up my RPi. To me, it seemed the most complete instructions ... and it worked.

Those links will answer questions you have asked, and questions you probably haven't thought about (;->)

HTH
Ray vk2tv

On 16/10/19 12:44 pm, Jeff Estal wrote:
I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.

I have a cheap gps-usb device from Amazon and have been recieving data from it with python, but the time data only displays seconds always with .00 for any portion of the seconds which seems odd.

How might i approach this?
Is certain hardware better or worse?
When data is pulled from a gps device, is there timing considerations as to when to get the data or when to store it?
I"d probably need to also have a realtime clock to update.

thanks,


Michael WA7SKG
 

Pico-seconds? Seriously? You need something like a $100k+ Cesium-beam clock to maintain that kind of accuracy. For a $35 computer? Basically unrealistic if not unobtainium.

I have worked on systems in the past (mostly classified) that required exceptional time accuracy, but even those were within a couple hundred microseconds and VERY expensive.

Really curious, however, please explain the purpose of such a beast. What on earth could possibly require that kind of time accuracy? I seriously doubt even warp speed navigation or sub-space communications needs that level of time synchronization.

Michael WA7SKG


Jeff Estal wrote on 10/15/19 6:44 PM:

I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.
I have a cheap gps-usb device from Amazon and have been recieving data from it with python, but the time data only displays seconds always with .00 for any portion of the seconds which seems odd.
How might i approach this?
Is certain hardware better or worse?
When data is pulled from a gps device, is there timing considerations as to when to get the data or when to store it?
I"d probably need to also have a realtime clock to update.
thanks,


Siegfried Jackstien
 

let me do a guess ...

time of arrival of a signal ... measured precisely on several receiving stations ... to figure out the location of the transmitter

dg9bfc sigi

ps such things are done on adsb with planes ... additionally to their sending out of the position the time is measured (can be measured)

Am 16.10.2019 um 13:12 schrieb Michael WA7SKG:

Pico-seconds? Seriously? You need something like a $100k+ Cesium-beam clock to maintain that kind of accuracy. For a $35 computer? Basically unrealistic if not unobtainium.

I have worked on systems in the past (mostly classified) that required exceptional time accuracy, but even those were within a couple hundred microseconds and VERY expensive.

Really curious, however, please explain the purpose of such a beast. What on earth could possibly require that kind of time accuracy? I seriously doubt even warp speed navigation or sub-space communications needs that level of time synchronization.

Michael WA7SKG


Jeff Estal wrote on 10/15/19 6:44 PM:
I want to synchronize multiple raspberry pi's where each has it's own gps device.
They need to be extremely accurate. Something in the pico seconds range.

I have a cheap gps-usb device from Amazon and have been recieving data from it with python, but the time data only displays seconds always with .00 for any portion of the seconds which seems odd.

How might i approach this?
Is certain hardware better or worse?
When data is pulled from a gps device, is there timing considerations as to when to get the data or when to store it?
I"d probably need to also have a realtime clock to update.

thanks,


Max
 

Both warp speed navigation and sub-space communications require much better accuracy. That is one of the first things they teach you at the academy !

Max KG4PID

On Wednesday, October 16, 2019, 08:12:17 AM CDT, Michael WA7SKG <wa7skg@...> wrote:


Pico-seconds? Seriously? You need something like a $100k+ Cesium-beam
clock to maintain that kind of accuracy. For a $35 computer? Basically
unrealistic if not unobtainium.

I have worked on systems in the past (mostly classified) that required
exceptional time accuracy, but even those were within a couple hundred
microseconds and VERY expensive.

Really curious, however, please explain the purpose of such a beast.
What on earth could possibly require that kind of time accuracy? I
seriously doubt even warp speed navigation or sub-space communications
needs that level of time synchronization.

Michael WA7SKG


Jeff Estal wrote on 10/15/19 6:44 PM:
> I want to synchronize multiple raspberry pi's where each has it's own
> gps device.
> They need to be extremely accurate. Something in the pico seconds range.
>
> I have a cheap gps-usb device from Amazon and have been recieving data
> from it with python, but the time data only displays seconds always with
> .00 for any portion of the seconds which seems odd.
>
> How might i approach this?
> Is certain hardware better or worse?
> When data is pulled from a gps device, is there timing considerations as
> to when to get the data or when to store it?
> I"d probably need to also have a realtime clock to update.
>
> thanks,