Campbell GPS16X-HVS User manual

GPS16X-HVS
GPS
Receiver
Issued: 5.1.16
Copyright © 2003-2015 Campbell Scientific, Inc.
Printed under licence by Campbell Scientific Ltd.
CSL 807
USER MANUAL


Guarantee
This equipment is guaranteed against defects in materials and workmanship.
We will repair or replace products which prove to be defective during the
guarantee period as detailed on your invoice, provided they are returned to us
prepaid. The guarantee will not apply to:
Equipment which has been modified or altered in any way without the
written permission of Campbell Scientific
Batteries
Any product which has been subjected to misuse, neglect, acts of God or
damage in transit.
Campbell Scientific will return guaranteed equipment by surface carrier
prepaid. Campbell Scientific will not reimburse the claimant for costs incurred
in removing and/or reinstalling equipment. This guarantee and the Company’s
obligation thereunder is in lieu of all other guarantees, expressed or implied,
including those of suitability and fitness for a particular purpose. Campbell
Scientific is not liable for consequential damage.
Please inform us before returning equipment and obtain a Repair Reference
Number whether the repair is under guarantee or not. Please state the faults as
clearly as possible, and if the product is out of the guarantee period it should
be accompanied by a purchase order. Quotations for repairs can be given on
request. It is the policy of Campbell Scientific to protect the health of its
employees and provide a safe working environment, in support of this policy a
“Declaration of Hazardous Material and Decontamination” form will be
issued for completion.
When returning equipment, the Repair Reference Number must be clearly
marked on the outside of the package. Complete the “Declaration of
Hazardous Material and Decontamination” form and ensure a completed copy
is returned with your goods. Please note your Repair may not be processed if
you do not include a copy of this form and Campbell Scientific Ltd reserves
the right to return goods at the customers’ expense.
Note that goods sent air freight are subject to Customs clearance fees which
Campbell Scientific will charge to customers. In many cases, these charges are
greater than the cost of the repair.
Campbell Scientific Ltd,
80 Hathern Road,
Shepshed, Loughborough, LE12 9GX, UK
Tel: +44 (0) 1509 601141
Fax: +44 (0) 1509 601091
www.campbellsci.co.uk


PLEASE READ FIRST
About this manual
Please note that this manual was originally produced by Campbell Scientific Inc. primarily for the North
American market. Some spellings, weights and measures may reflect this origin.
Some useful conversion factors:
Area: 1 in2(square inch) = 645 mm2
Length: 1 in. (inch) = 25.4 mm
1 ft (foot) = 304.8 mm
1 yard = 0.914 m
1 mile = 1.609 km
Mass: 1 oz. (ounce) = 28.35 g
1 lb (pound weight) = 0.454 kg
Pressure: 1 psi (lb/in2) = 68.95 mb
Volume: 1 UK pint = 568.3 ml
1 UK gallon = 4.546 litres
1 US gallon = 3.785 litres
In addition, while most of the information in the manual is correct for all countries, certain information
is specific to the North American market and so may not be applicable to European users.
Differences include the U.S standard external power supply details where some information (for
example the AC transformer input voltage) will not be applicable for British/European use. Please note,
however, that when a power supply adapter is ordered it will be suitable for use in your country.
Reference to some radio transmitters, digital cell phones and aerials may also not be applicable
according to your locality.
Some brackets, shields and enclosure options, including wiring, are not sold as standard items in the
European market; in some cases alternatives are offered. Details of the alternatives will be covered in
separate manuals.
Part numbers prefixed with a “#” symbol are special order parts for use with non-EU variants or for
special installations. Please quote the full part number with the # when ordering.
Recycling information
At the end of this product’s life it should not be put in commercial or domestic refuse but
sent for recycling. Any batteries contained within the product or used during the
products life should be removed from the product and also be sent to an appropriate
recycling facility.
Campbell Scientific Ltd can advise on the recycling of the equipment and in some cases
arrange collection and the correct disposal of it, although charges may apply for some
items or territories.
For further advice or support, please contact Campbell Scientific Ltd, or your local agent.
Campbell Scientific Ltd, 80 Hathern Road, Shepshed, Loughborough, LE12 9GX, UK
Tel: +44 (0) 1509 601141 Fax: +44 (0) 1509 601091
www.campbellsci.co.uk


