Re: Adding GPS
Posted: Wed Jul 01, 2020 3:57 pm
The GNSS module I have appears to only erratically permit the clock to sync to it. So I had a better look at the messages the SMK53 & BN-2220T produce to see if that might be an effect.
I also note from the documentation that the BN-220T outputs these two message types that contain time information, for example:
From the log I gave earlier, we can see:
It is clear that the BN-220T has only 2 dp in the time field of both messages, yet the SKM53 has 3 dp. So there is a subtle difference in the messages.
Now trying NTP on my Gentoo/Linux laptop, I see:
Note the asterisk next to "GPS_NMEA" and the non-zero "when" plus "delay, "offset" and "jitter". Also the fact that "marvin" is now at stratum 1, with a refclock of "GPS". These, I understand, confirm that NTP is using the BN-220T as a time source.
So.... I find that the clock erratically syncs to the BN-220T (for example today the clock appears to have synced, for the very first time). Might the difference of the 2 vs 3 dp (for the time field in the NMEA messages) be an issue?
(Note the BN-220T is a GNSS module (GPS/GLONASS/BEIDOU/etc), unlike the SKM53 which is only GPS, I understand from the documentation of both.)
I note from the documentation that the SKM53 outputs these two message types that contain time information, for example:jmmcg wrote:XXXsnipXXX
Sample NMEA0183 messages from the Beitian BN-220T GPS unit, with a lock:Code: Select all
$GNVTG,,T,,M,0.126,N,0.234,K,A*3D $GNGGA,134705.00,5203.45990,N,00016.30273,W,1,12,0.83,22.7,M,45.9,M,,*64 $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,22,07,05,273,,08,82,270,22,10,52,073,28*73 $GPGSV,4,2,13,11,52,275,28,16,18,179,26,20,23,050,27,21,30,075,27*71 $GPGSV,4,3,13,22,11,204,20,27,60,128,24,28,06,329,,30,09,301,15*7E $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,37,046,29,66,37,133,33,67,01,170,,72,07,015,*6D $GLGSV,3,2,10,73,06,353,,79,20,233,18,80,33,293,29,81,72,022,39*68 $GLGSV,3,3,10,82,37,293,30,88,28,086,25*62 $GNGLL,5203.45990,N,00016.30273,W,134705.00,A,A*66 $GNRMC,134706.00,A,5203.45992,N,00016.30273,W,0.015,,300620,,,A*7D $GNVTG,,T,,M,0.015,N,0.028,K,A*33 $GNGGA,134706.00,5203.45992,N,00016.30273,W,1,12,0.83,22.8,M,45.9,M,,*6A $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,20,07,05,273,,08,82,270,21,10,52,073,26*7C $GPGSV,4,2,13,11,52,275,27,16,18,179,24,20,23,050,25,21,30,075,26*7F $GPGSV,4,3,13,22,11,204,18,27,60,128,22,28,06,329,,30,09,301,*77 $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,37,046,27,66,37,133,28,67,01,170,,72,07,015,*69 $GLGSV,3,2,10,73,06,353,,79,20,233,18,80,33,293,29,81,72,022,34*65 $GLGSV,3,3,10,82,37,293,28,88,28,086,24*6A $GNGLL,5203.45992,N,00016.30273,W,134706.00,A,A*67 $GNRMC,134707.00,A,5203.45994,N,00016.30274,W,0.023,,300620,,,A*78 $GNVTG,,T,,M,0.023,N,0.043,K,A*3B $GNGGA,134707.00,5203.45994,N,00016.30274,W,1,12,0.83,22.8,M,45.9,M,,*6A $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,17,07,05,273,,08,82,270,20,10,52,073,25*7A $GPGSV,4,2,13,11,52,275,26,16,18,179,24,20,23,050,23,21,30,075,25*7B $GPGSV,4,3,13,22,11,204,,27,60,128,21,28,06,329,,30,09,301,*7D $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,37,046,25,66,37,133,28,67,01,170,,72,07,015,*6B $GLGSV,3,2,10,73,06,353,,79,20,233,16,80,33,293,28,81,72,022,34*6A $GLGSV,3,3,10,82,37,293,28,88,28,086,23*6D $GNGLL,5203.45994,N,00016.30274,W,134707.00,A,A*67 $GNRMC,134708.00,A,5203.45991,N,00016.30276,W,0.171,,300620,,,A*76 $GNVTG,,T,,M,0.171,N,0.317,K,A*3F $GNGGA,134708.00,5203.45991,N,00016.30276,W,1,12,0.83,22.9,M,45.9,M,,*63 $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,17,07,05,273,,08,82,270,19,10,52,073,25*70 $GPGSV,4,2,13,11,52,275,25,16,18,179,22,20,23,050,22,21,30,075,23*79 $GPGSV,4,3,13,22,11,204,,27,60,128,20,28,06,329,,30,09,301,*7C $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,37,046,24,66,37,133,29,67,01,170,,72,07,015,*6B $GLGSV,3,2,10,73,06,353,,79,20,233,15,80,33,293,27,81,72,022,34*66 $GLGSV,3,3,10,82,37,293,28,88,28,086,21*6F $GNGLL,5203.45991,N,00016.30276,W,134708.00,A,A*6F $GNRMC,134709.00,A,5203.45991,N,00016.30278,W,0.038,,300620,,,A*75 $GNVTG,,T,,M,0.038,N,0.070,K,A*31 $GNGGA,134709.00,5203.45991,N,00016.30278,W,1,12,0.83,22.9,M,45.9,M,,*6C $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,17,07,05,273,,08,82,270,19,10,52,073,25*70 $GPGSV,4,2,13,11,52,275,25,16,18,179,22,20,23,050,22,21,30,075,23*79 $GPGSV,4,3,13,22,11,204,,27,60,128,21,28,06,329,,30,09,301,*7D $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,37,046,24,66,37,133,29,67,01,170,,72,07,015,*6B $GLGSV,3,2,10,73,06,353,,79,20,233,14,80,33,293,28,81,72,022,34*68 $GLGSV,3,3,10,82,37,293,28,88,28,086,20*6E $GNGLL,5203.45991,N,00016.30278,W,134709.00,A,A*60 $GNRMC,134710.00,A,5203.45996,N,00016.30278,W,0.196,,300620,,,A*7F $GNVTG,,T,,M,0.196,N,0.363,K,A*35 $GNGGA,134710.00,5203.45996,N,00016.30278,W,1,12,0.83,22.9,M,45.9,M,,*63 $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,18,07,05,273,,08,82,270,19,10,52,073,25*7F $GPGSV,4,2,13,11,52,275,25,16,18,179,22,20,23,050,22,21,30,075,24*7E $GPGSV,4,3,13,22,11,204,,27,60,128,21,28,06,329,,30,09,301,*7D $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,37,046,24,66,37,133,29,67,01,170,,72,07,015,*6B $GLGSV,3,2,10,73,06,353,,79,20,233,12,80,33,293,27,81,72,022,34*61 $GLGSV,3,3,10,82,37,293,29,88,28,086,20*6F $GNGLL,5203.45996,N,00016.30278,W,134710.00,A,A*6F $GNRMC,134711.00,A,5203.46001,N,00016.30278,W,0.147,,300620,,,A*76 $GNVTG,,T,,M,0.147,N,0.272,K,A*38 $GNGGA,134711.00,5203.46001,N,00016.30278,W,1,12,0.83,23.1,M,45.9,M,,*6F $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,18,07,05,273,,08,82,270,20,10,52,073,25*75 $GPGSV,4,2,13,11,52,275,25,16,18,179,22,20,23,050,23,21,30,075,24*7F $GPGSV,4,3,13,22,11,204,,27,60,128,21,28,06,329,,30,09,301,*7D $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,36,046,23,66,37,133,29,67,01,170,,72,07,015,*6D $GLGSV,3,2,10,73,06,353,,79,20,233,,80,33,293,27,81,72,022,34*62 $GLGSV,3,3,10,82,37,293,29,88,28,086,20*6F $GNGLL,5203.46001,N,00016.30278,W,134711.00,A,A*6A $GNRMC,134712.00,A,5203.46006,N,00016.30280,W,0.194,,300620,,,A*7B $GNVTG,,T,,M,0.194,N,0.360,K,A*34 $GNGGA,134712.00,5203.46006,N,00016.30280,W,1,12,0.83,23.3,M,45.9,M,,*6E $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,16,07,05,273,,08,82,270,20,10,52,073,25*7B $GPGSV,4,2,13,11,52,275,25,16,18,179,22,20,23,050,24,21,30,075,23*7F $GPGSV,4,3,13,22,11,204,,27,60,128,22,28,06,329,,30,09,301,*7E $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,36,046,23,66,38,132,29,67,01,170,,72,07,015,*63 $GLGSV,3,2,10,73,06,353,,79,20,233,,80,33,293,27,81,72,022,34*62 $GLGSV,3,3,10,82,37,293,29,88,28,086,22*6D $GNGLL,5203.46006,N,00016.30280,W,134712.00,A,A*69 $GNRMC,134713.00,A,5203.46001,N,00016.30285,W,0.284,,300620,,,A*7A $GNVTG,,T,,M,0.284,N,0.525,K,A*31 $GNGGA,134713.00,5203.46001,N,00016.30285,W,1,12,0.83,23.4,M,45.9,M,,*6A $GNGSA,A,3,08,27,10,11,21,20,16,,,,,,1.63,0.83,1.40*1C $GNGSA,A,3,81,65,82,80,88,66,,,,,,,1.63,0.83,1.40*1E $GPGSV,4,1,13,01,26,254,15,07,05,273,,08,82,270,20,10,52,073,25*78 $GPGSV,4,2,13,11,52,275,25,16,18,179,22,20,23,050,24,21,30,075,24*78 $GPGSV,4,3,13,22,11,204,,27,60,128,22,28,06,329,,30,09,301,*7E $GPGSV,4,4,13,32,11,120,*49 $GLGSV,3,1,10,65,36,046,24,66,38,132,30,67,02,170,,72,07,015,*6F $GLGSV,3,2,10,73,06,353,,79,20,233,,80,33,293,27,81,72,022,34*62 $GLGSV,3,3,10,82,37,293,29,88,28,086,23*6C $GNGLL,5203.46001,N,00016.30285,W,134713.00,A,A*6A
Code: Select all
GGA message:
$GPGGA,033410.000,2232.1745,N,11401.1920,E,1,07,1.1,107.14,M,0.00,M,,*64
HHMMSS.SSS
RMC message:
$GPRMC,075747.000,A,2232.8990,N,11405.3368,E,3.9,357.8,260210,,,A*6A
HHMMSS.SSS
Code: Select all
GGA message:
$GPGGA,092725.00,4717.11399,N,00833.91590,E,1,08,1.01,499.6,M,48.0,M,,*5B
RMC message:
$GPRMC,083559.00,A,4717.11437,N,00833.91522,E,0.004,77.52,091202,,,A,V*57
Code: Select all
$GNGGA,134705.00,5203.45990,N,00016.30273,W,1,12,0.83,22.7,M,45.9,M,,*64
XXXsnipXXX
$GNRMC,134706.00,A,5203.45992,N,00016.30273,W,0.015,,300620,,,A*7D
Now trying NTP on my Gentoo/Linux laptop, I see:
Code: Select all
jason@marvin ~ $ ntpq -c lpeer
remote refid st t when poll reach delay offset jitter
==============================================================================
*GPS_NMEA(0) .GPS. 0 l 3 16 3 0.000 +366.36 0.313
85.199.214.99 ( .STEP. 16 u - 64 0 0.000 +0.000 0.000
ns1.do.steersne 114.199.6.79 2 u 11 64 1 14.939 +481.69 0.000
time.netweaver. 85.199.214.98 2 u 9 64 1 15.832 +482.76 0.000
slideaway.presh .STEP. 16 u 14 64 0 0.000 +0.000 0.000
Code: Select all
jason@marvin ~ $ ntptrace
marvin.reality: stratum 1, offset 0.000000, synch distance 0.367004, refid 'GPS'
So.... I find that the clock erratically syncs to the BN-220T (for example today the clock appears to have synced, for the very first time). Might the difference of the 2 vs 3 dp (for the time field in the NMEA messages) be an issue?
(Note the BN-220T is a GNSS module (GPS/GLONASS/BEIDOU/etc), unlike the SKM53 which is only GPS, I understand from the documentation of both.)