
GPS16X-HVS GPS Receiver
12
Appendix A. CR23X Programs
A.1 Programming
Program instruction 15 (P15) is used to read the NMEA $GPGGA string of
time and position data. Each iteration of P15 can either read the numeric fields
or read everything. When reading the numeric fields, such as time, latitude,
longitude and elevation, P15 requires non-numeric delimiters between data
points. The only available format of GPS data with delimiters is the NMEA
0183 format. Program instruction 15 (P15) reads serial data and discards non-
numeric values. All non-numeric values act as delimiters between numbers,
and decimal points can also act as delimiters. P15 can be used to import
everything in the string, character by character, and convert it to the decimal
equivalent. The decimal equivalent method is seldom used, and only when the
general area (hemisphere) is not known.
A.1.1 Program Execution Interval
Due to the sequential program instruction execution of the CR23X the Port
Interrupt Subroutine 98 is useful in synchronizing the GPS16X-HVS
measurement via the Pulse Per Second output. When the PPS signal is used to
trigger the read data function (P15), the program table execution interval does
not matter. Otherwise the timing between the GPS16X-HVS output and the
datalogger read must be considered. Generally the execution interval can not
be less than 2 seconds when the PPS signal is not used. This is discussed
further in Section A.1.5.
A.1.2 Reading GPS Data
Table A-1 is a sample CR23X P15 instruction for reading NMEA $GPGGA
data string. The second parameter has two dashes indicating data buffering has
been turned off.
TABLE A-1. P15 for NMEA $GPGGA Data String
Configuration code for RS232 ASCII data at 4800 baud
with data buffe
ring turned off. The -- indicates data
buffering turned off. Decimal delimiter
Delay before sending data out
Control ports. Two digit format AB. A is for
handshaking and set to zero. B in this example is control
port 5 (datalogger RCV).
GPS16X-HVS
communication
cable: GPS transmit to control port 5 in this example
Input location where first character to transmit is stored.
Comentarios a estos manuales