Precautions
DANGER —MANY HAZARDS ARE ASSOCIATED WITH INSTALLING, USING, MAINTAINING, AND WORKING ON
OR AROUND TRIPODS, TOWERS, AND ANY ATTACHMENTS TO TRIPODS AND TOWERS SUCH AS SENSORS,
CROSSARMS, ENCLOSURES, ANTENNAS, ETC. FAILURE TO PROPERLY AND COMPLETELY ASSEMBLE,
INSTALL, OPERATE, USE, AND MAINTAIN TRIPODS, TOWERS, AND ATTACHMENTS, AND FAILURE TO HEED
WARNINGS, INCREASES THE RISK OF DEATH, ACCIDENT, SERIOUS INJURY, PROPERTY DAMAGE, AND
PRODUCT FAILURE. TAKE ALL REASONABLE PRECAUTIONS TO AVOID THESE HAZARDS. CHECK WITH YOUR
ORGANIZATION'S SAFETY COORDINATOR (OR POLICY) FOR PROCEDURES AND REQUIRED PROTECTIVE
EQUIPMENT PRIOR TO PERFORMING ANY WORK.
Use tripods, towers, and attachments to tripods and towers only for purposes for which they are designed. Do not
exceed design limits. Be familiar and comply with all instructions provided in product manuals. Manuals are
available at www.campbellsci.eu or by telephoning +44(0) 1509 828 888 (UK). You are responsible for conformance
with governing codes and regulations, including safety regulations, and the integrity and location of structures or land
to which towers, tripods, and any attachments are attached. Installation sites should be evaluated and approved by a
qualified engineer. If questions or concerns arise regarding installation, use, or maintenance of tripods, towers,
attachments, or electrical connections, consult with a licensed and qualified engineer or electrician.
General
•Prior to performing site or installation work, obtain required approvals and permits. Comply with all
governing structure-height regulations, such as those of the FAA in the USA.
•Use only qualified personnel for installation, use, and maintenance of tripods and towers, and any
attachments to tripods and towers. The use of licensed and qualified contractors is highly recommended.
•Read all applicable instructions carefully and understand procedures thoroughly before beginning work.
•Wear a hardhat and eye protection, and take other appropriate safety precautions while working on or
around tripods and towers.
•Do not climb tripods or towers at any time, and prohibit climbing by other persons. Take reasonable
precautions to secure tripod and tower sites from trespassers.
•Use only manufacturer recommended parts, materials, and tools.
Utility and Electrical
•You can be killed or sustain serious bodily injury if the tripod, tower, or attachments you are installing,
constructing, using, or maintaining, or a tool, stake, or anchor, come in contact with overhead or
underground utility lines.
•Maintain a distance of at least one-and-one-half times structure height, or 20 feet, or the distance
required by applicable law, whichever is greater, between overhead utility lines and the structure (tripod,
tower, attachments, or tools).
•Prior to performing site or installation work, inform all utility companies and have all underground utilities
marked.
•Comply with all electrical codes. Electrical equipment and related grounding devices should be installed
by a licensed and qualified electrician.
Elevated Work and Weather
•Exercise extreme caution when performing elevated work.
•Use appropriate equipment and safety practices.
•During installation and maintenance, keep tower and tripod sites clear of un-trained or non-essential
personnel. Take precautions to prevent elevated tools and objects from dropping.
•Do not perform any work in inclement weather, including wind, rain, snow, lightning, etc.
Maintenance
•Periodically (at least yearly) check for wear and damage, including corrosion, stress cracks, frayed cables,
loose cable clamps, cable tightness, etc. and take necessary corrective actions.
•Periodically (at least yearly) check electrical ground connections.
WHILE EVERY ATTEMPT IS MADE TO EMBODY THE HIGHEST DEGREE OF SAFETY IN ALL CAMPBELL
SCIENTIFIC PRODUCTS, THE CUSTOMER ASSUMES ALL RISK FROM ANY INJURY RESULTING FROM IMPROPER
INSTALLATION, USE, OR MAINTENANCE OF TRIPODS, TOWERS, OR ATTACHMENTS TO TRIPODS AND TOWERS
SUCH AS SENSORS, CROSSARMS, ENCLOSURES, ANTENNAS, ETC.


