GPS16X-HVS GPS Receiver
10
NMEAStrings
The
NMEAStrings
parameter is the string array that holds the
NMEA sentences. If it exists, the GPRMC sentence will reside in
NMEAStrings(1), and the GPGGA sentence will reside in
NMEAStrings(2). Any other sentences will reside in subsequent
indexes into the array (on a first-in basis). Once an index in the
array is used to store a particular sentence, that sentence will
always be stored in that location when updates to the sentence are
received.
5.2
Example Program Using GPS() Instruction
The following wiring and short program provide an example of using the
GPS()
instruction with the Garmin GPS16X-HVS.
'Program the GPS16-HVS to use 38.4 kbaud, no parity, 8 data bits, and 1 stop bit
PipeLineMode
Const LOCAL_TIME_OFFSET = -6 'Local time offset relative to UTC time
Dim nmea_sentence(2) As String * 90
Public gps_data(15)
Alias gps_data(1) = latitude_a 'Degrees latitude (+ = North; - = South)
Alias gps_data(2) = latitude_b 'Minutes latitude
Alias gps_data(3) = longitude_a 'Degrees longitude (+ = East; - = West)
Alias gps_data(4) = longitude_b 'Minutes longitude
Alias gps_data(5) = speed 'Speed
Alias gps_data(6) = course 'Course over ground
Alias gps_data(7) = magnetic_variation 'Magnetic variation from true north (+ =
'East; - = West)
Alias gps_data(8) = fix_quality 'GPS fix quality: 0 = invalid, 1 = GPS, 2 =
'differential GPS, 6 = estimated
Alias gps_data(9) = nmbr_satellites 'Number of satellites used for fix
Alias gps_data(10) = altitude 'Antenna altitude
Alias gps_data(11) = pps 'usec into sec of system clock when PPS
'rising edge occurs, typically 990,000 once
'synced
Alias gps_data(12) = dt_since_gprmc 'Time since last GPRMC string, normally less
'than 1 second
Alias gps_data(13) = gps_ready 'Counts from 0 to 10, 10 = ready
Alias gps_data(14) = max_clock_change 'Maximum value the clock was changed in msec
Alias gps_data(15) = 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 = knots
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
BeginProg
Содержание GPS16X-HVS
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 8: ......
Страница 28: ...Appendix A Changing GPS16X HVS Settings A 4 ...
Страница 38: ...Appendix B CR23X Wiring and Programming B 10 ...
Страница 41: ......