Campbell Scientific GPS16X-HVS GPS Receiver User Manual

Page 15

Advertising
background image

GPS16X-HVS GPS Receiver

The

GPS() instruction has the following syntax:

GPS(GPSArray,ComPort,TimeOffset,MaxTimeDiff,NMEAStrings)

Description of the parameters follows:

GPSArray

The GPSArray parameter is 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 following values are

returned by the GPS:

Array(1) = Latitude, degrees

Array(2) = Latitude, minutes

Array(3) = Longitude, degrees

Array(4) = Longitude, minutes

Array(5) = Speed over ground, knots

Array(6) = Course over ground, degrees

Array(7) = Magnetic variation (positive = East, negative =

West)

Array(8) = Fix Quality (0 = invalid, 1 = GPS, 2 = differential

GPS, 6 = estimated)

Array(9) = Number of Satellites

Array(10) = Altitude, meters

Array(11) = Pulse per second (PPS) length, microseconds

Array(12) = Seconds since last GPRMC sentence

Array(13) = GPS Ready, 10 = ready

Array(14) = Maximum clock change, milliseconds (10 msec

resolution)

Array(15) = Clock change count

ComPort

The ComPort parameter is the control port pair to which the

GPS device is attached. Valid options are COM1 (C1/C2),

COM2 (C3/C4), COM3 (C5/C6), and COM4 (C7/C8). Rx is

used to read in the NMEA sentences and Tx is used to monitor

the PPS from the GPS. This instruction defaults to a baud rate

of 38,400 bps. If a different baud rate is required, use the

SetStatus() instruction to override the default.

TimeOffset

The TimeOffset parameter is the local time offset, in seconds,

from UTC.

MaxTimeDiff The MaxTimeDiff parameter is the maximum difference in

time between the datalogger clock and the GPS clock that will

be tolerated before the clock is changed. If a negative value is

entered, the clock will not be changed.

For dataloggers prior to hardware revision 08, the

MaxTimeDiff parameter should not be set to 0. A minimum

value of 20 ms is recommended. With this hardware, when a

GPS() instruction is in the program the clock is checked each

second (regardless of how often the

GPS() instruction is run).

The clock is set if any difference is found. This can result in

the clock being set each second, resulting in skipped records in

9

Advertising