i
Contents
PDF viewers: These page numbers refer to the printed version of this document. Use the
PDF reader bookmarks tab for links to specific sections.
1. Overview.....................................................................1
1.1 Default Settings....................................................................................1
1.2 Compatible Dataloggers.......................................................................2
1.3Common Accessories...........................................................................2
2. Specifications ............................................................3
3. Wiring .........................................................................4
3.1 Using with an A300 .............................................................................5
4. GPS Data....................................................................6
4.1 $GPGGA Sentence (Position and Time)..............................................6
4.2 $GPRMC Sentence (Position and Time) .............................................7
5. CRBasic Programming..............................................8
5.1 GPS() Instruction .................................................................................8
5.2 Example Program Using GPS() Instruction.......................................10
5.3 Example Program Using Serial Instruction........................................11
6. Troubleshooting ......................................................13
6.1 Testing and Evaluating Serial Communications ................................13
6.2 NMEAStrings Variable Populated, but Clock Not Setting ................14
Appendices
A. Changing GPS16X-HVS Settings.......................... A-1
A.1 Computer Connections.................................................................... A-1
A.1.1 Using the A200........................................................................ A-1
A.1.1.1 Driver Installation ......................................................... A-1
A.1.1.2 Wiring ........................................................................... A-2
A.1.1.3 Powering the Sensor...................................................... A-3
A.1.1.4 Determining which COM Port the A200 has been
Assigned .................................................................... A-3
A.1.2 Using the SC110...................................................................... A-3
B. CR23X Wiring and Programming.......................... B-1
B.1 CR23X Connections ........................................................................B-1
B.2 Programming....................................................................................B-1
B.2.1 Program Execution Interval ......................................................B-1
B.2.2 Reading GPS Data ....................................................................B-2
B.2.2.1 CR23X Example of Instruction 15 (P15) .......................B-3
B.2.3 Filters........................................................................................B-3
B.2.4 Managing the Data....................................................................B-3
B.2.5 Program Discussion ..................................................................B-4
B.2.5.1 CR23X Example Program..............................................B-6
B.3 Troubleshooting ...............................................................................B-8

ii
C. Using an SDM-SIO4 ............................................... C-1
C.1 SDM-SIO4 Connections ..................................................................C-1
C.2 CR9000X Example Program ...........................................................C-1
Figures
1-1. The GPS16X-HVS terminates in pigtails for direct connection to
our dataloggers .................................................................................1
3-1. CR1000 to GPS16X-HVS connection .................................................5
A-1. A200 Sensor-to-PC Interface...........................................................A-2
Tables
1-1. Default Settings....................................................................................1
3-1. Datalogger Wiring ...............................................................................4
5-1. GPS16X-HVS Wiring to A300 Terminals and Datalogger
Terminals..........................................................................................5
5-2. A300 Cable Wiring to Datalogger Terminals ......................................6
4-1. NMEA $GPGGA String Definition.....................................................6
A-1. A200 Wiring ....................................................................................A-2
A-2. SC110’s DCE Cable Wiring ............................................................A-3
B-1. CR23X Wiring.................................................................................B-1
B-2. P15 for NMEA $GPGGA Data String.............................................B-2
B-3. Filter.................................................................................................B-3
C-1. SC110’s Cable Wiring.....................................................................C-1

