Hello,
I try to use a GPS18x-5Hz GARMIN to sync clok on a CR1000X.
I'am exactly in the issue describe in the folowing section 9.2 of
https://s.campbellsci.com/documents/fr/manuals/gps16x_hvs%20-%20807.pdf
9.2 NMEAStrings Variable Populated, but Clock Not Setting
Look at the GPSReady variable. It will increment from 0 to 10 when the data
logger has received good GPRMC strings and a synchronized PPS signal. Once
GPSReady reaches 10, the data logger will begin to use GPS time for clock
setting. The 12th value populated in GPSArray indicates elapsed time since a
GPRMC string was received and should not exceed 1. If the GPRMC string is
being received and GPSReady remains at zero, the PPS signal is not being
received by the data logger.
I receive good NMEA sentencs but the PPS is not working I assume because the PPS frequency is not 1 Hz but 5 Hz.
Is it possible to use GPS() instruction at 5Hz , and how to change the parameter ?
Because I can't change GPS18X PPS frequency (NMEA 0183 output time 1 to 900 (sec). Not applicable to GPS 18x-5Hz, which always outputsdata at 5 Hz (200 ms)).
Best Regards,
Firmin
To confirm, are you using ComC1? Only ComC1 on the CR1000X works with PPS.
Try using PortPairConfig to set trigger levels to 3.3V instead of 5V.
Yes I use ComC1 and I tried PortPairConfig (C1,2,0).
It seems that all is working exect (pps / gps_ready)
Latitude_a 45
Latitude_b 11.94564
Longitude_a 5
Longitude_b 46.34554
Speed 0.79
Course 119.9
Magnetic_Variation 1.1
Fix_quality 1
nmbr_satellites 4
Altitude 202.3
pps "NAN"
dt_since_gprmc 0.099
gps_ready 0
max_clock_change 0
nmbr_clock_change 0
Here is my test code:
'Locations for the extra NMEA sentences should be set apart by initializing the string variables
Public NMEAStrings(2) As String *100 = {"$GPRMC","$GPGGA"}
Public GPS_Data(44) 'The data array needs to be large enough to hold all the extra values,
'you can swithc it to Pulbic for troubleshooting
Public Latitude_a 'Degrees latitude (+ = North; - = South)
Public Latitude_b 'Minutes latitude
Public Longitude_a 'Degrees longitude (+ = East; - = West)
Public Longitude_b 'Minutes longitude
Public Speed 'Speed
Public Course 'Course over ground
Public Magnetic_Variation 'Magnetic variation from true north (+ = East; - = West)
Public Fix_quality 'GPS fix quality: 0 = invalid, 1 = GPS, 2 = differential GPS, 6 = estimated
Public nmbr_satellites 'Number of satellites used for fix
Public Altitude 'Antenna altitude
Public pps 'usec into sec of system clock when PPS rising edge occurs, typically 990,000 once synced
Public dt_since_gprmc 'Time since last GPRMC string, normally less than 1 second
Public gps_ready 'Counts from 0 to 10, 10 = ready
Public max_clock_change 'Maximum value the clock was changed in msec
Public nmbr_clock_change 'Number of times the clock was changed
'Define Units to be used in data file header
Units Latitude_a = degrees
Units Latitude_b = minutes
Units Longitude_a = degrees
Units Longitude_b = minutes
Units Speed = m/s
Units Course = degrees
Units Magnetic_variation = unitless
Units Fix_quality = unitless
Units nmbr_satellites = unitless
Units Altitude = m
Units pps = ms
Units dt_since_gprmc = s
Units gps_ready = unitless
Units max_clock_change = ms
Units nmbr_clock_change = samples
'Main Program
BeginProg
PortPairConfig (C1,2,0)
SetSetting("Baudrate(COMC1)",38400)
Scan (1,Sec,0,0)
GPS(GPS_Data(),COMC1,0,100,NMEAStrings)
Latitude_a = GPS_Data(1)
Latitude_b = GPS_Data(2)
Longitude_a = GPS_Data(3)
Longitude_b = GPS_Data(4)
Speed = GPS_Data(5)
Course = GPS_Data(6)
Magnetic_variation = GPS_Data(7)
Fix_quality = GPS_Data(8)
nmbr_satellites = GPS_Data(9)
Altitude = GPS_Data(10)
pps = GPS_Data(11)
dt_since_gprmc = GPS_Data(12)
gps_ready = GPS_Data(13)
max_clock_change = GPS_Data(14)
nmbr_clock_change = GPS_Data(15)
NextScan
EndProg
I also noticed with the sniffer that the NMEA frames arrive every 0.2 seconds. Does this pose a problem?
12:06:15.687 R $GPRMC,100615.6,A,4511.96586,N,00546.33243,E,001.3
12:06:15.700 R 7,148.3,080626,001.1,E*5B
12:06:15.700 R $GPGGA,100615.6,4511.96586,N,00546.33243,E,1,04,2.9,214.1,M,47.7,M,,*53
12:06:15.887 R $GPRMC,100615.8,A,4511.96580,N,00546.33242,E,001.4
12:06:15.900 R 4,146.2,080626,001.1,E*59
12:06:15.900 R $GPGGA,100615.8,4511.96580,N,00546.33242,E,1,04,2.9,214.1,M,47.7,M,,*5A
12:06:15.913 R $80,N,00546.33242,E,1,04,2.9,214.1,M,47.7,M,,*5A
12:06:16.087 R $GPRMC,100616.0,A,4511.96566,N,00546.33251,E,001.5
12:06:16.100 R 0,144.7,080626,001.1,E*5A
12:06:16.100 R $GPGGA,100616.0,4511.96566,N,00546.33251,E,1,04,2.9,214.1,M,47.7,M,,*5B
12:06:16.113 R $66,N,00546.33251,E,1,04,2.9,214.1,M,47.7,M,,*5B
12:06:16.287 R $GPRMC,100616.2,A,4511.96552,N,00546.33263,E,001.5
I manage to use NMEA sentences time-syncing.
I think it is enough for my application.
Thanks for your help