Appendix A. CR23X/CR10X Programs
Communication cable wiring for:
NOTE
CR23X/Example A-1 — PPS to C8, GPS transmit to C5.
CR10X/Example A-2 — PPS to C8, GPS transmit to C2.
A.1.3 Filters
Filters can be used to make sure P15 reads the correct data string. Filters also
ensure P15 starts to read the string at the beginning of the string. To use a
filter, follow P15 with instruction P63 (extended parameters). P63 is used to
define the filter. Enter the desired filter in P63.
TABLE A-2. Filter
ASCII Equivalent
Character
36
$
71
G
80
P
71
G
71
G
65
A
A.1.4 Managing the Data
Several of the data values in the $GPGGA string are too large to view or write
to final storage. Some simple math is used to parse the data.
The UTC time is in the format hhmmss where hh is the hours, mm is the
minutes and ss is the seconds. Six digits are too many to view with the
datalogger display and some software. Add 0.3 to the raw time field. Multiply
the raw time input location by 0.01 to reduce the magnitude and place the
seconds in the fractional portion of the number. Next use P45 to write the
integer portion (hours/minutes) to a new input location, then use P44 to write
the fractional portion to another input location (seconds) and multiply that
location by 100. The last step is to use P45 again to take the integer portion of
the input location for seconds. The result is hour/minutes in one input location
and seconds in another.
The latitude and longitude can be parsed with the P15 instruction when decimal
delimiter is on. If P15, parameter 2 is 6x, where the x selects the baud rate,
every non-numeric value and decimal point will act as a delimiter. The
Degrees and Minutes will be placed in one input location, and the minute
fractional portion will be placed in the next input location. The decimal
delimiter preserves the resolution of the original measurement.
Further parsing of the latitude and longitude may be necessary. Longitude
degrees and minutes can range in value up to 18059, which exceeds the low
resolution format of the dataloggers final storage area. Either parse the latitude
and longitude degrees and minutes the same way the time was parsed, or store
the data in high-resolution format.
The GPS quality number can be used to determine if you have a valid GPS fix
and if the datalogger received the data properly. Use P89 to test if the GPS
quality number is greater than or equal to one. There is a catch to using the
A-3