NTP Server: GPS

Started by MagikMark, January 06, 2025, 01:32:40 AM

Previous topic - Next topic
Hi!

I'm using this GPS:

BU-353N5 GPS Receiver

Are there any configuration that I could use to optimize it's performance?  Right now I'm just using "Generic".  I'm getting a lot of "False Ticker".  Dunno if it's configuration related

Generally you need a serial gps adapter with PPS signal. GPS NTP performance without PPS is poor. Unfortunately I am not aware of USB GPS adapters that do PPS - probably because PPS is usually a dedicated line and maybe USB performance is not good enough for PPS anyway.

January 06, 2025, 01:02:18 PM #2 Last Edit: January 06, 2025, 01:04:00 PM by 150d
This may be a futile battle: Your receiver seems to be optimized for (car) navigation. It may not even be capable to serve as a precise time source.

What you could try:

- Disable all PPS processing on the client. Even if the receiver should "emulate" this signal over USB, it won't be reliable.

- Limit message types on the receiver to only the NMEA types required for timing. This will "free up" bandwidth and maybe enable the receiver to report more often, giving a more plausible signal to the client.

- Increase comm speed from 4800 to something higher on the receiver. Same as before, this may enable the receiver to give more regular reports.

- Make sure the receiver has a good signal. If it looses the signal every now and then, the client will tend to view it as unreliable.

... but again, consider whether it's worth your time: You won't get precise timing out of this device anyway, you might be better off using internet time servers in the first place.

IMO GPS without PPS is not worth it. Better to use internet time.

I like these devices a lot:

https://centerclick.com/ntp/
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: bimbar on January 06, 2025, 12:14:12 PM[...] Unfortunately I am not aware of USB GPS adapters that do PPS - probably because PPS is usually a dedicated line and maybe USB performance is not good enough for PPS anyway.

There are a few, e.g. https://www.adafruit.com/product/4279. Not exactly plug'n'play, but cheap.
I've read that modern I2C-connected serial ports aren't great for PPS, either. Pretty sad, considering the speed of modern equipment.
A simple PCI-e x1 card would be nice, but those are rare/expensive.

Look on ebay for :

TF-NTP-Lite
and
FC-NTP-Mini

That said, I need to look into PTP through a RasPi5 a little deeper, I can use PTP for a couple things that really need to be in time.

And on those USB receivers, shouldn't they be just as accurate as the PPS signal? You should be receiving the raw data from each satellite and calculating the time from that data, or does the receiver do the calculations (which should be pretty accurate on the output)?

for High performance, I do recommend sparkfun gps boards.

Quote from: lilsense on January 06, 2025, 07:51:43 PMfor High performance, I do recommend sparkfun gps boards.
They look like they are in the same or even higher price range than the Centerclick devices which come with NTP, SNMP, SSH and a web UI. Any advantages of the Sparkfun ones?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I am not sure about the Quectel Chipset but from the look of it briefly, the Sparkfun u-blox chipset has a 92 channel vs Quectel chipset 33 channel. But generally u-blox chipsets are considered high end.

Quote from: Greg_E on January 06, 2025, 07:27:54 PM[...]
And on those USB receivers, shouldn't they be just as accurate as the PPS signal? You should be receiving the raw data from each satellite and calculating the time from that data, or does the receiver do the calculations (which should be pretty accurate on the output)?

Over the same type of link, yes. But ideally your PPS would directly trigger an interrupt which would then be serviced immediately. No reason you couldn't do the same with NMEA (or other) data, but apparently commodity serial hardware these days has a lot of buffers and other processing delays, and the drivers are not designed to minimize latency either.

Say, where are those chip-scale atomic clocks we were promised...?

Thank you guys for your thoughts.

@Patrick M. Hausen

Do you have a guide on how you attached this to OPNsense then configure it?

There's nothing to attach. Plug this device into your network, configure a static DHCP lease - you now have a local stratum 1 server.

In OPNsense: Services > Network Time > General

Enter the IP address of your new NTP server, done.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I'll consolidate my answers into one post :) .

@Patrick: That's very cool, I have been looking for something cheaper than Meinberg.

@Greg_E: PTP is a whole different thing, I don't think we need that, we're just at NTP here.
Also, GPS has 2 time signals:
- coarse time is delivered via NMEA, but it pretty much only tells you the second. I have seen GPS time sources only using NMEA, even in the NTP Pool, but it's very bad practice
- precise time is delivered as a 1PPS signal, meaning one pulse per second, which triggers a pulse exactly on the second
A GPS time source as we know it uses a combination of both.

@pfry: you can not trigger on NMEA, because PPS is its own line on the serial interface and only that line carries that signal.

@lilsense: as long as your GPS interface maintains sync, it doesn't really matter which one you use. I recommend multi-band ones since they tend to hold sync better, especially indoors.

Those centerclick devices seem the way to go, they're pretty cheap for what they claim to do. If I had known that, I don't think I would have built my own esp32 based GPS stratum 1 NTP clock.

@Patrick M. Hausen

How about the antenna?  Are you using indoor or outdoor?  Does the indoor antenna sufficient if it's placed beside the window?  How fast does it take o syncronize with the satellite?