1
GPS16X-HVS GPS Receiver
1. Overview
Figure 1-1. The GPS16X-HVS terminates in pigtails for direct connection
to our dataloggers
The GPS16X-HVS is a complete GPS receiver manufactured by Garmin
International, Inc. Campbell Scientific configures the GPS16X-HVS to work with
our dataloggers and modifies its cable so that the cable terminates in pigtails. The
pigtails connect directly to the control ports of our dataloggers or with the aid of
an A300.
The GPS16X-HVS includes the GPS receiver and antenna in the same housing
with one cable for the power supply and communications. The GPS antenna must
have a clear view of the sky. Generally the GPS antenna will not work indoors.
The GPS16X-HVS is a 12-channel GPS receiver that supports FAA Wide Area
Augmentation System (WAAS) or RTCM differential GPS. Also supported is the
1 Pulse Per Second (PPS) timing signal. The cable connections provided with the
GPS16X-HVS do not support differential GPS correction. The cable can be
modified by the user if differential correction is required.
1.1 Default Settings
Table 1-1 shows the default settings of the GPSX16-HVS.
Table 1-1. Default Settings
Baud Rate
38400 bps
Parity
N (no parity)
Stop Bit
1
Sentences Output
GPGGA, GPRMC
PPS
100 ms

GPS16X-HVS GPS Receiver
2
1.2 Compatible Dataloggers
Compatible Contemporary Dataloggers
CR200(X)
Series
CR800/
CR850
CR1000
CR3000
CR6
CR9000X
*
*
*
See
Appendix
Band C
*If PPS is required, the A300 Power and Signal Converter is needed.
Compatible Retired Dataloggers
CR500
CR510
CR10
CR10X
21X
CR23X
CR9000
CR5000
CR7X
See
Appendix
Band C
See
Appendix
Band C
See
Appendix
Band C
Our CR6, CR800, CR850, CR1000, and CR3000 dataloggers typically use the
CRBasic GPS() instruction to read the GPS16X-HVS. To use the PPS
functionality, some dataloggers need an updated clock chip. The clock chip is
factory replaced (requires an RMA). Dataloggers with the following serial
numbers need an updated chip:
Datalogger
Serial Number
CR1000M
< 20409
CR800, CR850
< 7920
CR3000
< 3168
In August 2014, Garmin changed the GPS16X-HVS PPS output signal from
5 V to 3 V. Units with serial numbers greater than 1A4189318 have a 3 V PPS
output signal. When this new design is used with a CR800, CR850, CR1000, or
CR3000 datalogger, a 3 V to 5 V voltage shifter is required for use with the PPS
signal output. The A300 can be used for this purpose. This level shifter is NOT
required for the CR6 datalogger.
1.3 Common Accessories
CSI part number Description
17212 GPS16X-HVS magnetic mount
CM235 Magnetic mounting stand
A200 Sensor to PC interface

User Manual
3
2. Specifications
Physical
Size: 86 mm (3.39 in) diameter, 42 mm (1.65 in) high
Weight: 181 g (6.4 oz) without cable, 332 g (11.7 oz) with 5 m
cable
Cable: PVC-jacketed, 5 m, foil-shielded, 8-conductor, 28 AWG
Electrical Characteristics
Input Voltage: 8.0 Vdc to 40 Vdc unregulated
Current Drain: 65 mA @ 12 Vdc
GPS Receiver
Sensitivity: –185 dbW minimum
GPS Performance
Receiver: WAAS enabled; 12 parallel channel GPS receiver
continuously tracks and uses up to 12 satellites, 11 if PPS
is active
Acquisition Times (Approximate)
Reacquisition: Less than 2 s
Hot: 1 s (all data known)
Warm: ~38 s (initial position, time and almanac known, ephemeris
unknown)
Cold: ~45 s
SkySearch: 5 min (no data known)
Sentence Rate: 1 s default; NMEA 0183 output interval configurable from
1 to 900 s in one second increments
Accuracy: GPS Standard Positioning Service (SPS)
Position: Less than 15 m, 95% typical (100 m with selective
availability on)
Velocity: 0.1 knot RMS steady state
DGPS (USCG/RTCM)
Position: 3-5 m, 95% typical
Velocity: 0.1 knot RMS steady state
DGPS (WAAS)
Position: Less than 3 m
Velocity: 0.1 knot RMS steady state
PPS Time: ±1 microsecond at rising edge of PPS pulse (subject to
selective availability)
Dynamics: 999 knots velocity (limited above 60,000 ft, 6g dynamics)

