1GPSD(8) GPSD Documentation GPSD(8)
2
3
4
6 gpsd - interface daemon for GPS receivers
7
9 gpsd [-b] [-D debuglevel] [-F control-socket] [-G] [-h] [-l] [-n] [-N]
10 [-P pidfile] [-r] [-S listener-port] [-V] [[source-name]...]
11
13 If you have a GPS attached on the lowest-numbered USB port of a Linux
14 system, and want to read reports from it on TCP/IP port 2947, it will
15 normally suffice to do this:
16
17 gpsd /dev/ttyUSB0
18
19 For the lowest-numbered serial port:
20
21 gpsd /dev/ttyS0
22
23 Change the device number as appropriate if you need to use a different
24 port. Command-line flags enable verbose logging, a control port, and
25 other optional extras but should not be needed for basic operation; the
26 one exception, on very badly designed hardware, might be -b (which
27 see).
28
29 On Linux systems supporting udev, gpsd is normally started
30 automatically when a USB plugin event fires (if it is not already
31 running) and is handed the name of the newly active device. In that
32 case no invocation is required at all.
33
34 For your initial tests set your GPS hardware to speak NMEA, as gpsd is
35 guaranteed to be able to process that. If your GPS has a native or
36 binary mode with better performance that gpsd knows how to speak, gpsd
37 will autoconfigure that mode.
38
39 You can verify correct operation by first starting gpsd and then xgps,
40 the X windows test client.
41
42 If you have problems, the GPSD project maintains a FAQ to assist
43 troubleshooting.
44
46 gpsd is a monitor daemon that collects information from GPSes,
47 differential-GPS radios, or AIS receivers attached to the host machine.
48 Each GPS, DGPS radio, or AIS receiver is expected to be
49 direct-connected to the host via a USB or RS232C serial device. The
50 serial device may be specified to gpsd at startup, or it may be set via
51 a command shipped down a local control socket (e.g. by a USB hotplug
52 script). Given a GPS device by either means, gpsd discovers the correct
53 port speed and protocol for it.
54
55 gpsd should be able to query any GPS that speaks either the standard
56 textual NMEA 0183 protocol, or the (differing) extended NMEA dialects
57 used by MKT-3301, iTrax, Motorola OnCore, Sony CXD2951, and
58 Ashtech/Thales devices. It can also interpret the binary protocols used
59 by EverMore, Garmin, Navcom, Rockwell/Zodiac, SiRF, Trimble, and u-blox
60 ANTARIS devices. Under Linux it can read NMEA2000 packets through the
61 kernel CAN socket. It can read heading and attitude information from
62 the Oceanserver 5000 or TNT Revolution digital compasses.
63
64 The GPS reporting formats supported by your instance of gpsd may differ
65 depending on how it was compiled; general-purpose versions support
66 many, but it can be built with protocol subsets down to a singleton for
67 use in constrained environments. For a list of the GPS protocols
68 supported by your instance, see the output of gpsd -l
69
70 gpsd effectively hides the differences among the GPS types it supports.
71 It also knows about and uses commands that tune these GPSes for lower
72 latency. By using gpsd as an intermediary, applications avoid
73 contention for serial devices.
74
75 gpsd can use differential-GPS corrections from a DGPS radio or over the
76 net, from a ground station running a DGPSIP server or a Ntrip
77 broadcaster that reports RTCM-104 data; this will shrink position
78 errors by roughly a factor of four. When gpsd opens a serial device
79 emitting RTCM-104, it automatically recognizes this and uses the device
80 as a correction source for all connected GPSes that accept RTCM
81 corrections (this is dependent on the type of the GPS; not all GPSes
82 have the firmware capability to accept RTCM correction packets). See
83 the section called “ACCURACY” and the section called “FILES” for
84 discussion.
85
86 Client applications will communicate with gpsd via a TCP/IP port, 2947
87 by default). Both IPv4 and IPv6 connections are supported and a client
88 may connect via either.
89
90 The program accepts the following options:
91
92 -b
93 Broken-device-safety mode, otherwise known as read-only mode. A few
94 bluetooth and USB receivers lock up or become totally inaccessible
95 when probed or reconfigured; see the hardware compatibility list on
96 the GPSD project website for details. This switch prevents gpsd
97 from writing to a receiver. This means that gpsd cannot configure
98 the receiver for optimal performance, but it also means that gpsd
99 cannot break the receiver. A better solution would be for Bluetooth
100 to not be so fragile. A platform independent method to identify
101 serial-over-Bluetooth devices would also be nice.
102
103 -D
104 Set debug level. At debug levels 2 and above, gpsd reports incoming
105 sentence and actions to standard error if gpsd is in the foreground
106 (-N) or to syslog if in the background.
107
108 -F
109 Create a control socket for device addition and removal commands.
110 You must specify a valid pathname on your local filesystem; this
111 will be created as a Unix-domain socket to which you can write
112 commands that edit the daemon's internal device list.
113
114 -G
115 This flag causes gpsd to listen on all addresses (INADDR_ANY)
116 rather than just the loop back (INADDR_LOOPBACK) address. For the
117 sake of privacy and security, TPV information is now private to the
118 local machine until the user makes an effort to expose this to the
119 world.
120
121 -h
122 Display help message and terminate.
123
124 -l
125 List all drivers compiled into this gpsd instance. The letters to
126 the left of each driver name are the gpsd control commands
127 supported by that driver.
128
129 -n
130 Don't wait for a client to connect before polling whatever GPS is
131 associated with it. Some RS232 GPSes wait in a standby mode
132 (drawing less power) when the host machine is not asserting DTR,
133 and some cellphone and handheld embedded GPSes have similar
134 behaviors. Accordingly, waiting for a watch request to open the
135 device may save battery power. (This capability is rare in
136 consumer-grade devices). You should use this option if you plan to
137 use gpsd to provide reference clock information to ntpd through a
138 memory-shared segment.
139
140 -N
141 Don't daemonize; run in foreground. This switch is mainly useful
142 for debugging.
143
144 -r
145 Use GPS time even with no current fix. Some GPS's have battery
146 powered Real Time Clocks (RTC's) built in, makeing them a valid
147 time source even before a fix is acquired. This can be useful on a
148 Raspberry Pi, or other device that has no battery powered RTC, and
149 thus has no valid time at startup.
150
151 -P
152 Specify the name and path to record the daemon's process ID.
153
154 -S
155 Set TCP/IP port on which to listen for GPSD clients (default is
156 2947).
157
158 -V
159 Dump version and exit.
160
161 Arguments are interpreted as the names of data sources. Normally, a
162 data source is the device pathname of a local device from which the
163 daemon may expect GPS data. But there are three other special source
164 types recognized, for a total of four:
165
166 Local serial or USB device
167 A normal Unix device name of a serial or USB device to which a
168 sensor is attached. Example: /dev/ttyUSB0.
169
170 Local PPS device
171 A normal Unix device name of a PPS device to which a PPS source is
172 attached. The device name must start with "/dev/pps" and a local
173 serial or USB GPS device must also be available. Example:
174 /dev/pps0.
175
176 TCP feed
177 A URI with the prefix "tcp://", followed by a hostname, a colon,
178 and a port number. The daemon will open a socket to the indicated
179 address and port and read data packets from it, which will be
180 interpreted as though they had been issued by a serial device.
181 Example: tcp://data.aishub.net:4006.
182
183 UDP feed
184 A URI with the prefix "udp://", followed by a hostname, a colon,
185 and a port number. The daemon will open a socket listening for UDP
186 datagrams arriving on the indicated address and port, which will be
187 interpreted as though they had been issued by a serial device.
188 Example: udp://127.0.0.1:5000.
189
190 Ntrip caster
191 A URI with the prefix "ntrip://" followed by the name of an Ntrip
192 caster (Ntrip is a protocol for broadcasting differential-GPS fixes
193 over the net). For Ntrip services that require authentication, a
194 prefix of the form "username:password@" can be added before the
195 name of the Ntrip broadcaster. For Ntrip service, you must specify
196 which stream to use; the stream is given in the form "/streamname".
197 An example DGPSIP URI could be "dgpsip://dgpsip.example.com" and a
198 Ntrip URI could be
199 "ntrip://foo:bar@ntrip.example.com:80/example-stream". Corrections
200 from the caster will be send to each attached GPS with the
201 capability to accept them.
202
203 DGPSIP server
204 A URI with the prefix "dgpsip://" followed by a hostname, a colon,
205 and an optional colon-separated port number (defaulting to 2101).
206 The daemon will handshake with the DGPSIP server and read RTCM2
207 correction data from it. Corrections from the server will be set to
208 each attached GPS with the capability to accept them. Example:
209 dgpsip://dgps.wsrcc.com:2101.
210
211 Remote gpsd feed
212 A URI with the prefix "gpsd://", followed by a hostname and
213 optionally a colony and a port number (if the port is absent the
214 default gpsd port will be used). The daemon will open a socket to
215 the indicated address and port and emulate a gpsd client,
216 collecting JSON reports from the remote gpsd instance that will be
217 passed to local clients.
218
219 NMEA2000 CAN data
220 A URI with the prefix "nmea2000://", followed by a CAN devicename.
221 Only Linux socket CAN interfaces are supported. The interface must
222 be configured to receive CAN messages before gpsd can be started.
223 If there is more then one unit on the CAN bus that provides GPS
224 data, gpsd chooses the unit from which a GPS message is first seen.
225 Example: nmea2000://can0.
226
227 (The "ais:://" source type supported in some older versions of the
228 daemon has been retired in favor of the more general "tcp://".)
229
230 Additionally, two serial device names have a side effect:
231
232 /dev/ttyAMA0
233 The UART device on a Raspberry Pi. Has the side effect of opening
234 /dev/pps0 for RFC2783 1PPS data.
235
236 /dev/gpsd0
237 Generic GPS device 0. Has the side effect of opening /dev/pps0 for
238 RFC2783 1PPS data.
239
240 Note, however, that if /dev/pps0 is the fake "ktimer" PPS, then
241 /dev/pps1 will be used instead.
242
243 Internally, the daemon maintains a device pool holding the pathnames of
244 devices and remote servers known to the daemon. Initially, this list is
245 the list of device-name arguments specified on the command line. That
246 list may be empty, in which case the daemon will have no devices on its
247 search list until they are added by a control-socket command (see the
248 section called “GPS DEVICE MANAGEMENT” for details on this). Daemon
249 startup will abort with an error if neither any devices nor a control
250 socket are specified.
251
252 When a device is activated (i.e. a client requests data from it), gpsd
253 attempts to execute a hook from /etc/gpsd/device-hook with first
254 command line argument set to the pathname of the device and the second
255 to ACTIVATE. On deactivation it does the same passing DEACTIVATE for
256 the second argument.
257
258 gpsd can export data to client applications in three ways: via a
259 sockets interface, via a shared-memory segment, and via D-Bus. The next
260 three major sections describe these interfaces.
261
263 Clients may communicate with the daemon via textual request and
264 responses over a socket. It is a bad idea for applications to speak the
265 protocol directly: rather, they should use the libgps client library
266 and take appropriate care to conditionalize their code on the major and
267 minor protocol version symbols.
268
269 The request-response protocol for the socket interface is fully
270 documented in gpsd_json(5).
271
273 gpsd has two other (read-only) interfaces.
274
275 Whenever the daemon recognizes a packet from any attached device, it
276 writes the accumulated state from that device to a shared memory
277 segment. The C and C++ client libraries shipped with GPSD can read this
278 segment. Client methods, and various restrictions associated with the
279 read-only nature of this interface, are documented at libgps(3). The
280 shared-memory interface is intended primarily for embedded deployments
281 in which gpsd monitors a single device, and its principal advantage is
282 that a daemon instance configured with shared memory but without the
283 sockets interface loses a significant amount of runtime weight.
284
285 The daemon may be configured to emit a D-Bus signal each time an
286 attached device delivers a fix. The signal path is path /org/gpsd, the
287 signal interface is "org.gpsd", and the signal name is "fix". The
288 signal payload layout is as follows:
289
290 Table 1. Satellite object
291 ┌─────────────────┬────────────────────────────┐
292 │Type │ │
293 │ │ Description │
294 ├─────────────────┼────────────────────────────┤
295 │DBUS_TYPE_DOUBLE │ │
296 │ │ Time (seconds since │
297 │ │ Unix epoch) │
298 ├─────────────────┼────────────────────────────┤
299 │DBUS_TYPE_INT32 │ │
300 │ │ mode │
301 ├─────────────────┼────────────────────────────┤
302 │DBUS_TYPE_DOUBLE │ │
303 │ │ Time uncertainty │
304 │ │ (seconds). │
305 ├─────────────────┼────────────────────────────┤
306 │DBUS_TYPE_DOUBLE │ │
307 │ │ Latitude in │
308 │ │ degrees. │
309 ├─────────────────┼────────────────────────────┤
310 │DBUS_TYPE_DOUBLE │ │
311 │ │ Longitude in │
312 │ │ degrees. │
313 ├─────────────────┼────────────────────────────┤
314 │DBUS_TYPE_DOUBLE │ │
315 │ │ Horizontal │
316 │ │ uncertainty in │
317 │ │ meters, 95% │
318 │ │ confidence. │
319 ├─────────────────┼────────────────────────────┤
320 │DBUS_TYPE_DOUBLE │ │
321 │ │ Altitude in meters. │
322 ├─────────────────┼────────────────────────────┤
323 │DBUS_TYPE_DOUBLE │ │
324 │ │ Altitude │
325 │ │ uncertainty in │
326 │ │ meters, 95% │
327 │ │ confidence. │
328 ├─────────────────┼────────────────────────────┤
329 │DBUS_TYPE_DOUBLE │ │
330 │ │ Course in degrees │
331 │ │ from true north. │
332 ├─────────────────┼────────────────────────────┤
333 │DBUS_TYPE_DOUBLE │ │
334 │ │ Course uncertainty │
335 │ │ in meters, 95% │
336 │ │ confidence. │
337 ├─────────────────┼────────────────────────────┤
338 │DBUS_TYPE_DOUBLE │ │
339 │ │ Speed, meters per │
340 │ │ second. │
341 ├─────────────────┼────────────────────────────┤
342 │DBUS_TYPE_DOUBLE │ │
343 │ │ Speed uncertainty │
344 │ │ in meters per │
345 │ │ second, 95% │
346 │ │ confidence. │
347 ├─────────────────┼────────────────────────────┤
348 │DBUS_TYPE_DOUBLE │ │
349 │ │ Climb, meters per │
350 │ │ second. │
351 ├─────────────────┼────────────────────────────┤
352 │DBUS_TYPE_DOUBLE │ │
353 │ │ Climb uncertainty │
354 │ │ in meters per │
355 │ │ second, 95% │
356 │ │ confidence. │
357 ├─────────────────┼────────────────────────────┤
358 │DBUS_TYPE_STRING │ │
359 │ │ Device name │
360 └─────────────────┴────────────────────────────┘
361
363 gpsd maintains an internal list of GPS devices (the "device pool"). If
364 you specify devices on the command line, the list is initialized with
365 those pathnames; otherwise the list starts empty. Commands to add and
366 remove GPS device paths from the daemon's device list must be written
367 to a local Unix-domain socket which will be accessible only to programs
368 running as root. This control socket will be located wherever the -F
369 option specifies it.
370
371 A device may will also be dropped from the pool if GPSD gets a zero
372 length read from it. This end-of-file condition indicates that the'
373 device has been disconnected.
374
375 When gpsd is properly installed along with hotplug notifier scripts
376 feeding it device-add commands over the control socket, gpsd should
377 require no configuration or user action to find devices.
378
379 Sending SIGHUP to a running gpsd forces it to close all GPSes and all
380 client connections. It will then attempt to reconnect to any GPSes on
381 its device list and resume listening for client connections. This may
382 be useful if your GPS enters a wedged or confused state but can be
383 soft-reset by pulling down DTR.
384
385 When gpsd is called with no initial devices (thus, expecting devices to
386 be passed to it by notifications to the control socket), and reaches a
387 state where there are no devices connected and no subscribers after
388 after some devices have been seen, it shuts down gracefully. It is
389 expected that future device hotplug events will reactivate it.
390
391 To point gpsd at a device that may be a GPS, write to the control
392 socket a plus sign ('+') followed by the device name followed by LF or
393 CR-LF. Thus, to point the daemon at /dev/foo. send "+/dev/foo\n". To
394 tell the daemon that a device has been disconnected and is no longer
395 available, send a minus sign ('-') followed by the device name followed
396 by LF or CR-LF. Thus, to remove /dev/foo from the search list, send
397 "-/dev/foo\n".
398
399 To send a control string to a specified device, write to the control
400 socket a '!', followed by the device name, followed by '=', followed by
401 the control string.
402
403 To send a binary control string to a specified device, write to the
404 control socket a '&', followed by the device name, followed by '=',
405 followed by the control string in paired hex digits.
406
407 Your client may await a response, which will be a line beginning with
408 either "OK" or "ERROR". An ERROR response to an add command means the
409 device did not emit data recognizable as GPS packets; an ERROR response
410 to a remove command means the specified device was not in gpsd's device
411 pool. An ERROR response to a ! command means the daemon did not
412 recognize the devicename specified.
413
414 The control socket is intended for use by hotplug scripts and other
415 device-discovery services. This control channel is separate from the
416 public gpsd service port, and only locally accessible, in order to
417 prevent remote denial-of-service and spoofing attacks.
418
420 The base User Estimated Range Error (UERE) of GPSes is 8 meters or less
421 at 66% confidence, 15 meters or less at 95% confidence. Actual
422 horizontal error will be UERE times a dilution factor dependent on
423 current satellite position. Altitude determination is more sensitive to
424 variability in ionospheric signal lag than latitude/longitude is, and
425 is also subject to errors in the estimation of local mean sea level;
426 base error is 12 meters at 66% confidence, 23 meters at 95% confidence.
427 Again, this will be multiplied by a vertical dilution of precision
428 (VDOP) dependent on satellite geometry, and VDOP is typically larger
429 than HDOP. Users should not rely on GPS altitude for life-critical
430 tasks such as landing an airplane.
431
432 These errors are intrinsic to the design and physics of the GPS system.
433 gpsd does its internal computations at sufficient accuracy that it will
434 add no measurable position error of its own.
435
436 DGPS correction will reduce UERE by a factor of 4, provided you are
437 within about 100mi (160km) of a DGPS ground station from which you are
438 receiving corrections.
439
440 On a 4800bps connection, the time latency of fixes provided by gpsd
441 will be one second or less 95% of the time. Most of this lag is due to
442 the fact that GPSes normally emit fixes once per second, thus expected
443 latency is 0.5sec. On the personal-computer hardware available in 2005
444 and later, computation lag induced by gpsd will be negligible, on the
445 order of a millisecond. Nevertheless, latency can introduce significant
446 errors for vehicles in motion; at 50km/h (31mi/h) of speed over ground,
447 1 second of lag corresponds to 13.8 meters change in position between
448 updates.
449
450 The time reporting of the GPS system itself has an intrinsic accuracy
451 limit of 14 nanoseconds, but this can only be approximated by
452 specialized receivers using that send the high-accuracy PPS
453 (Pulse-Per-Second) over RS232 to cue a clock crystal. Most GPS
454 receivers only report time to a precision of 0.01s or 0.001s, and with
455 no accuracy guarantees below 1sec.
456
457 If your GPS uses a SiRF chipset at firmware level 231, reported UTC
458 time may be off by the difference between whatever default leap-second
459 offset has been compiled in and whatever leap-second correction is
460 currently applicable, from startup until complete subframe information
461 is received. Firmware levels 232 and up don't have this problem. You
462 may run gpsd at debug level 4 to see the chipset type and firmware
463 revision level.
464
465 There are exactly two circumstances under which gpsd relies on the
466 host-system clock:
467
468 In the GPS broadcast signal, GPS time is represented using a week
469 number that rolls over after 2^10 or 2^13 weeks (about 19.6 years, or
470 157 years), depending on the spacecraft. Receivers are required to
471 disambiguate this to the correct date, but may have difficulty due to
472 not knowing time to within half this interval, or may have bugs. Users
473 have reported incorrect dates which appear to be due to this issue.
474 gpsd uses the startup time of the daemon detect and compensate for
475 rollovers while it is running, but otherwise reports the date as it is
476 reported by the receiver without attempting to correct it.
477
478 If you are using an NMEA-only GPS (that is, not using SiRF or Garmin or
479 Zodiac binary mode), gpsd relies on the system clock to tell it the
480 current century. If the system clock returns an invalid value near
481 zero, and the GPS does not emit GPZDA at the start of its update cycle
482 (which most consumer-grade NMEA GPSes do not) then the century part of
483 the dates gpsd delivers may be wrong. Additionally, near the century
484 turnover, a range of dates as wide in seconds as the accuracy of your
485 system clock may be referred to the wrong century.
486
488 gpsd can provide reference clock information to ntpd, to keep the
489 system clock synchronized to the time provided by the GPS receiver.
490
491 On Linux, gpsd includes support for interpreting the PPS pulses emitted
492 at the start of every clock second on the carrier-detect lines of some
493 serial GPSes; this pulse can be used to update NTP at much higher
494 accuracy than message time provides. You can determine whether your GPS
495 emits this pulse by running at -D 5 and watching for carrier-detect
496 state change messages in the logfile. In addition, if your kernel
497 provides the RFC 2783 kernel PPS API then gpsd will use that for extra
498 accuracy.
499
500 Detailed instructions for using GPSD to set up a high-quality time
501 service can be found among the documentation on the GPSD website.
502
504 On operating systems that support D-BUS, gpsd can be built to broadcast
505 GPS fixes to D-BUS-aware applications. As D-BUS is still at a pre-1.0
506 stage, we will not attempt to document this interface here. Read the
507 gpsd source code to learn more.
508
510 gpsd, if given the -G flag, will listen for connections from any
511 reachable host, and then disclose the current position. Before using
512 the -G flag, consider whether you consider your computer's location to
513 be sensitive data to be kept private or something that you wish to
514 publish.
515
516 gpsd must start up as root in order to open the NTPD shared-memory
517 segment, open its logfile, and create its local control socket. Before
518 doing any processing of GPS data, it tries to drop root privileges by
519 setting its UID to "nobody" (or another configured userid) and its
520 group ID to the group of the initial GPS passed on the command line —
521 or, if that device doesn't exist, to the group of /dev/ttyS0.
522
523 Privilege-dropping is a hedge against the possibility that carefully
524 crafted data, either presented from a client socket or from a subverted
525 serial device posing as a GPS, could be used to induce misbehavior in
526 the internals of gpsd. It ensures that any such compromises cannot be
527 used for privilege elevation to root.
528
529 The assumption behind gpsd's particular behavior is that all the tty
530 devices to which a GPS might be connected are owned by the same
531 non-root group and allow group read/write, though the group may vary
532 because of distribution-specific or local administrative practice. If
533 this assumption is false, gpsd may not be able to open GPS devices in
534 order to read them (such failures will be logged).
535
536 In order to fend off inadvertent denial-of-service attacks by port
537 scanners (not to mention deliberate ones), gpsd will time out inactive
538 client connections. Before the client has issued a command that
539 requests a channel assignment, a short timeout (60 seconds) applies.
540 There is no timeout for clients in watcher or raw modes; rather, gpsd
541 drops these clients if they fail to read data long enough for the
542 outbound socket write buffer to fill. Clients with an assigned device
543 in polling mode are subject to a longer timeout (15 minutes).
544
546 If multiple NMEA talkers are feeding RMC, GLL, and GGA sentences to the
547 same serial device (possible with an RS422 adapter hooked up to some
548 marine-navigation systems), a 'TPV' response may mix an altitude from
549 one device's GGA with latitude/longitude from another's RMC/GLL after
550 the second sentence has arrived.
551
552 gpsd may change control settings on your GPS (such as the emission
553 frequency of various sentences or packets) and not restore the original
554 settings on exit. This is a result of inadequacies in NMEA and the
555 vendor binary GPS protocols, which often do not give clients any way to
556 query the values of control settings in order to be able to restore
557 them later.
558
559 When using SiRF chips, the VDOP/TDOP/GDOP figures and associated error
560 estimates are computed by gpsd rather than reported by the chip. The
561 computation does not exactly match what SiRF chips do internally, which
562 includes some satellite weighting using parameters gpsd cannot see.
563
564 Autobauding on the Trimble GPSes can take as long as 5 seconds if the
565 device speed is not matched to the GPS speed.
566
567 Generation of position error estimates (eph, epv, epd, eps, epc) from
568 the incomplete data handed back by GPS reporting protocols involves
569 both a lot of mathematical black art and fragile device-dependent
570 assumptions. This code has been bug-prone in tbe past and problems may
571 still lurk there.
572
573 AIDVM decoding of types 16-17, 22-23, and 25-26 is unverified.
574
575 GPSD presently fully recognizes only the 2.1 level of RTCM2 (message
576 types 1, 3, 4, 5, 6, 7, 9, 16). The 2.3 message types 13, 14, and 31
577 are recognized and reported. Message types 8, 10-12, 15-27, 28-30
578 (undefined), 31-37, 38-58 (undefined), and 60-63 are not yet supported.
579
580 The ISGPS used for RTCM2 and subframes decoder logic is sufficiently
581 convoluted to confuse some compiler optimizers, notably in GCC 3.x at
582 -O2, into generating bad code.
583
584 Devices meant to use PPS for high-precision timekeeping may fail if
585 they are specified after startup by a control-socket command, as
586 opposed to on the daemon's original command line. Root privileges are
587 dropped early, and some Unix variants require them in order to set the
588 PPS line discipline. Under Linux the POSIX capability to set the line
589 discipline is retained, but other platforms cannot use this code.
590
591 USB GPS devices often do not identify themselves through the USB
592 subsystem; they typically present as the class 00h (undefined) or class
593 FFh (vendor-specific) of USB-to-serial adapters. Because of this, the
594 Linux hotplug scripts must tell gpsd to sniff data from every
595 USB-to-serial adapter that goes active and is known to be of a type
596 used in GPSes. No such device is sent configuration strings until after
597 it has been identified as a GPS, and gpsd never opens a device that is
598 opened by another process. But there is a tiny window for non-GPS
599 devices not opened; if the application that wants them loses a race
600 with GPSD its device open will fail and have to be retried after GPSD
601 sniffs the device (normally less than a second later).
602
604 /dev/ttyS0
605 Prototype TTY device. After startup, gpsd sets its group ID to the
606 owning group of this device if no GPS device was specified on the
607 command line does not exist.
608
609 /etc/gpsd/device-hook
610 Optional file containing the device activation/deactivation script.
611 Note that while /etc/gpsd is the default system configuration
612 directory, it is possible to build the GPSD source code with
613 different assumptions.
614
616 By setting the environment variable GPSD_SHM_KEY, you can control the
617 key value used to create the shared-memory segment used for
618 communication with the client library. This will be useful mainly when
619 isolating test instances of gpsd from production ones.
620
622 The official NMEA protocol standards for NMEA0183 and NMEA2000 are
623 available from the National Marine Electronics Association, but are
624 proprietary and expensive; the maintainers of gpsd have made a point of
625 not looking at them. The GPSD project website links to several
626 documents that collect publicly disclosed information about the
627 protocol.
628
629 gpsd parses the following NMEA sentences: RMC, GGA, GLL, GSA, GSV, VTG,
630 ZDA, GBS, HDT, DBT, GST. It recognizes these with either the normal GP
631 talker-ID prefix, or with the GN prefix used by GLONASS, or with the II
632 prefix emitted by Seahawk Autohelm marine navigation systems, or with
633 the IN prefix emitted by some Garmin units, or with the EC prefix
634 emitted by ECDIS units, or with the SD prefix emitted by depth
635 sounders, or with the HC and TI prefix emitted by some Airmar
636 equipment. It recognizes some vendor extensions: the PGRME emitted by
637 some Garmin GPS models, the OHPR emitted by Oceanserver digital
638 compasses, the PTNTHTM emitted by True North digital compasses, the
639 PMTK omitted by some San Jose Navigation GPSes, and the PASHR sentences
640 emitted by some Ashtech GPSes.
641
642 Note that gpsd JSON returns pure decimal degrees, not the hybrid
643 degree/minute format described in the NMEA standard.
644
645 Differential-GPS corrections are conveyed by the RTCM protocols. The
646 applicable standard for RTCM-104 V2 is RTCM Recommended Standards for
647 Differential GNSS (Global Navigation Satellite) Service RTCM Paper
648 136-2001/SC 104-STD. The applicable standard for RTCM-104 V3 is RTCM
649 Standard 10403.1 for Differential GNSS Services - Version 3 RTCM Paper
650 177-2006-SC104-STD. Ordering instructions for the RTCM standards are
651 accessible from the website of the Radio Technical Commission for
652 Maritime Services under "Publications".
653
654 AIS is defined by ITU Recommendation M.1371, Technical Characteristics
655 for a Universal Shipborne Automatic Identification System Using Time
656 Division Multiple Access. The AIVDM/AIVDO format understood by this
657 program is defined by IEC-PAS 61162-100, Maritime navigation and
658 radiocommunication equipment and systems. A more accessible description
659 of both can be found at AIVDM/AIVDO Protocol Decoding, on the
660 references page of the GPSD project website.
661
662 Subframe data is defined by IS-GPS-200E, GLOBAL POSITIONING SYSTEM WING
663 (GPSW) SYSTEMS ENGINEERING & INTEGRATION, INTERFACE SPECIFICATION
664 IS-GPS-200 Revision E. The format understood by this program is defined
665 in Section 20 (Appendix II) of the IS-GPS-200E, GPS NAVIGATION DATA
666 STRUCTURE FOR DATA, D(t)
667
668 JSON is specified by RFC 7159, The JavaScript Object Notation (JSON)
669 Data Interchange Format.
670
671 The API for PPS time service is specified by RFC 2783, Pulse-Per-Second
672 API for UNIX-like Operating Systems, Version 1.0
673
675 gpsdctl(8), gps(1), libgps(3), gpsd_json(5), libgpsmm(3), gpsprof(1),
676 gpsfake(1), gpsctl(1), gpscat(1),
677
679 Authors: Eric S. Raymond, Chris Kuethe, Gary Miller. Former authors
680 whose bits have been plowed under by code turnover: Remco Treffcorn,
681 Derrick Brashear, Russ Nelson. This manual page by Eric S. Raymond
682 <esr@thyrsus.com>.
683
684
685
686The GPSD Project 9 Aug 2004 GPSD(8)