
GPS16X-HVS GPS Receiver
5. CRBasic Programming
This section describes programming a CR800, CR850, CR1000, or CR3000.
See Appendix B and C for programming other dataloggers.
CRBasic is used to write programs for the CR1000, CR3000, CR800, and
CR850 dataloggers. These dataloggers use several instructions to read GPS
output, which is asynchronous serial data. As shipped from Campbell
Scientific, the GPS receiver will output data once a second, 38400 baud, 8 data
bits, no parity, and 1 stop bit. Only the GPGGA string is output. See Section
3 for details on the GPGGA string. See Appendix A for specifics on changing
the GPS receiver configuration, including using different baud rates.
5.1 GPS Instruction
The GPS instruction is available for our CR800, CR850, CR1000, and CR3000
dataloggers. It is used along with a GPS device to set the datalogger's clock.
This instruction will also provide information such as location
(latitude/longitude) and speed, and store NMEA sentences from the GPS
device.
To use the GPS instruction, the datalogger operating system
(OS) should be OS17 or higher for the CR1000; OS10 or higher
for the CR3000; or OS08 or higher for the CR800 and CR850.
Go to www.campbellsci.com/downloads
to upgrade the
datalogger OS.
NOTE
The resolution of accuracy for the clock set is 10 microseconds if the
datalogger has a hardware revision number greater than 007 (RevBoard field in
the datalogger's Status table). Otherwise, resolution is 10 milliseconds. The
clock set relies on information from the GPRMC sentence. If this sentence is
not returned, a clock set will not occur.
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
7
Comentários a estes Manuais