GPS16X-HVS GPS Receiver
4
Interfaces: True RS-232 output, asynchronous serial input compatible
with RS-232 or TTL voltage levels, RS-232 polarity.
Selectable baud rates (4800, 9600, 19200, 38400)
PPS: 1 Hz pulse, programmable width, 1 microsecond accuracy
Power Control
Off: Open circuit
On: Ground or pull to low logic level < 0.3 volts
Environmental Characteristics
Temperature: –30 to 80 °C operational, –40 to 80 °C storage
3. Wiring
The GPS16X-HVS connects directly to a CR6, CR800, CR850, CR1000, or
CR3000 datalogger (see Table 3-1). However, if PPS is required, the A300 Power
and Signal Converter may be required for use with the CR800/850, CR1000, and
CR3000. See Section 3.1, Using with an A300 (p. 5). The CR6 does not require the
use of an A300.
Refer to Appendix B.1, CR23X Connections (p. B-1), if connecting the receiver to a
CR23X. Our CR5000 and CR9000X connect to the receiver via the SC110 and an
SDM-SIO4 (see Appendix C, Using an SDM-SIO4 (p. C-1)).
If the GPS16X-HVS is to be connected to a computer to change the default
settings, an A200 or SC110 cable is needed (see Appendix A, Changing GPS16X-
HVS Settings (p. A-1)).
Table 3-1. Datalogger Wiring
GPS16X-HVS
Datalogger
Function
Red
12V
Power In
Black
Ground
Power Ground
Yellow
Ground or Control Port
for On/Off control
Power Switch
White
Control Port (Rx)
TXD
Grey
Control Port (Tx)
PPS
Blue
Ground or Control Port
(Tx) for datalogger-based
configuration
Rxdata
Shield
Ground
Shield

User Manual
5
Figure 3-1. CR1000 to GPS16X-HVS connection
3.1 Using with an A300
In 2014, Garmin changed the pulse-per-second (PPS) output of the GPS16X-HVS
from 5 V to 3 V. Units with a serial number 1A4189318 or greater have a PPS
output of 0 to 3 V. For those units, an A300 is needed to connect the PPS output
to a CR800-series, CR1000, or CR3000 datalogger. Those dataloggers require the
PPS line to have a voltage of 3.8 V or greater.
Table 3-2. GPS16X-HVS Wiring to A300 Terminals
and Datalogger Terminals
GPS16X-HVS
Wire Colour
GPS16X-HVS
Wire Function
A300
Terminal
Datalogger
Red
12 V
12V
Black
Ground
G
Yellow
Enable
Ground (or
Control Port)
White
TXD (Output)
Control Port (Rx)
Grey
PPS
3.3V IN
Blue
RXD (Input)
Ground
Shield
Shield
Ground

