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