Looks like PPS time stamp is correct when the serial NMEA message offset is > 100 msec. I am currently running at 38400 baud (fastest it supports). I assumed faster is always better. How is that for an edge case?
Ubuntu 24.04
root@ntp:~# ntpshmmon -o
ntpshmmon: version 3.25
# Name Offset Clock Real L Prc
sample NTP0 0.085228630 1715539516.085228630 1715539516.000000000 0 -1
sample NTP1 -0.873629879 1715539516.126370121 1715539517.000000000 0 -20
sample NTP0 0.081718522 1715539517.081718522 1715539517.000000000 0 -1
sample NTP1 -0.884069774 1715539517.115930226 1715539518.000000000 0 -20
sample NTP0 0.075880041 1715539518.075880041 1715539518.000000000 0 -1
sample NTP1 -0.895254918 1715539518.104745082 1715539519.000000000 0 -20
sample NTP0 0.078816731 1715539519.078816731 1715539519.000000000 0 -1
sample NTP1 -0.899284870 1715539519.100715130 1715539520.000000000 0 -20
sample NTP0 0.084647225 1715539520.084647225 1715539520.000000000 0 -1
sample NTP1 -0.899280238 1715539520.100719762 1715539521.000000000 0 -20
sample NTP0 0.089901582 1715539521.089901582 1715539521.000000000 0 -1
sample NTP1 -0.899164593 1715539521.100835407 1715539522.000000000 0 -20
sample NTP0 0.095393339 1715539522.095393339 1715539522.000000000 0 -1
sample NTP1 -0.899273486 1715539522.100726514 1715539523.000000000 0 -20
sample NTP0 0.101733133 1715539523.101733133 1715539523.000000000 0 -1 # NMEA data offset
sample NTP1 0.000697857 1715539524.000697857 1715539524.000000000 0 -20 # PPS assert offset
sample NTP0 0.067291492 1715539524.067291492 1715539524.000000000 0 -1
sample NTP1 -0.899164022 1715539524.100835978 1715539525.000000000 0 -20
sample NTP0 0.061891719 1715539525.061891719 1715539525.000000000 0 -1
sample NTP1 -0.900270046 1715539525.099729954 1715539526.000000000 0 -20
Installed FreeBSD 14.0, GPSD and Chrony (for some reason I could not get the NTPD SHM devices to work with GPSD, so I switched to Chrony). Added the PPS_MODE flag to the loader. PPS offset looks great. You are right Linux <> FreeBSD. Config files are not in the same locations and setup is completely different.
FreeBSD - 14.0
root@ntp-2:/boot # cat loader.conf.local
dev.uart.0.pps_mode="1"
root@ntp-2:/boot # sysctl -a | grep -i pps_mode
dev.uart.0.pps_mode: 1
/dev/ttyu0 NMEA0183>
┌──────────────────────────────────────────────────────────────────────────────┐_minor":14}
│Time: 2024-05-12T21:39:06.000Z Lat: XX XX.599400' N Lon: XX XX.263300' W │r":"NMEA0183","readonly":"true","activated":"2024-05-12T21:38:5
└───────────────────────────────── Cooked TPV ─────────────────────────────────┘]}
┌──────────────────────────────────────────────────────────────────────────────┐false,"timing":false,"split24":false,"pps":true}
│ GPGGA GPRMC GPGSA GPGSV PGRME │
└───────────────────────────────── Sentences ──────────────────────────────────┘
┌───────────────────────┌─────────────────────────┌────────────────────────────┐
│ SVID PRN Az El SN HU│Time: 213906 │Time: 213906 │
│GP 5 5 4 57 46 Y│Latitude: XXXX.5994 N │Latitude: XXXX.5994 │
│GP 15 15 191 54 17 Y│Longitude: XXXXX.2633 W │Longitude: XXXXX.2633 │
│GP 20 20 39 36 41 Y│Speed: 000.1 │Altitude: 2.3 │
│GP 29 29 310 54 50 Y│Course: 000.0 │Quality: 1 Sats: 04 │
│GP 23 23 250 6 25 N│Status: A FAA:A │HDOP: 1.5 │
│SB138 51 228 46 0 N│MagVar: 007.2W │Geoid: -28.7 │
│ └───────── RMC ───────────└─────────── GGA ────────────┘
│ ┌─────────────────────────┌────────────────────────────┐
│ │Mode: A3 Sats: 5 15 20 │UTC: RMS: │
│ │DOP H=1.5 V=2.3 P=2.8 │MAJ: MIN: │
│ │TOFF: 0.149858632 │ORI: LAT: │
│ │PPS: 0.000011444 │LON: ALT: │
└──────── GSV ──────────└────── GSA + PPS ────────└─────────── GST ────────────┘
root@ntp-2:/usr/local/etc # gpsmon -a | grep -i pps
TOFF= 1715550025.068900268 real= 1715550025.000000000
PPS= 1715550026.00002302 clock= 1715550026.00000000 offset= 0.000023023
TOFF= 1715550026.075223465 real= 1715550026.000000000
PPS= 1715550027.00002048 clock= 1715550027.00000000 offset= 0.000020485
TOFF= 1715550027.081342965 real= 1715550027.000000000
PPS= 1715550028.00002379 clock= 1715550028.00000000 offset= 0.000023797
TOFF= 1715550028.087593513 real= 1715550028.000000000
PPS= 1715550029.00002874 clock= 1715550029.00000000 offset= 0.000028747
TOFF= 1715550029.094062283 real= 1715550029.000000000
PPS= 1715550030.00002342 clock= 1715550030.00000000 offset= 0.000023421
TOFF= 1715550030.099321907 real= 1715550030.000000000
PPS= 1715550031.00002090 clock= 1715550031.00000000 offset= 0.000020908
TOFF= 1715550031.105047413 real= 1715550031.000000000
PPS= 1715550032.00002083 clock= 1715550032.00000000 offset= 0.000020833
TOFF= 1715550032.070664659 real= 1715550032.000000000
PPS= 1715550033.00002333 clock= 1715550033.00000000 offset= 0.000023330
TOFF= 1715550033.067559462 real= 1715550033.000000000
(122) {"class":"WATCH","enable":true,"json":false,"nmea":false,"raw":2,"scaled":false,"timing":false,"split24":false,"pps":true}
------------------- PPS offset: 0.000023023 ------
------------------- PPS offset: 0.000020485 ------
------------------- PPS offset: 0.000023797 ------
------------------- PPS offset: 0.000028747 ------
------------------- PPS offset: 0.000023421 ------
------------------- PPS offset: 0.000020908 ------
------------------- PPS offset: 0.000020833 ------
------------------- PPS offset: 0.000023330 ------
Did that, but not sure where the logs are.
I used the -a option you suggested when GPSMON crashed on Ubuntu 24.04. I had to go back and make sure I did not have a typo in my post. An “a” and “g” look the same without my glasses.
It’s a NMEA 0183 GPS 19X (GPS+GLONASS). Basically the same as the 16X and 18X GPS only serial units.
OTHER COMMENTS
- Couldn’t figure out how to get NTPSHMMON installed on FreeBSD
- I tried several times to recompile the Linux kernel with the required KPPS support enabled, but all the wikis and google searches that provide instructions how to recompile the linux kernel are horribly out of date.
GPSD Time Service HOWTO
QUESTIONS
- So is slowing down the baud rate the next step? FreeBSD did not seem to have a problem at the same baud rate.
- For giggles, I set the PPS_MODE=2 (CD) and GPSD would not detect the PPS signal.
UPDATE
Created an issue report. NOTE: You need a GitLab account to view.