GPS16X-HVS GPS Receiver
6
Table 3-3. A300 Cable Wiring to Datalogger Terminals
A300 Wire Colour
A300 Wire Function
Datalogger
Red
12 V
12V
Black
Ground
Ground
Green
5 V Signal Input
Ground
White
5 V Signal Output
Control Port (Tx)
4. GPS Data
The GPS16X-HVS has several data formats available. The GPS16X-HVS is
configured to output the NMEA $GPGGA and $GPRMC time and position string.
It is possible to configure the GPS16X-HVS to output other NMEA strings
including the $GPVTG track made good and ground speed string. See Appendix
A, Changing GPS16X-HVS Settings (p. A-1), for details.
4.1 $GPGGA Sentence (Position and Time)
Sample NMEA $GPGGA data string:
$GPGGA,hhmmss,llll.lll,a,nnnnn.nnn,b,t,uu,v.v,w.w,M,x.x,M,y.y,zzzz*hh<CR><LF>
Table 4-1. NMEA $GPGGA String Definition
Field
Description
0
$GPGGA
NMEA string identifier
1
hhmmss
UTC of Position: Hours, minutes, seconds
2
1111.111
Latitude: Degrees, minutes, thousandths of minutes
3
a
N (North) or S (South)
4
nnnnn.nnn
Longitude: Degrees, minutes, thousandths of minutes
5
b
E (East) or W (West)
6
t
GPS Quality Indicator: 0 = No GPS, 1 = GPS, 2 =
DGPS
7
uu
Number of Satellites in Use
8
v.v
Horizontal Dilution of Precision (HDOP)
9
w.w
Antenna Altitude in Metres
10
M
M = Metres
11
x.x
Geoidal Separation in Metres
12
M
M = Meters. Geoidal separation is the difference
between the WGS-84 earth ellipsoid and mean-sea-
level.
13
y.y
Age of Differential GPS Data. Time in seconds since
the last Type 1 or 9 Update
14
zzzz
Differential Reference Station ID (0000 to 1023)
15
*
Asterisk, generally used as the termination character
16
hh
Checksum
17
<CR><LF>
Carriage return, line feed characters.

User Manual
7
Sample $GPGGA output strings:
Cold Start
No satellites acquired, Real Time Clock and Almanac invalid:
$GPGGA,,,,,,0,00,,,,,,,*66
Warm Start
No satellites acquired, time from Real Time Clock, almanac valid:
$GPGGA,235032.0,,,,,0,00,,,,,,,*7D
Warm Start
One satellite in use, time from GPS Real Time Clock (not GPS), no position:
$GPGGA,183806.0,,,,,0,01,,,,,,,*7D
Valid GPS Fix
Three satellites acquired, time and position valid:
$GPGGA,005322.0,4147.603,N,11150.978,W,1,03,11.9,00016,M,-016,M,,*6E
4.2 $GPRMC Sentence (Position and Time)
Example (signal not acquired):
$GPRMC,235947.000,V,0000.0000,N,00000.0000,E,,,041299,,*1D
Example (signal acquired):
$GPRMC,092204.999,A,4250.5589,S,14718.5084,E,0.00,89.68,211200,,*25
Field
Example
Comments
Sentence ID
$GPRMC
UTC Time
092204.999
hhmmss.sss
Status
A
A = Valid, V = Invalid
Latitude
4250.5589
ddmm.mmmm
N/S Indicator
S
N = North, S = South
Longitude
14718.5084
dddmm.mmmm
E/W Indicator
E
E = East, W = West
Speed over ground
0.00
Knots
Course over ground
0.00
Degrees
UTC Date
211200
DDMMYY
Magnetic variation
Degrees
Magnetic variation
E = East, W = West
Checksum
*25
Terminator
CR/LF

