GPSArray (GPS Array)

The variable in which to store the information returned by the GPS. Fifteen values are returned. If this array is not dimensioned to 15, values will be stored to fill the array and no error will be returned. If no values are available, NAN will be returned. The values in this array are updated only when the GPS instruction is executed.

NOTE: Beginning with operating system 9, the GPSArray may be declared as type Double to support higher-precision latitude and longitude.

The following values are returned by the GPS:

Data from other NMEA sentences can be stored in a numeric format. For each sentence data is stored in the array as follows:

  1. The number of values in the sentence.
  2. A simple checksum of the characters in the sentence's name, not counting the '$'. This is the sum of the 8 bit ASCII codes.
  3. The comma separated values in the sentence. If the field is non-numeric, a similar numeric checksum for the variable string as in (2) is stored. For a single character field this will be its ASCII value. If the field is vacant; i.e., back to back commas, ClosedNAN Not a number. A data word indicating a measurement or processing error. Voltage overrange, SDI-12 sensor error, and undefined mathematical results can produce NAN. is stored.

Steps 1..3 are repeated for as many different sentences that are seen by the datalogger. The GPSArray must be dimensioned large enough to store all the variables for all the sentences you need to store. The order in which the data is stored for the different NMEA sentences follows the rules for the ordering of the NMEA strings.

These values are stored in the GPS array when the GPS instruction runs, without risk of corruption caused by new data coming in when the instruction runs.

Type: Variable