GPS16X-HVS GPS Receiver
8
5. CRBasic Programming
This section describes programming a CR6, CR800, CR850, CR1000, or CR3000.
See Appendix B, CR23X Wiring and Programming (p. B-1), and Appendix C, Using
an SDM-SIO4 (p. C-1), for programming other dataloggers.
CRBasic is used to write programs for the CR6, CR1000, CR3000, CR800, and
CR850 dataloggers. These dataloggers use several instructions to read GPS
output, which is asynchronous serial data.
5.1 GPS() Instruction
The GPS() instruction is available for our CR6, 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.
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.
By default, the instruction expects the GPS unit to be set up at 38400 baud,
outputting the GPRMC and GPGGA sentences once per second. The datalogger
expects the start of the second to coincide with the rising edge of the PPS signal.
If there is no PPS signal or if the required sentences come out at less than once per
second, the datalogger will not update its clock.
GPS units with lower baud rates can be used with the GPS() instruction but the
baud rate has to be set for the relevant Com port it is to be connected to either in
the datalogger settings or by including a SetStatus() command after the
BeginProg() instruction in the program (e.g.,
SetStatus("BaudrateCOM4",19200)).
Baud rates of 2400 bps or lower will not work as the GPS unit will not transmit
the two GPS sentences once per second reliably. Similar problems can be
encountered even at higher baud rates if too many optional GPS strings are
selected to be output.
The GPS() instruction has the following syntax:
GPS(GPSArray,ComPort,TimeOffset,MaxTimeDiff,NMEAStrings)
NOTE

User Manual
9
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, metres
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 the data table(s). This
restriction does not apply to hardware revisions 08 or greater.

GPS16X-HVS GPS Receiver
10
NMEAStrings The NMEAStrings parameter is the string array that holds the
NMEA sentences. If it exists, the GPRMC sentence will reside in
NMEAStrings(1), and the GPGGA sentence will reside in
NMEAStrings(2). Any other sentences will reside in subsequent
indexes into the array (on a first-in basis). Once an index in the
array is used to store a particular sentence, that sentence will
always be stored in that location when updates to the sentence are
received.
5.2 Example Program Using GPS() Instruction
The following wiring and short program provide an example of using the GPS()
instruction with the Garmin GPS16X-HVS.
'Program the GPS16-HVS to use 38.4 kbaud, no parity, 8 data bits, and 1 stop bit
PipeLineMode
Const LOCAL_TIME_OFFSET = -6 'Local time offset relative to UTC time
Dim nmea_sentence(2) As String * 90
Public gps_data(15)
Alias gps_data(1) = latitude_a 'Degrees latitude (+ = North; - = South)
Alias gps_data(2) = latitude_b 'Minutes latitude
Alias gps_data(3) = longitude_a 'Degrees longitude (+ = East; - = West)
Alias gps_data(4) = longitude_b 'Minutes longitude
Alias gps_data(5) = speed 'Speed
Alias gps_data(6) = course 'Course over ground
Alias gps_data(7) = magnetic_variation 'Magnetic variation from true north (+ =
'East; - = West)
Alias gps_data(8) = fix_quality 'GPS fix quality: 0 = invalid, 1 = GPS, 2 =
'differential GPS, 6 = estimated
Alias gps_data(9) = nmbr_satellites 'Number of satellites used for fix
Alias gps_data(10) = altitude 'Antenna altitude
Alias gps_data(11) = pps 'usec into sec of system clock when PPS
'rising edge occurs, typically 990,000 once
'synced
Alias gps_data(12) = dt_since_gprmc 'Time since last GPRMC string, normally less
'than 1 second
Alias gps_data(13) = gps_ready 'Counts from 0 to 10, 10 = ready
Alias gps_data(14) = max_clock_change 'Maximum value the clock was changed in msec
Alias gps_data(15) = nmbr_clock_change 'Number of times the clock was changed
'Define Units to be used in data file header
Units latitude_a = degrees
Units latitude_b = minutes
Units longitude_a = degrees
Units longitude_b = minutes
Units speed = knots
Units course = degrees
Units magnetic_variation = unitless
Units fix_quality = unitless
Units nmbr_satellites = unitless
Units altitude = m
Units pps = ms
Units dt_since_gprmc = s
Units gps_ready = unitless
Units max_clock_change = ms
Units nmbr_clock_change = samples
BeginProg
Other manuals for GPS16X-HVS
6
Table of contents
Other Campbell GPS manuals