1GPSD_JSON(5)                  GPSD Documentation                  GPSD_JSON(5)
2
3
4

NAME

6       gpsd_json - gpsd request/response protocol
7

OVERVIEW

9       gpsd is a service daemon that can be used to monitor GPSes, DGPS
10       receivers, Marine AIS broadcasts, and various other location-related
11       and kinematic sensors.
12
13       Clients may communicate with gpsd via textual requests and responses
14       over a socket. It is a bad idea for applications to speak the protocol
15       directly: rather, they should use the libgps client library (for C;
16       bindings also exist for other languages) and take appropriate care to
17       check in their code for the expected major and minor protocol versions.
18
19       The GPSD protocol is built on top of JSON, JavaScript Object Notation,
20       as specified in [RFC-7159]: The JavaScript Object Notation (JSON) Data
21       Interchange Format. Similar to ECMA 404.
22
23       GPSD’s use of JSON is restricted in some ways that make parsing it in
24       fixed-extent languages (such as C) easier.
25
26       A request line is introduced by "?" and may include multiple commands.
27       Commands begin with a command identifier, followed either by a
28       terminating ';' or by an equal sign "=" and a JSON object treated as an
29       argument. Any ';' or newline indication (either LF or CR-LF) after the
30       end of a command is ignored. All request lines must be composed of
31       US-ASCII characters and may be no more than 80 characters in length,
32       exclusive of the trailing newline.
33
34       Responses are single JSON objects that have a "class" attribute the
35       value of which is the object type . Object types include, but are not
36       limited to: "TPV", "SKY", "DEVICE", and "ERROR". Objects are sent both
37       in response to commands, and periodically as gpsd sends reports. Each
38       object is terminated by a carriage return and a new line (CR-NL).
39
40       The order of JSON attributes within a response object is never
41       significant, and you may specify command attributes in any order.
42       Responses never contain the special JSON value null; instead,
43       attributes with empty or undefined values are omitted. The length limit
44       for responses and reports is currently 10240 characters, including the
45       trailing CR-NL. Longer responses will be truncated, so client code must
46       be prepared for the possibility of invalid JSON fragments.
47
48       The default maximum message length is set by GPS_JSON_RESPONSE_MAX in
49       include/gpsd_json.h. at compile time.
50
51       In JSON reports, if an attribute is present only if the parent
52       attribute is present or has a particular range, then the parent
53       attribute is emitted first.
54
55       There is one constraint on the order in which attributes will be
56       omitted. If an optional attribute is present only when a parent
57       attribute has a specified value or range of values, the parent
58       attribute will be emitted first to make parsing easier.
59
60       The next subsection section documents the core GPSD protocol.
61       Extensions are documented in the following subsections. The extensions
62       may not be supported in your gpsd instance if it has been compiled with
63       a restricted feature set.
64
65       The protocol was designed and documented by Eric S. Raymond.
66

CORE PROTOCOL RESPONSES

68       Here are the core-protocol responses.
69
70   TPV
71       A TPV object is a time-position-velocity report. The "class" and "mode"
72       fields will reliably be present. When "mode" is 0 (Unknown) there is
73       likely no usable data in the sentence. The remaining fields are
74       optional, their presence depends on what data the GNSS receiver has
75       sent, and what gpsd may calculate from that data.
76
77       A TPV object will usually be sent at least once for every measurement
78       epoch as determined by the "time" field. Unless the receiver has a
79       solid fix, and knows the current leap second, the time may be random.
80
81       Multiple TPV objects are often sent per epoch. When the receiver
82       dribbles data to gpsd, then gpsd has no choice but to dribble it to the
83       client in multiple TPV messages.
84
85       The optional "status" field (aka fix type), is a modifier (adjective)
86       to mode. It is not a replacement for, or superset of, the "mode" field.
87       It is almost, but not quite, the same as the NMEA 4.x xxGGA GPS Quality
88       Indicator Values. Many GNSS receivers do not supply it. Those that do
89       interpret the specification in various incompatible ways.
90
91       All error estimates (epc, epd, epe, eph, ept, epv, epx, epy) are
92       guessed to be 95% confidence, may also be 50%, one sigma, or two sigma
93       confidence. Many GNSS receivers do not specify a confidence level. None
94       specify how the value is calculated. Use error estimates with caution,
95       and only as relative "goodness" indicators. If the GPS reports a value
96       to gpsd, then gpsd will report that value. Otherwise gpsd will try to
97       compute the value from the skyview.
98
99       See the file include/gps.h, especially struct gps_data_t, for expanded
100       notes on the items and values in the TPV message.
101
102       Table 1. TPV object
103       ┌────────────┬─────────┬─────────┬──────────────────┐
104       │            │         │         │                  │
105       │Name        │ Always? │ Type    │ Description      │
106       ├────────────┼─────────┼─────────┼──────────────────┤
107       │            │         │         │                  │
108       │class       │ Yes     │ string  │ Fixed: "TPV"     │
109       ├────────────┼─────────┼─────────┼──────────────────┤
110       │            │         │         │                  │
111       │device      │ No      │ string  │ Name of the      │
112       │            │         │         │ originating      │
113       │            │         │         │ device.          │
114       ├────────────┼─────────┼─────────┼──────────────────┤
115       │            │         │         │                  │
116       │mode        │ Yes     │ numeric │ NMEA mode:       │
117       │            │         │         │ 0=unknown,       │
118       │            │         │         │ 1=no fix,        │
119       │            │         │         │ 2=2D,            │
120       │            │         │         │ 3=3D.            │
121       ├────────────┼─────────┼─────────┼──────────────────┤
122       │            │         │         │                  │
123       │status      │ No      │ numeric │ GPS fix status:  │
124       │            │         │         │ 0=Unknown,       │
125       │            │         │         │ 1=Normal,        │
126       │            │         │         │ 2=DGPS,          │
127       │            │         │         │ 3=RTK Fixed,     │
128       │            │         │         │ 4=RTK Floating,  │
129       │            │         │         │ 5=DR,            │
130       │            │         │         │ 6=GNSSDR,        │
131       │            │         │         │ 7=Time           │
132       │            │         │         │ (surveyed),      │
133       │            │         │         │ 8=Simulated,     │
134       │            │         │         │ 9=P(Y)           │
135       ├────────────┼─────────┼─────────┼──────────────────┤
136       │            │         │         │                  │
137       │time        │ No      │ string  │ Time/date stamp  │
138       │            │         │         │ in ISO8601       │
139       │            │         │         │ format, UTC. May │
140       │            │         │         │ have a           │
141       │            │         │         │ fractional part  │
142       │            │         │         │ of up to .001sec │
143       │            │         │         │ precision. May   │
144       │            │         │         │ be absent if the │
145       │            │         │         │ mode is not 2D   │
146       │            │         │         │ or 3D. May be    │
147       │            │         │         │ present, but     │
148       │            │         │         │ invalid, if      │
149       │            │         │         │ there is no fix. │
150       │            │         │         │ Verify 3         │
151       │            │         │         │ consecutive 3D   │
152       │            │         │         │ fixes before     │
153       │            │         │         │ believing it is  │
154       │            │         │         │ UTC. Even then   │
155       │            │         │         │ it may be off by │
156       │            │         │         │ several seconds  │
157       │            │         │         │ until the        │
158       │            │         │         │ current leap     │
159       │            │         │         │ seconds is       │
160       │            │         │         │ known.           │
161       ├────────────┼─────────┼─────────┼──────────────────┤
162       │            │         │         │                  │
163       │altHAE      │ No      │ numeric │ Altitude, height │
164       │            │         │         │ above ellipsoid, │
165       │            │         │         │ in meters.       │
166       │            │         │         │ Probably WGS84.  │
167       ├────────────┼─────────┼─────────┼──────────────────┤
168       │            │         │         │                  │
169       │altMSL      │ No      │ numeric │ MSL Altitude in  │
170       │            │         │         │ meters. The      │
171       │            │         │         │ geoid used is    │
172       │            │         │         │ rarely specified │
173       │            │         │         │ and is often     │
174       │            │         │         │ inaccurate. See  │
175       │            │         │         │ the comments     │
176       │            │         │         │ below on         │
177       │            │         │         │ geoidSep. altMSL │
178       │            │         │         │ is altHAE minus  │
179       │            │         │         │ geoidSep.        │
180       ├────────────┼─────────┼─────────┼──────────────────┤
181       │            │         │         │                  │
182       │alt         │ No      │ numeric │ Deprecated.      │
183       │            │         │         │ Undefined. Use   │
184       │            │         │         │ altHAE or        │
185       │            │         │         │ altMSL.          │
186       ├────────────┼─────────┼─────────┼──────────────────┤
187       │            │         │         │                  │
188       │climb       │ No      │ numeric │ Climb (positive) │
189       │            │         │         │ or sink          │
190       │            │         │         │ (negative) rate, │
191       │            │         │         │ meters per       │
192       │            │         │         │ second.          │
193       ├────────────┼─────────┼─────────┼──────────────────┤
194       │            │         │         │                  │
195       │datum       │ No      │ string  │ Current datum.   │
196       │            │         │         │ Hopefully WGS84. │
197       ├────────────┼─────────┼─────────┼──────────────────┤
198       │            │         │         │                  │
199       │depth       │ No      │ numeric │ Depth in meters. │
200       │            │         │         │ Probably depth   │
201       │            │         │         │ below the        │
202       │            │         │         │ keel...          │
203       ├────────────┼─────────┼─────────┼──────────────────┤
204       │            │         │         │                  │
205       │dgpsAge     │ No      │ numeric │ Age of DGPS      │
206       │            │         │         │ data. In seconds │
207       ├────────────┼─────────┼─────────┼──────────────────┤
208       │            │         │         │                  │
209       │dgpsSta     │ No      │ numeric │ Station of DGPS  │
210       │            │         │         │ data.            │
211       ├────────────┼─────────┼─────────┼──────────────────┤
212       │            │         │         │                  │
213       │epc         │ No      │ numeric │ Estimated climb  │
214       │            │         │         │ error in meters  │
215       │            │         │         │ per second.      │
216       │            │         │         │ Certainty        │
217       │            │         │         │ unknown.         │
218       ├────────────┼─────────┼─────────┼──────────────────┤
219       │            │         │         │                  │
220       │epd         │ No      │ numeric │ Estimated track  │
221       │            │         │         │ (direction)      │
222       │            │         │         │ error in         │
223       │            │         │         │ degrees.         │
224       │            │         │         │ Certainty        │
225       │            │         │         │ unknown.         │
226       ├────────────┼─────────┼─────────┼──────────────────┤
227       │            │         │         │                  │
228       │eph         │ No      │ numeric │ Estimated        │
229       │            │         │         │ horizontal       │
230       │            │         │         │ Position (2D)    │
231       │            │         │         │ Error in meters. │
232       │            │         │         │ Also known as    │
233       │            │         │         │ Estimated        │
234       │            │         │         │ Position Error   │
235       │            │         │         │ (epe). Certainty │
236       │            │         │         │ unknown.         │
237       ├────────────┼─────────┼─────────┼──────────────────┤
238       │            │         │         │                  │
239       │eps         │ No      │ numeric │ Estimated speed  │
240       │            │         │         │ error in meters  │
241       │            │         │         │ per second.      │
242       │            │         │         │ Certainty        │
243       │            │         │         │ unknown.         │
244       ├────────────┼─────────┼─────────┼──────────────────┤
245       │            │         │         │                  │
246       │ept         │ No      │ numeric │ Estimated time   │
247       │            │         │         │ stamp error in   │
248       │            │         │         │ seconds.         │
249       │            │         │         │ Certainty        │
250       │            │         │         │ unknown.         │
251       ├────────────┼─────────┼─────────┼──────────────────┤
252       │            │         │         │                  │
253       │epx         │ No      │ numeric │ Longitude error  │
254       │            │         │         │ estimate in      │
255       │            │         │         │ meters.          │
256       │            │         │         │ Certainty        │
257       │            │         │         │ unknown.         │
258       ├────────────┼─────────┼─────────┼──────────────────┤
259       │            │         │         │                  │
260       │epy         │ No      │ numeric │ Latitude error   │
261       │            │         │         │ estimate in      │
262       │            │         │         │ meters.          │
263       │            │         │         │ Certainty        │
264       │            │         │         │ unknown.         │
265       ├────────────┼─────────┼─────────┼──────────────────┤
266       │            │         │         │                  │
267       │epv         │ No      │ numeric │ Estimated        │
268       │            │         │         │ vertical error   │
269       │            │         │         │ in meters.       │
270       │            │         │         │ Certainty        │
271       │            │         │         │ unknown.         │
272       ├────────────┼─────────┼─────────┼──────────────────┤
273       │            │         │         │                  │
274       │geoidSep    │ No      │ numeric │ Geoid separation │
275       │            │         │         │ is the           │
276       │            │         │         │ difference       │
277       │            │         │         │ between the      │
278       │            │         │         │ WGS84 reference  │
279       │            │         │         │ ellipsoid and    │
280       │            │         │         │ the geoid (Mean  │
281       │            │         │         │ Sea Level) in    │
282       │            │         │         │ meters. Almost   │
283       │            │         │         │ no GNSS receiver │
284       │            │         │         │ specifies how    │
285       │            │         │         │ they compute     │
286       │            │         │         │ their geoid.     │
287       │            │         │         │ gpsd             
288       │            │         │         │ interpolates the │
289       │            │         │         │ geoid from a 5x5 │
290       │            │         │         │ degree table of  │
291       │            │         │         │ EGM2008 values   │
292       │            │         │         │ when the         │
293       │            │         │         │ receiver does    │
294       │            │         │         │ not supply a     │
295       │            │         │         │ geoid            │
296       │            │         │         │ separation. The  │
297       │            │         │         │ gpsd computed    │
298       │            │         │         │ geoidSep is      │
299       │            │         │         │ usually within   │
300       │            │         │         │ one meter of the │
301       │            │         │         │ "true" value,    │
302       │            │         │         │ but can be off   │
303       │            │         │         │ as much as 12    │
304       │            │         │         │ meters.          │
305       ├────────────┼─────────┼─────────┼──────────────────┤
306       │            │         │         │                  │
307       │lat         │ No      │ numeric │ Latitude in      │
308       │            │         │         │ degrees: +/-     │
309       │            │         │         │ signifies        │
310       │            │         │         │ North/South.     │
311       ├────────────┼─────────┼─────────┼──────────────────┤
312       │            │         │         │                  │
313       │leapseconds │ No      │ integer │ Current leap     │
314       │            │         │         │ seconds.         │
315       ├────────────┼─────────┼─────────┼──────────────────┤
316       │            │         │         │                  │
317       │lon         │ No      │ numeric │ Longitude in     │
318       │            │         │         │ degrees: +/-     │
319       │            │         │         │ signifies        │
320       │            │         │         │ East/West.       │
321       ├────────────┼─────────┼─────────┼──────────────────┤
322       │            │         │         │                  │
323       │track       │ No      │ numeric │ Course over      │
324       │            │         │         │ ground, degrees  │
325       │            │         │         │ from true north. │
326       ├────────────┼─────────┼─────────┼──────────────────┤
327       │            │         │         │                  │
328       │magtrack    │ No      │ numeric │ Course over      │
329       │            │         │         │ ground, degrees  │
330       │            │         │         │ magnetic.        │
331       ├────────────┼─────────┼─────────┼──────────────────┤
332       │            │         │         │                  │
333       │magvar      │ No      │ numeric │ Magnetic         │
334       │            │         │         │ variation,       │
335       │            │         │         │ degrees. Also    │
336       │            │         │         │ known as the     │
337       │            │         │         │ magnetic         │
338       │            │         │         │ declination (the │
339       │            │         │         │ direction of the │
340       │            │         │         │ horizontal       │
341       │            │         │         │ component of the │
342       │            │         │         │ magnetic field   │
343       │            │         │         │ measured         │
344       │            │         │         │ clockwise from   │
345       │            │         │         │ north) in        │
346       │            │         │         │ degrees,         │
347       │            │         │         │ Positive is West │
348       │            │         │         │ variation.       │
349       │            │         │         │ Negative is East │
350       │            │         │         │ variation.       │
351       ├────────────┼─────────┼─────────┼──────────────────┤
352       │            │         │         │                  │
353       │speed       │ No      │ numeric │ Speed over       │
354       │            │         │         │ ground, meters   │
355       │            │         │         │ per second.      │
356       ├────────────┼─────────┼─────────┼──────────────────┤
357       │            │         │         │                  │
358       │ecefx       │ No      │ numeric │ ECEF X position  │
359       │            │         │         │ in meters.       │
360       ├────────────┼─────────┼─────────┼──────────────────┤
361       │            │         │         │                  │
362       │ecefy       │ No      │ numeric │ ECEF Y position  │
363       │            │         │         │ in meters.       │
364       ├────────────┼─────────┼─────────┼──────────────────┤
365       │            │         │         │                  │
366       │ecefz       │ No      │ numeric │ ECEF Z position  │
367       │            │         │         │ in meters.       │
368       ├────────────┼─────────┼─────────┼──────────────────┤
369       │            │         │         │                  │
370       │ecefpAcc    │ No      │ numeric │ ECEF position    │
371       │            │         │         │ error in meters. │
372       │            │         │         │ Certainty        │
373       │            │         │         │ unknown.         │
374       ├────────────┼─────────┼─────────┼──────────────────┤
375       │            │         │         │                  │
376       │ecefvx      │ No      │ numeric │ ECEF X velocity  │
377       │            │         │         │ in meters per    │
378       │            │         │         │ second.          │
379       ├────────────┼─────────┼─────────┼──────────────────┤
380       │            │         │         │                  │
381       │ecefvy      │ No      │ numeric │ ECEF Y velocity  │
382       │            │         │         │ in meters per    │
383       │            │         │         │ second.          │
384       ├────────────┼─────────┼─────────┼──────────────────┤
385       │            │         │         │                  │
386       │ecefvz      │ No      │ numeric │ ECEF Z velocity  │
387       │            │         │         │ in meters per    │
388       │            │         │         │ second.          │
389       ├────────────┼─────────┼─────────┼──────────────────┤
390       │            │         │         │                  │
391       │ecefvAcc    │ No      │ numeric │ ECEF velocity    │
392       │            │         │         │ error in meters  │
393       │            │         │         │ per second.      │
394       │            │         │         │ Certainty        │
395       │            │         │         │ unknown.         │
396       ├────────────┼─────────┼─────────┼──────────────────┤
397       │            │         │         │                  │
398       │sep         │ No      │ numeric │ Estimated        │
399       │            │         │         │ Spherical (3D)   │
400       │            │         │         │ Position Error   │
401       │            │         │         │ in meters.       │
402       │            │         │         │ Guessed to be    │
403       │            │         │         │ 95% confidence,  │
404       │            │         │         │ but many GNSS    │
405       │            │         │         │ receivers do not │
406       │            │         │         │ specify, so      │
407       │            │         │         │ certainty        │
408       │            │         │         │ unknown.         │
409       ├────────────┼─────────┼─────────┼──────────────────┤
410       │            │         │         │                  │
411       │relD        │ No      │ numeric │ Down component   │
412       │            │         │         │ of relative      │
413       │            │         │         │ position vector  │
414       │            │         │         │ in meters.       │
415       ├────────────┼─────────┼─────────┼──────────────────┤
416       │            │         │         │                  │
417       │relE        │ No      │ numeric │ East component   │
418       │            │         │         │ of relative      │
419       │            │         │         │ position vector  │
420       │            │         │         │ in meters.       │
421       ├────────────┼─────────┼─────────┼──────────────────┤
422       │            │         │         │                  │
423       │relN        │ No      │ numeric │ North component  │
424       │            │         │         │ of relative      │
425       │            │         │         │ position vector  │
426       │            │         │         │ in meters.       │
427       ├────────────┼─────────┼─────────┼──────────────────┤
428       │            │         │         │                  │
429       │velD        │ No      │ numeric │ Down velocity    │
430       │            │         │         │ component in     │
431       │            │         │         │ meters.          │
432       ├────────────┼─────────┼─────────┼──────────────────┤
433       │            │         │         │                  │
434       │velE        │ No      │ numeric │ East velocity    │
435       │            │         │         │ component in     │
436       │            │         │         │ meters.          │
437       ├────────────┼─────────┼─────────┼──────────────────┤
438       │            │         │         │                  │
439       │velN        │ No      │ numeric │ North velocity   │
440       │            │         │         │ component in     │
441       │            │         │         │ meters.          │
442       ├────────────┼─────────┼─────────┼──────────────────┤
443       │            │         │         │                  │
444       │wanglem     │ No      │ numeric │ Wind angle       │
445       │            │         │         │ magnetic in      │
446       │            │         │         │ degrees.         │
447       ├────────────┼─────────┼─────────┼──────────────────┤
448       │            │         │         │                  │
449       │wangler     │ No      │ numeric │ Wind angle       │
450       │            │         │         │ relative in      │
451       │            │         │         │ degrees.         │
452       ├────────────┼─────────┼─────────┼──────────────────┤
453       │            │         │         │                  │
454       │wanglet     │ No      │ numeric │ Wind angle true  │
455       │            │         │         │ in degrees.      │
456       ├────────────┼─────────┼─────────┼──────────────────┤
457       │            │         │         │                  │
458       │wspeedr     │ No      │ numeric │ Wind speed       │
459       │            │         │         │ relative in      │
460       │            │         │         │ meters per       │
461       │            │         │         │ second.          │
462       ├────────────┼─────────┼─────────┼──────────────────┤
463       │            │         │         │                  │
464       │wspeedt     │ No      │ numeric │ Wind speed true  │
465       │            │         │         │ in meters per    │
466       │            │         │         │ second.          │
467       └────────────┴─────────┴─────────┴──────────────────┘
468
469       When the C client library parses a response of this kind, it will
470       assert validity bits in the top-level set member for each field
471       received; see gps.h for bitmask names and values.
472
473       Invalid or unknown floating-point values will be set to NAN. Always
474       check floating point values with isfinite() before use. isnan() is not
475       sufficient.
476
477       Here’s an example TPV sentence:
478
479           {"class":"TPV","device":"/dev/pts/1",
480               "time":"2005-06-08T10:34:48.283Z","ept":0.005,
481               "lat":46.498293369,"lon":7.567411672,"alt":1343.127,
482               "eph":36.000,"epv":32.321,
483               "track":10.3788,"speed":0.091,"climb":-0.085,"mode":3}
484
485   SKY
486       A SKY object reports a sky view of the GPS satellite positions. If
487       there is no GPS device available, or no skyview has been reported yet,
488       only the "class" field will reliably be present.
489
490       Table 2. SKY object
491       ┌───────────┬─────────┬─────────┬──────────────────┐
492       │           │         │         │                  │
493       │Name       │ Always? │ Type    │ Description      │
494       ├───────────┼─────────┼─────────┼──────────────────┤
495       │           │         │         │                  │
496       │class      │ Yes     │ string  │ Fixed: "SKY"     │
497       ├───────────┼─────────┼─────────┼──────────────────┤
498       │           │         │         │                  │
499       │device     │ No      │ string  │ Name of          │
500       │           │         │         │ originating      │
501       │           │         │         │ device           │
502       ├───────────┼─────────┼─────────┼──────────────────┤
503       │           │         │         │                  │
504       │time       │ No      │ string  │ Time/date stamp  │
505       │           │         │         │ in ISO8601       │
506       │           │         │         │ format, UTC. May │
507       │           │         │         │ have a           │
508       │           │         │         │ fractional part  │
509       │           │         │         │ of up to .001sec │
510       │           │         │         │ precision.       │
511       ├───────────┼─────────┼─────────┼──────────────────┤
512       │           │         │         │                  │
513       │gdop       │ No      │ numeric │ Geometric        │
514       │           │         │         │ (hyperspherical) │
515       │           │         │         │ dilution of      │
516       │           │         │         │ precision, a     │
517       │           │         │         │ combination of   │
518       │           │         │         │ PDOP and TDOP. A │
519       │           │         │         │ dimensionless    │
520       │           │         │         │ factor which     │
521       │           │         │         │ should be        │
522       │           │         │         │ multiplied by a  │
523       │           │         │         │ base UERE to get │
524       │           │         │         │ an error         │
525       │           │         │         │ estimate.        │
526       ├───────────┼─────────┼─────────┼──────────────────┤
527       │           │         │         │                  │
528       │hdop       │ No      │ numeric │ Horizontal       │
529       │           │         │         │ dilution of      │
530       │           │         │         │ precision, a     │
531       │           │         │         │ dimensionless    │
532       │           │         │         │ factor which     │
533       │           │         │         │ should be        │
534       │           │         │         │ multiplied by a  │
535       │           │         │         │ base UERE to get │
536       │           │         │         │ a circular error │
537       │           │         │         │ estimate.        │
538       ├───────────┼─────────┼─────────┼──────────────────┤
539       │           │         │         │                  │
540       │pdop       │ No      │ numeric │ Position         │
541       │           │         │         │ (spherical/3D)   │
542       │           │         │         │ dilution of      │
543       │           │         │         │ precision, a     │
544       │           │         │         │ dimensionless    │
545       │           │         │         │ factor which     │
546       │           │         │         │ should be        │
547       │           │         │         │ multiplied by a  │
548       │           │         │         │ base UERE to get │
549       │           │         │         │ an error         │
550       │           │         │         │ estimate.        │
551       ├───────────┼─────────┼─────────┼──────────────────┤
552       │           │         │         │                  │
553       │tdop       │ No      │ numeric │ Time dilution of │
554       │           │         │         │ precision, a     │
555       │           │         │         │ dimensionless    │
556       │           │         │         │ factor which     │
557       │           │         │         │ should be        │
558       │           │         │         │ multiplied by a  │
559       │           │         │         │ base UERE to get │
560       │           │         │         │ an error         │
561       │           │         │         │ estimate.        │
562       ├───────────┼─────────┼─────────┼──────────────────┤
563       │           │         │         │                  │
564       │vdop       │ No      │ numeric │ Vertical         │
565       │           │         │         │ (altitude)       │
566       │           │         │         │ dilution of      │
567       │           │         │         │ precision, a     │
568       │           │         │         │ dimensionless    │
569       │           │         │         │ factor which     │
570       │           │         │         │ should be        │
571       │           │         │         │ multiplied by a  │
572       │           │         │         │ base UERE to get │
573       │           │         │         │ an error         │
574       │           │         │         │ estimate.        │
575       ├───────────┼─────────┼─────────┼──────────────────┤
576       │           │         │         │                  │
577       │xdop       │ No      │ numeric │ Longitudinal     │
578       │           │         │         │ dilution of      │
579       │           │         │         │ precision, a     │
580       │           │         │         │ dimensionless    │
581       │           │         │         │ factor which     │
582       │           │         │         │ should be        │
583       │           │         │         │ multiplied by a  │
584       │           │         │         │ base UERE to get │
585       │           │         │         │ an error         │
586       │           │         │         │ estimate.        │
587       ├───────────┼─────────┼─────────┼──────────────────┤
588       │           │         │         │                  │
589       │ydop       │ No      │ numeric │ Latitudinal      │
590       │           │         │         │ dilution of      │
591       │           │         │         │ precision, a     │
592       │           │         │         │ dimensionless    │
593       │           │         │         │ factor which     │
594       │           │         │         │ should be        │
595       │           │         │         │ multiplied by a  │
596       │           │         │         │ base UERE to get │
597       │           │         │         │ an error         │
598       │           │         │         │ estimate.        │
599       ├───────────┼─────────┼─────────┼──────────────────┤
600       │           │         │         │                  │
601       │nSat       │ No      │ numeric │ Number of        │
602       │           │         │         │ satellite        │
603       │           │         │         │ objects in       │
604       │           │         │         │ "satellites"     │
605       │           │         │         │ array.           │
606       ├───────────┼─────────┼─────────┼──────────────────┤
607       │           │         │         │                  │
608       │uSat       │ No      │ numeric │ Number of        │
609       │           │         │         │ satellites used  │
610       │           │         │         │ in navigation    │
611       │           │         │         │ solution.        │
612       ├───────────┼─────────┼─────────┼──────────────────┤
613       │           │         │         │                  │
614       │satellites │ Yes     │ list    │ List of          │
615       │           │         │         │ satellite        │
616       │           │         │         │ objects in       │
617       │           │         │         │ skyview          │
618       └───────────┴─────────┴─────────┴──────────────────┘
619
620       Many devices compute dilution of precision factors but do not include
621       them in their reports. Many that do report DOPs report only HDOP,
622       two-dimensional circular error. gpsd always passes through whatever the
623       device reports, then attempts to fill in other DOPs by calculating the
624       appropriate determinants in a covariance matrix based on the satellite
625       view. DOPs may be missing if some of these determinants are singular.
626       It can even happen that the device reports an error estimate in meters
627       when the corresponding DOP is unavailable; some devices use more
628       sophisticated error modeling than the covariance calculation.
629
630       The satellite list objects have the following elements:
631
632       Table 3. Satellite object
633       ┌───────┬─────────┬─────────┬──────────────────┐
634       │       │         │         │                  │
635       │Name   │ Always? │ Type    │ Description      │
636       ├───────┼─────────┼─────────┼──────────────────┤
637       │       │         │         │                  │
638       │PRN    │ Yes     │ numeric │ PRN ID of the    │
639       │       │         │         │ satellite. 1-63  │
640       │       │         │         │ are GNSS         │
641       │       │         │         │ satellites,      │
642       │       │         │         │ 64-96 are        │
643       │       │         │         │ GLONASS          │
644       │       │         │         │ satellites,      │
645       │       │         │         │ 100-164 are SBAS │
646       │       │         │         │ satellites       │
647       ├───────┼─────────┼─────────┼──────────────────┤
648       │       │         │         │                  │
649       │az     │ No      │ numeric │ Azimuth, degrees │
650       │       │         │         │ from true north. │
651       ├───────┼─────────┼─────────┼──────────────────┤
652       │       │         │         │                  │
653       │el     │ No      │ numeric │ Elevation in     │
654       │       │         │         │ degrees.         │
655       ├───────┼─────────┼─────────┼──────────────────┤
656       │       │         │         │                  │
657       │ss     │ No      │ numeric │ Signal to Noise  │
658       │       │         │         │ ratio in dBHz.   │
659       ├───────┼─────────┼─────────┼──────────────────┤
660       │       │         │         │                  │
661       │used   │ Yes     │ boolean │ Used in current  │
662       │       │         │         │ solution?        │
663       │       │         │         │ (SBAS/WAAS/EGNOS │
664       │       │         │         │ satellites may   │
665       │       │         │         │ be flagged used  │
666       │       │         │         │ if the solution  │
667       │       │         │         │ has corrections  │
668       │       │         │         │ from them, but   │
669       │       │         │         │ not all drivers  │
670       │       │         │         │ make this        │
671       │       │         │         │ information      │
672       │       │         │         │ available.)      │
673       ├───────┼─────────┼─────────┼──────────────────┤
674       │       │         │         │                  │
675       │gnssid │ No      │ numeric │ The GNSS ID, as  │
676       │       │         │         │ defined by       │
677       │       │         │         │ u-blox, not      │
678       │       │         │         │ NMEA. 0=GPS,     │
679       │       │         │         │ 2=Galileo,       │
680       │       │         │         │ 3=Beidou,        │
681       │       │         │         │ 5=QZSS,          │
682       │       │         │         │ 6-GLONASS.       │
683       ├───────┼─────────┼─────────┼──────────────────┤
684       │       │         │         │                  │
685       │svid   │ No      │ numeric │ The satellite ID │
686       │       │         │         │ within its       │
687       │       │         │         │ constellation.   │
688       │       │         │         │ As defined by    │
689       │       │         │         │ u-blox, not      │
690       │       │         │         │ NMEA).           │
691       ├───────┼─────────┼─────────┼──────────────────┤
692       │       │         │         │                  │
693       │sigid  │ No      │ numeric │ The signal ID of │
694       │       │         │         │ this signal. As  │
695       │       │         │         │ defined by       │
696       │       │         │         │ u-blox, not      │
697       │       │         │         │ NMEA. See u-blox │
698       │       │         │         │ doc for details. │
699       ├───────┼─────────┼─────────┼──────────────────┤
700       │       │         │         │                  │
701       │freqid │ No      │ numeric │ For GLONASS      │
702       │       │         │         │ satellites only: │
703       │       │         │         │ the frequency ID │
704       │       │         │         │ of the signal.   │
705       │       │         │         │ As defined by    │
706       │       │         │         │ u-blox, range 0  │
707       │       │         │         │ to 13. The       │
708       │       │         │         │ freqid is the    │
709       │       │         │         │ frequency slot   │
710       │       │         │         │ plus 7.          │
711       ├───────┼─────────┼─────────┼──────────────────┤
712       │       │         │         │                  │
713       │health │ No      │ numeric │ The health of    │
714       │       │         │         │ this satellite.  │
715       │       │         │         │ 0 is unknown, 1  │
716       │       │         │         │ is OK, and 2 is  │
717       │       │         │         │ unhealthy.       │
718       └───────┴─────────┴─────────┴──────────────────┘
719
720       Note that satellite objects do not have a "class" field, as they are
721       never shipped outside of a SKY object.
722
723       When the C client library parses a SKY response, it will assert the
724       SATELLITE_SET bit in the top-level set member.
725
726       Here’s an example:
727
728           {"class":"SKY","device":"/dev/pts/1",
729               "time":"2005-07-08T11:28:07.114Z",
730               "xdop":1.55,"hdop":1.24,"pdop":1.99,
731               "satellites":[
732                   {"PRN":23,"el":6,"az":84,"ss":0,"used":false},
733                   {"PRN":28,"el":7,"az":160,"ss":0,"used":false},
734                   {"PRN":8,"el":66,"az":189,"ss":44,"used":true},
735                   {"PRN":29,"el":13,"az":273,"ss":0,"used":false},
736                   {"PRN":10,"el":51,"az":304,"ss":29,"used":true},
737                   {"PRN":4,"el":15,"az":199,"ss":36,"used":true},
738                   {"PRN":2,"el":34,"az":241,"ss":43,"used":true},
739                   {"PRN":27,"el":71,"az":76,"ss":43,"used":true}]}
740
741   GST
742       A GST object is a pseudorange noise report.
743
744       Table 4. GST object
745       ┌───────┬─────────┬─────────┬──────────────────┐
746       │       │         │         │                  │
747       │Name   │ Always? │ Type    │ Description      │
748       ├───────┼─────────┼─────────┼──────────────────┤
749       │       │         │         │                  │
750       │class  │ Yes     │ string  │ Fixed: "GST"     │
751       ├───────┼─────────┼─────────┼──────────────────┤
752       │       │         │         │                  │
753       │device │ No      │ string  │ Name of          │
754       │       │         │         │ originating      │
755       │       │         │         │ device           │
756       ├───────┼─────────┼─────────┼──────────────────┤
757       │       │         │         │                  │
758       │time   │ No      │ string  │ Time/date stamp  │
759       │       │         │         │ in ISO8601       │
760       │       │         │         │ format, UTC. May │
761       │       │         │         │ have a           │
762       │       │         │         │ fractional part  │
763       │       │         │         │ of up to .001sec │
764       │       │         │         │ precision.       │
765       ├───────┼─────────┼─────────┼──────────────────┤
766       │       │         │         │                  │
767       │rms    │ No      │ numeric │ Value of the     │
768       │       │         │         │ standard         │
769       │       │         │         │ deviation of the │
770       │       │         │         │ range inputs to  │
771       │       │         │         │ the navigation   │
772       │       │         │         │ process (range   │
773       │       │         │         │ inputs include   │
774       │       │         │         │ pseudoranges and │
775       │       │         │         │ DGPS             │
776       │       │         │         │ corrections).    │
777       ├───────┼─────────┼─────────┼──────────────────┤
778       │       │         │         │                  │
779       │major  │ No      │ numeric │ Standard         │
780       │       │         │         │ deviation of     │
781       │       │         │         │ semi-major axis  │
782       │       │         │         │ of error         │
783       │       │         │         │ ellipse, in      │
784       │       │         │         │ meters.          │
785       ├───────┼─────────┼─────────┼──────────────────┤
786       │       │         │         │                  │
787       │minor  │ No      │ numeric │ Standard         │
788       │       │         │         │ deviation of     │
789       │       │         │         │ semi-minor axis  │
790       │       │         │         │ of error         │
791       │       │         │         │ ellipse, in      │
792       │       │         │         │ meters.          │
793       ├───────┼─────────┼─────────┼──────────────────┤
794       │       │         │         │                  │
795       │orient │ No      │ numeric │ Orientation of   │
796       │       │         │         │ semi-major axis  │
797       │       │         │         │ of error         │
798       │       │         │         │ ellipse, in      │
799       │       │         │         │ degrees from     │
800       │       │         │         │ true north.      │
801       ├───────┼─────────┼─────────┼──────────────────┤
802       │       │         │         │                  │
803       │lat    │ No      │ numeric │ Standard         │
804       │       │         │         │ deviation of     │
805       │       │         │         │ latitude error,  │
806       │       │         │         │ in meters.       │
807       ├───────┼─────────┼─────────┼──────────────────┤
808       │       │         │         │                  │
809       │lon    │ No      │ numeric │ Standard         │
810       │       │         │         │ deviation of     │
811       │       │         │         │ longitude error, │
812       │       │         │         │ in meters.       │
813       ├───────┼─────────┼─────────┼──────────────────┤
814       │       │         │         │                  │
815       │alt    │ No      │ numeric │ Standard         │
816       │       │         │         │ deviation of     │
817       │       │         │         │ altitude error,  │
818       │       │         │         │ in meters.       │
819       └───────┴─────────┴─────────┴──────────────────┘
820
821       Here’s an example:
822
823           {"class":"GST","device":"/dev/ttyUSB0",
824                   "time":"2010-12-07T10:23:07.096Z","rms":2.440,
825                   "major":1.660,"minor":1.120,"orient":68.989,
826                   "lat":1.600,"lon":1.200,"alt":2.520}
827
828   ATT
829       An ATT object is a vehicle-attitude report. It is returned by
830       digital-compass and gyroscope sensors; depending on device, it may
831       include: heading, pitch, roll, yaw, gyroscope, and magnetic-field
832       readings. Because such sensors are often bundled as part of
833       marine-navigation systems, the ATT response may also include water
834       depth.
835
836       The "class" and "mode" fields will reliably be present. Others may be
837       reported or not depending on the specific device type.
838
839       The ATT object is synchronous to the GNSS epoch. Some devices report
840       attitude information with arbitrary, even out of order, time scales.
841       gpsd reports those in an IMU object. The ATT and IMU objects have the
842       same fields, but IMU objects are output as soon as possible. Some
843       devices output both types with arbitrary interleaving.
844
845       Table 5. ATT object
846       ┌─────────┬─────────┬─────────┬──────────────────┐
847       │         │         │         │                  │
848       │Name     │ Always? │ Type    │ Description      │
849       ├─────────┼─────────┼─────────┼──────────────────┤
850       │         │         │         │                  │
851       │class    │ Yes     │ string  │ Fixed: "ATT"     │
852       ├─────────┼─────────┼─────────┼──────────────────┤
853       │         │         │         │                  │
854       │device   │ Yes     │ string  │ Name of          │
855       │         │         │         │ originating      │
856       │         │         │         │ device           │
857       ├─────────┼─────────┼─────────┼──────────────────┤
858       │         │         │         │                  │
859       │time     │ No      │ string  │ Time/date stamp  │
860       │         │         │         │ in ISO8601       │
861       │         │         │         │ format, UTC. May │
862       │         │         │         │ have a           │
863       │         │         │         │ fractional part  │
864       │         │         │         │ of up to .001sec │
865       │         │         │         │ precision.       │
866       ├─────────┼─────────┼─────────┼──────────────────┤
867       │         │         │         │                  │
868       │timeTag  │ No      │ string  │ Arbitrary time   │
869       │         │         │         │ tag of           │
870       │         │         │         │ measurement.     │
871       ├─────────┼─────────┼─────────┼──────────────────┤
872       │         │         │         │                  │
873       │heading  │ No      │ numeric │ Heading, degrees │
874       │         │         │         │ from true north. │
875       ├─────────┼─────────┼─────────┼──────────────────┤
876       │         │         │         │                  │
877       │mag_st   │ No      │ string  │ Magnetometer     │
878       │         │         │         │ status.          │
879       ├─────────┼─────────┼─────────┼──────────────────┤
880       │         │         │         │                  │
881       │pitch    │ No      │ numeric │ Pitch in         │
882       │         │         │         │ degrees.         │
883       ├─────────┼─────────┼─────────┼──────────────────┤
884       │         │         │         │                  │
885       │pitch_st │ No      │ string  │ Pitch sensor     │
886       │         │         │         │ status.          │
887       ├─────────┼─────────┼─────────┼──────────────────┤
888       │         │         │         │                  │
889       │yaw      │ No      │ numeric │ Yaw in degrees   │
890       ├─────────┼─────────┼─────────┼──────────────────┤
891       │         │         │         │                  │
892       │yaw_st   │ No      │ string  │ Yaw sensor       │
893       │         │         │         │ status.          │
894       ├─────────┼─────────┼─────────┼──────────────────┤
895       │         │         │         │                  │
896       │roll     │ No      │ numeric │ Roll in degrees. │
897       ├─────────┼─────────┼─────────┼──────────────────┤
898       │         │         │         │                  │
899       │roll_st  │ No      │ string  │ Roll sensor      │
900       │         │         │         │ status.          │
901       ├─────────┼─────────┼─────────┼──────────────────┤
902       │         │         │         │                  │
903       │dip      │ No      │ numeric │ Local magnetic   │
904       │         │         │         │ inclination,     │
905       │         │         │         │ degrees,         │
906       │         │         │         │ positive when    │
907       │         │         │         │ the magnetic     │
908       │         │         │         │ field points     │
909       │         │         │         │ downward (into   │
910       │         │         │         │ the Earth).      │
911       ├─────────┼─────────┼─────────┼──────────────────┤
912       │         │         │         │                  │
913       │mag_len  │ No      │ numeric │ Scalar magnetic  │
914       │         │         │         │ field strength.  │
915       ├─────────┼─────────┼─────────┼──────────────────┤
916       │         │         │         │                  │
917       │mag_x    │ No      │ numeric │ X component of   │
918       │         │         │         │ magnetic field   │
919       │         │         │         │ strength.        │
920       ├─────────┼─────────┼─────────┼──────────────────┤
921       │         │         │         │                  │
922       │mag_y    │ No      │ numeric │ Y component of   │
923       │         │         │         │ magnetic field   │
924       │         │         │         │ strength.        │
925       ├─────────┼─────────┼─────────┼──────────────────┤
926       │         │         │         │                  │
927       │mag_z    │ No      │ numeric │ Z component of   │
928       │         │         │         │ magnetic field   │
929       │         │         │         │ strength.        │
930       ├─────────┼─────────┼─────────┼──────────────────┤
931       │         │         │         │                  │
932       │acc_len  │ No      │ numeric │ Scalar           │
933       │         │         │         │ acceleration.    │
934       ├─────────┼─────────┼─────────┼──────────────────┤
935       │         │         │         │                  │
936       │acc_x    │ No      │ numeric │ X component of   │
937       │         │         │         │ acceleration     │
938       │         │         │         │ (m/s^2).         │
939       ├─────────┼─────────┼─────────┼──────────────────┤
940       │         │         │         │                  │
941       │acc_y    │ No      │ numeric │ Y component of   │
942       │         │         │         │ acceleration     │
943       │         │         │         │ (m/s^2).         │
944       ├─────────┼─────────┼─────────┼──────────────────┤
945       │         │         │         │                  │
946       │acc_z    │ No      │ numeric │ Z component of   │
947       │         │         │         │ acceleration     │
948       │         │         │         │ (m/s^2).         │
949       ├─────────┼─────────┼─────────┼──────────────────┤
950       │         │         │         │                  │
951       │gyro_x   │ No      │ numeric │ X component of   │
952       │         │         │         │ angular rate     │
953       │         │         │         │ (deg/s)          │
954       ├─────────┼─────────┼─────────┼──────────────────┤
955       │         │         │         │                  │
956       │gyro_y   │ No      │ numeric │ Y component of   │
957       │         │         │         │ angular rate     │
958       │         │         │         │ (deg/s)          │
959       ├─────────┼─────────┼─────────┼──────────────────┤
960       │         │         │         │                  │
961       │gyro_z   │ No      │ numeric │ Z component of   │
962       │         │         │         │ angular rate     │
963       │         │         │         │ (deg/s)          │
964       ├─────────┼─────────┼─────────┼──────────────────┤
965       │         │         │         │                  │
966       │depth    │ No      │ numeric │ Water depth in   │
967       │         │         │         │ meters.          │
968       ├─────────┼─────────┼─────────┼──────────────────┤
969       │         │         │         │                  │
970       │temp     │ No      │ numeric │ Temperature at   │
971       │         │         │         │ the sensor,      │
972       │         │         │         │ degrees          │
973       │         │         │         │ centigrade.      │
974       └─────────┴─────────┴─────────┴──────────────────┘
975
976       The heading, pitch, and roll status codes (if present) vary by device.
977       For the TNT Revolution digital compasses, they are coded as follows:
978
979       Table 6. Device flags
980       ┌─────┬────────────────────────────┐
981       │     │                            │
982       │Code │ Description                │
983       ├─────┼────────────────────────────┤
984       │     │                            │
985       │C    │ magnetometer calibration   │
986       │     │ alarm                      │
987       ├─────┼────────────────────────────┤
988       │     │                            │
989       │L    │ low alarm                  │
990       ├─────┼────────────────────────────┤
991       │     │                            │
992       │M    │ low warning                │
993       ├─────┼────────────────────────────┤
994       │     │                            │
995       │N    │ normal                     │
996       ├─────┼────────────────────────────┤
997       │     │                            │
998       │O    │ high warning               │
999       ├─────┼────────────────────────────┤
1000       │     │                            │
1001       │P    │ high alarm                 │
1002       ├─────┼────────────────────────────┤
1003       │     │                            │
1004       │V    │ magnetometer voltage level │
1005       │     │ alarm                      │
1006       └─────┴────────────────────────────┘
1007
1008       When the C client library parses a response of this kind, it will
1009       assert ATT_IS.
1010
1011       Here’s an example:
1012
1013           {"class":"ATT","time":1270938096.843,
1014               "heading":14223.00,"mag_st":"N",
1015               "pitch":169.00,"pitch_st":"N", "roll":-43.00,"roll_st":"N",
1016               "dip":13641.000,"mag_x":2454.000}
1017
1018   IMU
1019       The IMU object is asynchronous to the GNSS epoch. It is reported with
1020       arbitrary, even out of order, time scales.
1021
1022       The ATT and IMU objects have the same fields, but IMU objects are
1023       output as soon as possible.
1024
1025       Seee the ATT onject description for field details.
1026
1027   TOFF
1028       This message is emitted on each cycle and reports the offset between
1029       the host’s clock time and the GPS time at top of the second (actually,
1030       when the first data for the reporting cycle is received).
1031
1032       This message exactly mirrors the PPS message.
1033
1034       The TOFF message reports the GPS time as derived from the GPS serial
1035       data stream. The PPS message reports the GPS time as derived from the
1036       GPS PPS pulse.
1037
1038       A TOFF object has the following elements:
1039
1040       Table 7. TOFF object
1041       ┌───────────┬─────────┬─────────┬──────────────────┐
1042       │           │         │         │                  │
1043       │Name       │ Always? │ Type    │ Description      │
1044       ├───────────┼─────────┼─────────┼──────────────────┤
1045       │           │         │         │                  │
1046       │class      │ Yes     │ string  │ Fixed: "TOFF"    │
1047       ├───────────┼─────────┼─────────┼──────────────────┤
1048       │           │         │         │                  │
1049       │device     │ Yes     │ string  │ Name of the      │
1050       │           │         │         │ originating      │
1051       │           │         │         │ device           │
1052       ├───────────┼─────────┼─────────┼──────────────────┤
1053       │           │         │         │                  │
1054       │real_sec   │ Yes     │ numeric │ seconds from the │
1055       │           │         │         │ GPS clock        │
1056       ├───────────┼─────────┼─────────┼──────────────────┤
1057       │           │         │         │                  │
1058       │real_nsec  │ Yes     │ numeric │ nanoseconds from │
1059       │           │         │         │ the GPS clock    │
1060       ├───────────┼─────────┼─────────┼──────────────────┤
1061       │           │         │         │                  │
1062       │clock_sec  │ Yes     │ numeric │ seconds from the │
1063       │           │         │         │ system clock     │
1064       ├───────────┼─────────┼─────────┼──────────────────┤
1065       │           │         │         │                  │
1066       │clock_nsec │ Yes     │ numeric │ nanoseconds from │
1067       │           │         │         │ the system clock │
1068       └───────────┴─────────┴─────────┴──────────────────┘
1069
1070       This message is emitted once per second to watchers of a device and is
1071       intended to report the timestamps of the in-band report of the GPS and
1072       seconds as reported by the system clock (which may be NTP-corrected)
1073       when the first valid time stamp of the reporting cycle was seen.
1074
1075       The message contains two second/nanosecond pairs: real_sec and
1076       real_nsec contain the time the GPS thinks it was at the start of the
1077       current cycle; clock_sec and clock_nsec contain the time the system
1078       clock thinks it was on receipt of the first timing message of the
1079       cycle. real_nsec is always to nanosecond precision. clock_nsec is
1080       nanosecond precision on most systems.
1081
1082       Here’s an example:
1083
1084           {"class":"TOFF","device":"/dev/ttyUSB0",
1085                "real_sec":1330212592, "real_nsec":343182,
1086                "clock_sec":1330212592,"clock_nsec":343184,
1087                "precision":-2}
1088
1089   PPS
1090       This message is emitted each time the daemon sees a valid PPS (Pulse
1091       Per Second) strobe from a device.
1092
1093       This message exactly mirrors the TOFF message.
1094
1095       The TOFF message reports the GPS time as derived from the GPS serial
1096       data stream. The PPS message reports the GPS time as derived from the
1097       GPS PPS pulse.
1098
1099       There are various sources of error in the reported clock times. The
1100       speed of the serial connection between the GPS and the system adds a
1101       delay to the start of cycle detection. An even bigger error is added by
1102       the variable computation time inside the GPS. Taken together the time
1103       derived from the start of the GPS cycle can have offsets of 10
1104       milliseconds to 700 milliseconds and combined jitter and wander of 100
1105       to 300 milliseconds.
1106
1107       See the NTP documentation for their definition of precision.
1108
1109       A PPS object has the following elements:
1110
1111       Table 8. PPS object
1112       ┌───────────┬─────────┬─────────┬──────────────────┐
1113       │           │         │         │                  │
1114       │Name       │ Always? │ Type    │ Description      │
1115       ├───────────┼─────────┼─────────┼──────────────────┤
1116       │           │         │         │                  │
1117       │class      │ Yes     │ string  │ Fixed: "PPS"     │
1118       ├───────────┼─────────┼─────────┼──────────────────┤
1119       │           │         │         │                  │
1120       │device     │ Yes     │ string  │ Name of the      │
1121       │           │         │         │ originating      │
1122       │           │         │         │ device           │
1123       ├───────────┼─────────┼─────────┼──────────────────┤
1124       │           │         │         │                  │
1125       │real_sec   │ Yes     │ numeric │ seconds from the │
1126       │           │         │         │ PPS source       │
1127       ├───────────┼─────────┼─────────┼──────────────────┤
1128       │           │         │         │                  │
1129       │real_nsec  │ Yes     │ numeric │ nanoseconds from │
1130       │           │         │         │ the PPS source   │
1131       ├───────────┼─────────┼─────────┼──────────────────┤
1132       │           │         │         │                  │
1133       │clock_sec  │ Yes     │ numeric │ seconds from the │
1134       │           │         │         │ system clock     │
1135       ├───────────┼─────────┼─────────┼──────────────────┤
1136       │           │         │         │                  │
1137       │clock_nsec │ Yes     │ numeric │ nanoseconds from │
1138       │           │         │         │ the system clock │
1139       ├───────────┼─────────┼─────────┼──────────────────┤
1140       │           │         │         │                  │
1141       │precision  │ Yes     │ numeric │ NTP style        │
1142       │           │         │         │ estimate of PPS  │
1143       │           │         │         │ precision        │
1144       ├───────────┼─────────┼─────────┼──────────────────┤
1145       │           │         │         │                  │
1146       │shm        │ Yes     │ string  │ shm key of this  │
1147       │           │         │         │ PPS              │
1148       ├───────────┼─────────┼─────────┼──────────────────┤
1149       │           │         │         │                  │
1150       │qErr       │ No      │ numeric │ Quantization     │
1151       │           │         │         │ error of the     │
1152       │           │         │         │ PPS, in          │
1153       │           │         │         │ picoseconds.     │
1154       │           │         │         │ Sometimes called │
1155       │           │         │         │ the "sawtooth"   │
1156       │           │         │         │ error.           │
1157       └───────────┴─────────┴─────────┴──────────────────┘
1158
1159       This message is emitted once per second to watchers of a device
1160       emitting PPS, and reports the time of the start of the GPS second (when
1161       the 1PPS arrives) and seconds as reported by the system clock (which
1162       may be NTP-corrected) at that moment.
1163
1164       The message contains two second/nanosecond pairs: real_sec and
1165       real_nsec contain the time the GPS thinks it was at the PPS edge;
1166       clock_sec and clock_nsec contain the time the system clock thinks it
1167       was at the PPS edge. real_nsec is always to nanosecond precision.
1168       clock_nsec is nanosecond precision on most systems.
1169
1170       There are various sources of error in the reported clock times. For PPS
1171       delivered via a real serial-line strobe, serial-interrupt latency plus
1172       processing time to the timer call should be bounded above by about 10
1173       microseconds; that can be reduced to less than 1 microsecond if your
1174       kernel supports [RFC-2783]. USB1.1-to-serial control-line emulation is
1175       limited to about 1 millisecond. seconds.
1176
1177       Here’s an example:
1178
1179           {"class":"PPS","device":"/dev/ttyUSB0",
1180                "real_sec":1330212592, "real_nsec":343182,
1181                "clock_sec":1330212592,"clock_nsec":343184,
1182                "precision":-3}
1183
1184   OSC
1185       This message reports the status of a GPS-disciplined oscillator
1186       (GPSDO). The GPS PPS output (which has excellent long-term stability)
1187       is typically used to discipline a local oscillator with much better
1188       short-term stability (such as a rubidium atomic clock).
1189
1190       An OSC object has the following elements:
1191
1192       Table 9. OSC object
1193       ┌────────────┬─────────┬─────────┬──────────────────┐
1194       │            │         │         │                  │
1195       │Name        │ Always? │ Type    │ Description      │
1196       ├────────────┼─────────┼─────────┼──────────────────┤
1197       │            │         │         │                  │
1198       │class       │ Yes     │ string  │ Fixed: "OSC"     │
1199       ├────────────┼─────────┼─────────┼──────────────────┤
1200       │            │         │         │                  │
1201       │device      │ Yes     │ string  │ Name of the      │
1202       │            │         │         │ originating      │
1203       │            │         │         │ device.          │
1204       ├────────────┼─────────┼─────────┼──────────────────┤
1205       │            │         │         │                  │
1206       │running     │ Yes     │ boolean │ If true, the     │
1207       │            │         │         │ oscillator is    │
1208       │            │         │         │ currently        │
1209       │            │         │         │ running.         │
1210       │            │         │         │ Oscillators may  │
1211       │            │         │         │ require warm-up  │
1212       │            │         │         │ time at the      │
1213       │            │         │         │ start of the     │
1214       │            │         │         │ day.             │
1215       ├────────────┼─────────┼─────────┼──────────────────┤
1216       │            │         │         │                  │
1217       │reference   │ Yes     │ boolean │ If true, the     │
1218       │            │         │         │ oscillator is    │
1219       │            │         │         │ receiving a GPS  │
1220       │            │         │         │ PPS signal.      │
1221       ├────────────┼─────────┼─────────┼──────────────────┤
1222       │            │         │         │                  │
1223       │disciplined │ Yes     │ boolean │ If true, the GPS │
1224       │            │         │         │ PPS signal is    │
1225       │            │         │         │ sufficiently     │
1226       │            │         │         │ stable and is    │
1227       │            │         │         │ being used to    │
1228       │            │         │         │ discipline the   │
1229       │            │         │         │ local            │
1230       │            │         │         │ oscillator.      │
1231       ├────────────┼─────────┼─────────┼──────────────────┤
1232       │            │         │         │                  │
1233       │delta       │ Yes     │ numeric │ The time         │
1234       │            │         │         │ difference (in   │
1235       │            │         │         │ nanoseconds)     │
1236       │            │         │         │ between the      │
1237       │            │         │         │ GPS-disciplined  │
1238       │            │         │         │ oscillator PPS   │
1239       │            │         │         │ output pulse and │
1240       │            │         │         │ the most recent  │
1241       │            │         │         │ GPS PPS input    │
1242       │            │         │         │ pulse.           │
1243       └────────────┴─────────┴─────────┴──────────────────┘
1244
1245       Here’s an example:
1246
1247           {"class":"OSC","running":true,"device":"/dev/ttyUSB0",
1248               "reference":true,"disciplined":true,"delta":67}
1249

CORE PROTOCOL COMMANDS

1251       And here are the commands you can send to gpsd.
1252
1253   ?VERSION;
1254       Returns an object with the following attributes:
1255
1256       Table 10. VERSION object
1257       ┌────────────┬─────────┬─────────┬──────────────────┐
1258       │            │         │         │                  │
1259       │Name        │ Always? │ Type    │ Description      │
1260       ├────────────┼─────────┼─────────┼──────────────────┤
1261       │            │         │         │                  │
1262       │class       │ Yes     │ string  │ Fixed: "VERSION" │
1263       ├────────────┼─────────┼─────────┼──────────────────┤
1264       │            │         │         │                  │
1265       │release     │ Yes     │ string  │ Public release   │
1266       │            │         │         │ level            │
1267       ├────────────┼─────────┼─────────┼──────────────────┤
1268       │            │         │         │                  │
1269       │rev         │ Yes     │ string  │ Internal         │
1270       │            │         │         │ revision-control │
1271       │            │         │         │ level.           │
1272       ├────────────┼─────────┼─────────┼──────────────────┤
1273       │            │         │         │                  │
1274       │proto_major │ Yes     │ numeric │ API major        │
1275       │            │         │         │ revision level.  │
1276       ├────────────┼─────────┼─────────┼──────────────────┤
1277       │            │         │         │                  │
1278       │proto_minor │ Yes     │ numeric │ API minor        │
1279       │            │         │         │ revision level.  │
1280       ├────────────┼─────────┼─────────┼──────────────────┤
1281       │            │         │         │                  │
1282       │remote      │ No      │ string  │ URL of the       │
1283       │            │         │         │ remote daemon    │
1284       │            │         │         │ reporting this   │
1285       │            │         │         │ version. If      │
1286       │            │         │         │ empty, this is   │
1287       │            │         │         │ the version of   │
1288       │            │         │         │ the local        │
1289       │            │         │         │ daemon.          │
1290       └────────────┴─────────┴─────────┴──────────────────┘
1291
1292       The daemon ships a VERSION response to each client when the client
1293       first connects to it.
1294
1295       When the C client library parses a response of this kind, it will
1296       assert the VERSION_SET bit in the top-level set member.
1297
1298       Here’s an example:
1299
1300           {"class":"VERSION","version":"2.40dev",
1301               "rev":"06f62e14eae9886cde907dae61c124c53eb1101f",
1302               "proto_major":3,"proto_minor":1
1303           }
1304
1305   ?DEVICES;
1306       Returns a device list object with the following elements:
1307
1308       Table 11. DEVICES object
1309       ┌────────┬─────────┬────────┬──────────────────┐
1310       │        │         │        │                  │
1311       │Name    │ Always? │ Type   │ Description      │
1312       ├────────┼─────────┼────────┼──────────────────┤
1313       │        │         │        │                  │
1314       │class   │ Yes     │ string │ Fixed: "DEVICES" │
1315       ├────────┼─────────┼────────┼──────────────────┤
1316       │        │         │        │                  │
1317       │devices │ Yes     │ list   │ List of device   │
1318       │        │         │        │ descriptions     │
1319       ├────────┼─────────┼────────┼──────────────────┤
1320       │        │         │        │                  │
1321       │remote  │ No      │ string │ URL of the       │
1322       │        │         │        │ remote daemon    │
1323       │        │         │        │ reporting the    │
1324       │        │         │        │ device set. If   │
1325       │        │         │        │ empty, this is a │
1326       │        │         │        │ DEVICES response │
1327       │        │         │        │ from the local   │
1328       │        │         │        │ daemon.          │
1329       └────────┴─────────┴────────┴──────────────────┘
1330
1331       When the C client library parses a response of this kind, it will
1332       assert the DEVICELIST_SET bit in the top-level set member.
1333
1334       Here’s an example:
1335
1336           {"class"="DEVICES","devices":[
1337               {"class":"DEVICE","path":"/dev/pts/1","flags":1,"driver":"SiRF binary"},
1338               {"class":"DEVICE","path":"/dev/pts/3","flags":4,"driver":"AIVDM"}]}
1339
1340       The daemon occasionally ships a bare DEVICE object to the client (that
1341       is, one not inside a DEVICES wrapper). The data content of these
1342       objects will be described later as a response to the ?DEVICE command.
1343
1344   ?WATCH;
1345       This command sets watcher mode. It also sets or elicits a report of
1346       per-subscriber policy and the raw bit. An argument WATCH object changes
1347       the subscriber’s policy. The response describes the subscriber’s
1348       policy. The response will also include a DEVICES object.
1349
1350       A WATCH object has the following elements:
1351
1352       Table 12. WATCH object
1353       ┌────────┬─────────┬─────────┬──────────────────┐
1354       │        │         │         │                  │
1355       │Name    │ Always? │ Type    │ Description      │
1356       ├────────┼─────────┼─────────┼──────────────────┤
1357       │        │         │         │                  │
1358       │class   │ Yes     │ string  │ Fixed: "WATCH"   │
1359       ├────────┼─────────┼─────────┼──────────────────┤
1360       │        │         │         │                  │
1361       │enable  │ No      │ boolean │ Enable (true) or │
1362       │        │         │         │ disable (false)  │
1363       │        │         │         │ watcher mode.    │
1364       │        │         │         │ Default is true. │
1365       ├────────┼─────────┼─────────┼──────────────────┤
1366       │        │         │         │                  │
1367       │json    │ No      │ boolean │ Enable (true) or │
1368       │        │         │         │ disable (false)  │
1369       │        │         │         │ dumping of JSON  │
1370       │        │         │         │ reports. Default │
1371       │        │         │         │ is false.        │
1372       ├────────┼─────────┼─────────┼──────────────────┤
1373       │        │         │         │                  │
1374       │nmea    │ No      │ boolean │ Enable (true) or │
1375       │        │         │         │ disable (false)  │
1376       │        │         │         │ dumping of       │
1377       │        │         │         │ binary packets   │
1378       │        │         │         │ as pseudo-NMEA.  │
1379       │        │         │         │ Default is       │
1380       │        │         │         │ false.           │
1381       ├────────┼─────────┼─────────┼──────────────────┤
1382       │        │         │         │                  │
1383       │raw     │ No      │ integer │ Controls 'raw'   │
1384       │        │         │         │ mode. When this  │
1385       │        │         │         │ attribute is set │
1386       │        │         │         │ to 1 for a       │
1387       │        │         │         │ channel, gpsd    
1388       │        │         │         │ reports the      │
1389       │        │         │         │ unprocessed NMEA │
1390       │        │         │         │ or AIVDM data    │
1391       │        │         │         │ stream from      │
1392       │        │         │         │ whatever device  │
1393       │        │         │         │ is attached.     │
1394       │        │         │         │ Binary GPS       │
1395       │        │         │         │ packets are      │
1396       │        │         │         │ hex-dumped.      │
1397       │        │         │         │ RTCM2 and RTCM3  │
1398       │        │         │         │ packets are not  │
1399       │        │         │         │ dumped in raw    │
1400       │        │         │         │ mode. When this  │
1401       │        │         │         │ attribute is set │
1402       │        │         │         │ to 2 for a       │
1403       │        │         │         │ channel that     │
1404       │        │         │         │ processes binary │
1405       │        │         │         │ data, gpsd       
1406       │        │         │         │ reports the      │
1407       │        │         │         │ received data    │
1408       │        │         │         │ verbatim without │
1409       │        │         │         │ hex-dumping.     │
1410       ├────────┼─────────┼─────────┼──────────────────┤
1411       │        │         │         │                  │
1412       │scaled  │ No      │ boolean │ If true, apply   │
1413       │        │         │         │ scaling divisors │
1414       │        │         │         │ to output before │
1415       │        │         │         │ dumping; default │
1416       │        │         │         │ is false.        │
1417       ├────────┼─────────┼─────────┼──────────────────┤
1418       │        │         │         │                  │
1419       │split24 │ No      │ boolean │ If true,         │
1420       │        │         │         │ aggregate AIS    │
1421       │        │         │         │ type24 sentence  │
1422       │        │         │         │ parts. If false, │
1423       │        │         │         │ report each part │
1424       │        │         │         │ as a separate    │
1425       │        │         │         │ JSON object,     │
1426       │        │         │         │ leaving the      │
1427       │        │         │         │ client to match  │
1428       │        │         │         │ MMSIs and        │
1429       │        │         │         │ aggregate.       │
1430       │        │         │         │ Default is       │
1431       │        │         │         │ false. Applies   │
1432       │        │         │         │ only to AIS      │
1433       │        │         │         │ reports.         │
1434       ├────────┼─────────┼─────────┼──────────────────┤
1435       │        │         │         │                  │
1436       │pps     │ No      │ boolean │ If true, emit    │
1437       │        │         │         │ the TOFF JSON    │
1438       │        │         │         │ message on each  │
1439       │        │         │         │ cycle and a PPS  │
1440       │        │         │         │ JSON message     │
1441       │        │         │         │ when the device  │
1442       │        │         │         │ issues 1PPS.     │
1443       │        │         │         │ Default is       │
1444       │        │         │         │ false.           │
1445       ├────────┼─────────┼─────────┼──────────────────┤
1446       │        │         │         │                  │
1447       │device  │ No      │ string  │ If present,      │
1448       │        │         │         │ enable watching  │
1449       │        │         │         │ only of the      │
1450       │        │         │         │ specified device │
1451       │        │         │         │ rather than all  │
1452       │        │         │         │ devices. Useful  │
1453       │        │         │         │ with raw and     │
1454       │        │         │         │ NMEA modes in    │
1455       │        │         │         │ which device     │
1456       │        │         │         │ responses aren’t │
1457       │        │         │         │ tagged. Has no   │
1458       │        │         │         │ effect when used │
1459       │        │         │         │ with             │
1460       │        │         │         │ enable:false.    │
1461       ├────────┼─────────┼─────────┼──────────────────┤
1462       │        │         │         │                  │
1463       │remote  │ No      │ string  │ URL of the       │
1464       │        │         │         │ remote daemon    │
1465       │        │         │         │ reporting the    │
1466       │        │         │         │ watch set. If    │
1467       │        │         │         │ empty, this is a │
1468       │        │         │         │ WATCH response   │
1469       │        │         │         │ from the local   │
1470       │        │         │         │ daemon.          │
1471       └────────┴─────────┴─────────┴──────────────────┘
1472
1473       There is an additional boolean "timing" attribute which is undocumented
1474       because that portion of the interface is considered unstable and for
1475       developer use only.
1476
1477       In watcher mode, GPS reports are dumped as TPV and SKY responses. AIS,
1478       Subframe and RTCM reporting is described in the next section.
1479
1480       When the C client library parses a response of this kind, it will
1481       assert the POLICY_SET bit in the top-level set member.
1482
1483       Here’s an example:
1484
1485           {"class":"WATCH", "raw":1,"scaled":true}
1486
1487   ?POLL;
1488       The POLL command requests data from the last-seen fixes on all active
1489       GPS devices. Devices must previously have been activated by ?WATCH to
1490       be pollable.
1491
1492       Polling can lead to possibly surprising results when it is used on a
1493       device such as an NMEA GPS for which a complete fix has to be
1494       accumulated from several sentences. If you poll while those sentences
1495       are being emitted, the response will contain only the fix data
1496       collected so far in the current epoch. It may be as much as one cycle
1497       time (typically 1 second) stale.
1498
1499       The POLL response will contain a timestamped list of TPV objects
1500       describing cached data, and a timestamped list of SKY objects
1501       describing satellite configuration. If a device has not seen fixes, it
1502       will be reported with a mode field of zero.
1503
1504       Table 13. POLL object
1505       ┌───────┬─────────┬────────────┬──────────────────┐
1506       │       │         │            │                  │
1507       │Name   │ Always? │ Type       │ Description      │
1508       ├───────┼─────────┼────────────┼──────────────────┤
1509       │       │         │            │                  │
1510       │class  │ Yes     │ string     │ Fixed: "POLL"    │
1511       ├───────┼─────────┼────────────┼──────────────────┤
1512       │       │         │            │                  │
1513       │time   │ Yes     │ Numeric    │ Timestamp in ISO │
1514       │       │         │            │ 8601 format. May │
1515       │       │         │            │ have a           │
1516       │       │         │            │ fractional part  │
1517       │       │         │            │ of up to .001sec │
1518       │       │         │            │ precision.       │
1519       ├───────┼─────────┼────────────┼──────────────────┤
1520       │       │         │            │                  │
1521       │active │ Yes     │ Numeric    │ Count of active  │
1522       │       │         │            │ devices.         │
1523       ├───────┼─────────┼────────────┼──────────────────┤
1524       │       │         │            │                  │
1525       │tpv    │ Yes     │ JSON array │ Comma-separated  │
1526       │       │         │            │ list of TPV      │
1527       │       │         │            │ objects.         │
1528       ├───────┼─────────┼────────────┼──────────────────┤
1529       │       │         │            │                  │
1530       │sky    │ Yes     │ JSON array │ Comma-separated  │
1531       │       │         │            │ list of SKY      │
1532       │       │         │            │ objects.         │
1533       └───────┴─────────┴────────────┴──────────────────┘
1534
1535       Here’s an example of a POLL response:
1536
1537           {"class":"POLL","time":"2010-06-04T10:31:00.289Z","active":1,
1538               "tpv":[{"class":"TPV","device":"/dev/ttyUSB0",
1539                       "time":"2010-09-08T13:33:06.095Z",
1540                       "ept":0.005,"lat":40.035093060,
1541                       "lon":-75.519748733,"track":99.4319,"speed":0.123,"mode":2}],
1542               "sky":[{"class":"SKY","device":"/dev/ttyUSB0",
1543                       "time":1270517264.240,"hdop":9.20,
1544                       "satellites":[{"PRN":16,"el":55,"az":42,"ss":36,"used":true},
1545                                     {"PRN":19,"el":25,"az":177,"ss":0,"used":false},
1546                                     {"PRN":7,"el":13,"az":295,"ss":0,"used":false},
1547                                     {"PRN":6,"el":56,"az":135,"ss":32,"used":true},
1548                                     {"PRN":13,"el":47,"az":304,"ss":0,"used":false},
1549                                     {"PRN":23,"el":66,"az":259,"ss":0,"used":false},
1550                                     {"PRN":20,"el":7,"az":226,"ss":0,"used":false},
1551                                     {"PRN":3,"el":52,"az":163,"ss":32,"used":true},
1552                                     {"PRN":31,"el":16,"az":102,"ss":0,"used":false}
1553           ]}]}
1554
1555           Note
1556           Client software should not assume the field inventory of the POLL
1557           response is fixed for all time. As gpsd collects and caches more
1558           data from more sensor types, those data are likely to find their
1559           way into this response.
1560
1561   ?DEVICE; ?DEVICE=
1562       This command reports (when followed by ';') the state of a device, or
1563       sets (when followed by '=' and a DEVICE object) device-specific control
1564       bits, notably the device’s speed and serial mode and the native-mode
1565       bit. The parameter-setting form will be rejected if more than one
1566       client is attached to the channel.
1567
1568       Pay attention to the response, because it is possible for this command
1569       to fail if the GPS does not support a speed-switching command or only
1570       supports some combinations of serial modes. In case of failure, the
1571       daemon and GPS will continue to communicate at the old speed.
1572
1573       Use the parameter-setting form with caution. On USB and Bluetooth GPSes
1574       it is also possible for serial mode setting to fail either because the
1575       serial adaptor chip does not support non-8N1 modes or because the
1576       device firmware does not properly synchronize the serial adaptor chip
1577       with the UART on the GPS chipset when the speed changes. These failures
1578       can hang your device, possibly requiring a GPS power cycle or (in
1579       extreme cases) physically disconnecting the NVRAM backup battery.
1580
1581       A DEVICE object has the following elements:
1582
1583       Table 14. DEVICE object
1584       ┌──────────┬─────────┬─────────┬──────────────────┐
1585       │          │         │         │                  │
1586       │Name      │ Always? │ Type    │ Description      │
1587       ├──────────┼─────────┼─────────┼──────────────────┤
1588       │          │         │         │                  │
1589       │class     │ Yes     │ string  │ Fixed: "DEVICE"  │
1590       ├──────────┼─────────┼─────────┼──────────────────┤
1591       │          │         │         │                  │
1592       │path      │ No      │ string  │ Name the device  │
1593       │          │         │         │ for which the    │
1594       │          │         │         │ control bits are │
1595       │          │         │         │ being reported,  │
1596       │          │         │         │ or for which     │
1597       │          │         │         │ they are to be   │
1598       │          │         │         │ applied. This    │
1599       │          │         │         │ attribute may be │
1600       │          │         │         │ omitted only     │
1601       │          │         │         │ when there is    │
1602       │          │         │         │ exactly one      │
1603       │          │         │         │ subscribed       │
1604       │          │         │         │ channel.         │
1605       ├──────────┼─────────┼─────────┼──────────────────┤
1606       │          │         │         │                  │
1607       │activated │ No      │ string  │ Time the device  │
1608       │          │         │         │ was activated as │
1609       │          │         │         │ an ISO8601 time  │
1610       │          │         │         │ stamp. If the    │
1611       │          │         │         │ device is        │
1612       │          │         │         │ inactive this    │
1613       │          │         │         │ attribute is     │
1614       │          │         │         │ absent.          │
1615       ├──────────┼─────────┼─────────┼──────────────────┤
1616       │          │         │         │                  │
1617       │flags     │ No      │ integer │ Bit vector of    │
1618       │          │         │         │ property flags.  │
1619       │          │         │         │ Currently        │
1620       │          │         │         │ defined flags    │
1621       │          │         │         │ are: describe    │
1622       │          │         │         │ packet types     │
1623       │          │         │         │ seen so far      │
1624       │          │         │         │ (GPS, RTCM2,     │
1625       │          │         │         │ RTCM3, AIS).     │
1626       │          │         │         │ Won’t be         │
1627       │          │         │         │ reported if      │
1628       │          │         │         │ empty, e.g.      │
1629       │          │         │         │ before gpsd has  │
1630       │          │         │         │ seen             │
1631       │          │         │         │ identifiable     │
1632       │          │         │         │ packets from the │
1633       │          │         │         │ device.          │
1634       ├──────────┼─────────┼─────────┼──────────────────┤
1635       │          │         │         │                  │
1636       │driver    │ No      │ string  │ GPSD’s name for  │
1637       │          │         │         │ the device       │
1638       │          │         │         │ driver type.     │
1639       │          │         │         │ Won’t be         │
1640       │          │         │         │ reported before  │
1641       │          │         │         │ gpsd has seen    │
1642       │          │         │         │ identifiable     │
1643       │          │         │         │ packets from the │
1644       │          │         │         │ device.          │
1645       ├──────────┼─────────┼─────────┼──────────────────┤
1646       │          │         │         │                  │
1647       │subtype   │ No      │ string  │ Whatever version │
1648       │          │         │         │ information the  │
1649       │          │         │         │ device driver    │
1650       │          │         │         │ returned.        │
1651       ├──────────┼─────────┼─────────┼──────────────────┤
1652       │          │         │         │                  │
1653       │subtype1  │ No      │ string  │ More version     │
1654       │          │         │         │ information the  │
1655       │          │         │         │ device driver    │
1656       │          │         │         │ returned.        │
1657       ├──────────┼─────────┼─────────┼──────────────────┤
1658       │          │         │         │                  │
1659       │readonly  │ No      │ boolean │ True if device   │
1660       │          │         │         │ is read-only.    │
1661       ├──────────┼─────────┼─────────┼──────────────────┤
1662       │          │         │         │                  │
1663       │bps       │ No      │ integer │ Device speed in  │
1664       │          │         │         │ bits per second. │
1665       ├──────────┼─────────┼─────────┼──────────────────┤
1666       │          │         │         │                  │
1667       │parity    │ No      │ string  │ N, O or E for no │
1668       │          │         │         │ parity, odd, or  │
1669       │          │         │         │ even.            │
1670       ├──────────┼─────────┼─────────┼──────────────────┤
1671       │          │         │         │                  │
1672       │stopbits  │ Yes     │ string  │ Stop bits (1 or  │
1673       │          │         │         │ 2).              │
1674       ├──────────┼─────────┼─────────┼──────────────────┤
1675       │          │         │         │                  │
1676       │native    │ No      │ integer │ 0 means NMEA     │
1677       │          │         │         │ mode and 1 means │
1678       │          │         │         │ alternate mode   │
1679       │          │         │         │ (binary if it    │
1680       │          │         │         │ has one, for     │
1681       │          │         │         │ SiRF and         │
1682       │          │         │         │ Evermore         │
1683       │          │         │         │ chipsets in      │
1684       │          │         │         │ particular).     │
1685       │          │         │         │ Attempting to    │
1686       │          │         │         │ set this mode on │
1687       │          │         │         │ a non-GPS device │
1688       │          │         │         │ will yield an    │
1689       │          │         │         │ error.           │
1690       ├──────────┼─────────┼─────────┼──────────────────┤
1691       │          │         │         │                  │
1692       │cycle     │ No      │ real    │ Device cycle     │
1693       │          │         │         │ time in seconds. │
1694       ├──────────┼─────────┼─────────┼──────────────────┤
1695       │          │         │         │                  │
1696       │mincycle  │ No      │ real    │ Device minimum   │
1697       │          │         │         │ cycle time in    │
1698       │          │         │         │ seconds.         │
1699       │          │         │         │ Reported from    │
1700       │          │         │         │ ?DEVICE when     │
1701       │          │         │         │ (and only when)  │
1702       │          │         │         │ the rate is      │
1703       │          │         │         │ switchable. It   │
1704       │          │         │         │ is read-only and │
1705       │          │         │         │ not settable.    │
1706       └──────────┴─────────┴─────────┴──────────────────┘
1707
1708       The serial parameters will (bps, parity, stopbits) be omitted in a
1709       response describing a TCP/IP source such as an Ntrip, DGPSIP, or AIS
1710       feed; on a serial device they will always be present.
1711
1712       The contents of the flags field should be interpreted as follows:
1713
1714       Table 15. Device flags
1715       ┌───────────┬───────┬─────────────────────┐
1716       │           │       │                     │
1717       │C #define  │ Value │ Description         │
1718       ├───────────┼───────┼─────────────────────┤
1719       │           │       │                     │
1720       │SEEN_GPS   │ 0x01  │ GPS data has been   │
1721       │           │       │ seen on this device │
1722       ├───────────┼───────┼─────────────────────┤
1723       │           │       │                     │
1724       │SEEN_RTCM2 │ 0x02  │ RTCM2 data has been │
1725       │           │       │ seen on this device │
1726       ├───────────┼───────┼─────────────────────┤
1727       │           │       │                     │
1728       │SEEN_RTCM3 │ 0x04  │ RTCM3 data has been │
1729       │           │       │ seen on this device │
1730       ├───────────┼───────┼─────────────────────┤
1731       │           │       │                     │
1732       │SEEN_AIS   │ 0x08  │ AIS data has been   │
1733       │           │       │ seen on this device │
1734       └───────────┴───────┴─────────────────────┘
1735
1736       When the C client library parses a response of this kind, it will
1737       assert the DEVICE_SET bit in the top-level set member.
1738
1739       Here’s an example:
1740
1741           {"class":"DEVICE","bps":4800,"parity":"N","stopbits":1,"native":0}
1742
1743       When a client is in watcher mode, the daemon will ship it DEVICE
1744       notifications when a device is added to the pool or deactivated.
1745
1746       When the C client library parses a response of this kind, it will
1747       assert the DEVICE_SET bit in the top-level set member.
1748
1749       Here’s an example:
1750
1751           {"class":"DEVICE","path":"/dev/pts1","activated":0}
1752
1753   ERROR
1754       The daemon may ship an error object in response to a syntactically
1755       invalid command line or unknown command. It has the following elements:
1756
1757       Table 16. ERROR notification object
1758       ┌────────┬─────────┬────────┬────────────────┐
1759       │        │         │        │                │
1760       │Name    │ Always? │ Type   │ Description    │
1761       ├────────┼─────────┼────────┼────────────────┤
1762       │        │         │        │                │
1763       │class   │ Yes     │ string │ Fixed: "ERROR" │
1764       ├────────┼─────────┼────────┼────────────────┤
1765       │        │         │        │                │
1766       │message │ Yes     │ string │ Textual error  │
1767       │        │         │        │ message        │
1768       └────────┴─────────┴────────┴────────────────┘
1769
1770       Here’s an example:
1771
1772           {"class":"ERROR","message":"Unrecognized request '?FOO'"}
1773
1774       When the C client library parses a response of this kind, it will
1775       assert the ERR_SET bit in the top-level set member.
1776

RTCM2

1778       RTCM-104 is a family of serial protocols used for broadcasting
1779       pseudorange corrections from differential-GPS reference stations. Many
1780       GPS receivers can accept these corrections to improve their reporting
1781       accuracy.
1782
1783       RTCM-104 comes in two major and incompatible flavors, 2.x and 3.x. Each
1784       major flavor has minor (compatible) revisions.
1785
1786       The applicable standard for RTCM Version 2.x is RTCM Recommended
1787       Standards for Differential NAVSTAR GPS Service RTCM Paper 194-93/SC
1788       104-STD. For RTCM 3.1 it is RTCM Paper 177-2006-SC104-STD. Ordering
1789       instructions for both standards are accessible from the website of the
1790       Radio Technical Commission for Maritime Services
1791       <https://www.rtcm.org/> under "Publications".
1792
1793   RTCM WIRE TRANSMISSIONS
1794       Differential-GPS correction stations consist of a GPS reference
1795       receiver coupled to a low frequency (LF) transmitter. The GPS reference
1796       receiver is a survey-grade GPS that does GPS carrier tracking and can
1797       work out its position to a few millimeters. It generates range and
1798       range-rate corrections and encodes them into RTCM104. It ships the
1799       RTCM104 to the LF transmitter over serial rs-232 signal at 100 baud or
1800       200 baud depending on the requirements of the transmitter.
1801
1802       The LF transmitter broadcasts the approximately 300khz radio signal
1803       that differential-GPS radio receivers pick up. Transmitters that are
1804       meant to have a higher range will need to transmit at a slower rate.
1805       The higher the data rate the harder it will be for the remote radio
1806       receiver to receive with a good signal-to-noise ration. (Higher data
1807       rate signals can’t be averaged over as long a time frame, hence they
1808       appear noisier.)
1809
1810   RTCM WIRE FORMATS
1811       An RTCM 2.x message consists of a sequence of up to 33 30-bit words.
1812       The 24 most significant bits of each word are data and the six least
1813       significant bits are parity. The parity algorithm used is the same
1814       ISGPS-2000 as that used on GPS satellite downlinks. Each RTCM 2.x
1815       message consists of two header words followed by zero or more data
1816       words, depending upon the message type.
1817
1818       An RTCM 3.x message begins with a fixed leader byte 0xD3. That is
1819       followed by six bits of version information and 10 bits of payload
1820       length information. Following that is the payload; following the
1821       payload is a 3-byte checksum of the payload using the Qualcomm CRC-24Q
1822       algorithm.
1823
1824   RTCM2 JSON FORMAT
1825       Each RTCM2 message is dumped as a single JSON object per message, with
1826       the message fields as attributes of that object. Arrays of satellite,
1827       station, and constellation statistics become arrays of JSON
1828       sub-objects. Each sentence will normally also have a "device" field
1829       containing the pathname of the originating device.
1830
1831       All attributes other than the device field are mandatory. Header
1832       attributes are emitted before others.
1833
1834   Header portion
1835       Table 17. SKY object
1836       ┌───────────────┬─────────┬─────────────────────────────────────────────┐
1837       │               │         │                                             │
1838       │Name           │ Type    │ Description                                 │
1839       ├───────────────┼─────────┼─────────────────────────────────────────────┤
1840       │               │         │                                             │
1841       │class          │ string  │ Fixed: "RTCM2".                             │
1842       ├───────────────┼─────────┼─────────────────────────────────────────────┤
1843       │               │         │                                             │
1844       │type           │ integer │ Message type (1-9).                         │
1845       ├───────────────┼─────────┼─────────────────────────────────────────────┤
1846       │               │         │                                             │
1847       │station_id     │ integer │ The id of the GPS                           │
1848       │               │         │ reference receiver.                         │
1849       │               │         │ The LF transmitters                         │
1850       │               │         │ also have                                   │
1851       │               │         │ (different) id                              │
1852       │               │         │ numbers.                                    │
1853       ├───────────────┼─────────┼─────────────────────────────────────────────┤
1854       │               │         │                                             │
1855       │zcount         │ real    │ The reference time                          │
1856       │               │         │ of the corrections                          │
1857       │               │         │ in the message in                           │
1858       │               │         │ seconds within the                          │
1859       │               │         │ current hour. Note                          │
1860       │               │         │ that it is in GPS                           │
1861       │               │         │ time, which is some                         │
1862       │               │         │ seconds ahead of                            │
1863       │               │         │ UTC (see the U.S.                           │
1864       │               │         │ Naval Observatory’s                         │
1865       │               │         │ table of leap                               │
1866       │               │         │ second                                      │
1867       │               │         │ <ftp://maia.usno.navy.mil/ser7/tai-utc.dat> │
1868       │               │         │ corrections" ).                             │
1869       ├───────────────┼─────────┼─────────────────────────────────────────────┤
1870       │               │         │                                             │
1871       │seqnum         │ integer │ Sequence number. Only 3 bits wide, wraps    │
1872       │               │         │ after 7.                                    │
1873       ├───────────────┼─────────┼─────────────────────────────────────────────┤
1874       │               │         │                                             │
1875       │length         │ integer │ The number of words after the header that   │
1876       │               │         │ comprise the message.                       │
1877       ├───────────────┼─────────┼─────────────────────────────────────────────┤
1878       │               │         │                                             │
1879       │station_health │ integer │ Station transmission status. Indicates the  │
1880       │               │         │ health of the beacon as a reference source. │
1881       │               │         │ Any nonzero value means the satellite is    │
1882       │               │         │ probably transmitting bad data and should   │
1883       │               │         │ not be used in a fix. 6 means the           │
1884       │               │         │ transmission is unmonitored. 7 means the    │
1885       │               │         │ station is not working properly. Other      │
1886       │               │         │ values are defined by the beacon operator.  │
1887       └───────────────┴─────────┴─────────────────────────────────────────────┘
1888
1889       <message type> is one of
1890
1891       1
1892           full corrections — one message containing corrections for all GPS
1893           satellites in view. This is not common.
1894
1895       3
1896           reference station parameters — the position of the reference
1897           station GPS antenna.
1898
1899       4
1900           datum — the datum to which the DGPS data is referred.
1901
1902       5
1903           constellation health — information about the satellites the beacon
1904           can see.
1905
1906       6
1907           null message — just a filler.
1908
1909       7
1910           radio beacon almanac — information about this or other beacons.
1911
1912       9
1913           subset corrections — a message containing corrections for only a
1914           subset of the GPS satellites in view.
1915
1916       16
1917           special message — a text message from the beacon operator.
1918
1919       31
1920           GLONASS subset corrections — a message containing corrections for a
1921           set of the GLONASS satellites in view.
1922
1923   Type 1 and 9: Correction data
1924       One or more satellite objects follow the header for type 1 or type 9
1925       messages. Here is the format:
1926
1927       Table 18. Satellite object
1928       ┌──────┬─────────┬─────────────────────┐
1929       │      │         │                     │
1930       │Name  │ Type    │ Description         │
1931       ├──────┼─────────┼─────────────────────┤
1932       │      │         │                     │
1933       │ident │ integer │ The PRN number of   │
1934       │      │         │ the satellite for   │
1935       │      │         │ which this is       │
1936       │      │         │ correction data.    │
1937       ├──────┼─────────┼─────────────────────┤
1938       │      │         │                     │
1939       │udre  │ integer │ User Differential   │
1940       │      │         │ Range Error (0-3).  │
1941       │      │         │ See the table       │
1942       │      │         │ following for       │
1943       │      │         │ values.             │
1944       ├──────┼─────────┼─────────────────────┤
1945       │      │         │                     │
1946       │iod   │ integer │ Issue Of Data,      │
1947       │      │         │ matching the IOD    │
1948       │      │         │ for the current     │
1949       │      │         │ ephemeris of this   │
1950       │      │         │ satellite, as       │
1951       │      │         │ transmitted by the  │
1952       │      │         │ satellite. The IOD  │
1953       │      │         │ is a unique tag     │
1954       │      │         │ that identifies the │
1955       │      │         │ ephemeris; the GPS  │
1956       │      │         │ using the DGPS      │
1957       │      │         │ correction and the  │
1958       │      │         │ DGPS generating the │
1959       │      │         │ data must use the   │
1960       │      │         │ same orbital        │
1961       │      │         │ positions for the   │
1962       │      │         │ satellite.          │
1963       ├──────┼─────────┼─────────────────────┤
1964       │      │         │                     │
1965       │prc   │ real    │ The pseudorange     │
1966       │      │         │ error in meters for │
1967       │      │         │ this satellite as   │
1968       │      │         │ measured by the     │
1969       │      │         │ beacon reference    │
1970       │      │         │ receiver at the     │
1971       │      │         │ epoch indicated by  │
1972       │      │         │ the z_count in the  │
1973       │      │         │ parent record.      │
1974       ├──────┼─────────┼─────────────────────┤
1975       │      │         │                     │
1976       │rrc   │ real    │ The rate of change  │
1977       │      │         │ of pseudorange      │
1978       │      │         │ error in meters/sec │
1979       │      │         │ for this satellite  │
1980       │      │         │ as measured by the  │
1981       │      │         │ beacon reference    │
1982       │      │         │ receiver at the     │
1983       │      │         │ epoch indicated by  │
1984       │      │         │ the z_count field   │
1985       │      │         │ in the parent       │
1986       │      │         │ record. This is     │
1987       │      │         │ used to calculate   │
1988       │      │         │ pseudorange errors  │
1989       │      │         │ at other epochs, if │
1990       │      │         │ required by the GPS │
1991       │      │         │ receiver.           │
1992       └──────┴─────────┴─────────────────────┘
1993
1994       User Differential Range Error values are as follows:
1995
1996       Table 19. UDRE values
1997       ┌──┬─────────────────────┐
1998       │  │                     │
1999       │0 │ 1-sigma error ⇐ 1 m │
2000       ├──┼─────────────────────┤
2001       │  │                     │
2002       │1 │ 1-sigma error ⇐ 4 m │
2003       ├──┼─────────────────────┤
2004       │  │                     │
2005       │2 │ 1-sigma error ⇐ 8 m │
2006       ├──┼─────────────────────┤
2007       │  │                     │
2008       │3 │ 1-sigma error > 8 m │
2009       └──┴─────────────────────┘
2010
2011       Here’s an example:
2012
2013           {"class":"RTCM2","type":1,
2014               "station_id":688,"zcount":843.0,"seqnum":5,"length":19,"station_health":6,
2015               "satellites":[
2016                   {"ident":10,"udre":0,"iod":46,"prc":-2.400,"rrc":0.000},
2017                   {"ident":13,"udre":0,"iod":94,"prc":-4.420,"rrc":0.000},
2018                   {"ident":7,"udre":0,"iod":22,"prc":-5.160,"rrc":0.002},
2019                   {"ident":2,"udre":0,"iod":34,"prc":-6.480,"rrc":0.000},
2020                   {"ident":4,"udre":0,"iod":47,"prc":-8.860,"rrc":0.000},
2021                   {"ident":8,"udre":0,"iod":76,"prc":-7.980,"rrc":0.002},
2022                   {"ident":5,"udre":0,"iod":99,"prc":-8.260,"rrc":0.002},
2023                   {"ident":23,"udre":0,"iod":81,"prc":-8.060,"rrc":0.000},
2024                   {"ident":16,"udre":0,"iod":70,"prc":-11.740,"rrc":0.000},
2025                   {"ident":30,"udre":0,"iod":4,"prc":-18.960,"rrc":-0.006},
2026                   {"ident":29,"udre":0,"iod":101,"prc":-24.960,"rrc":-0.002}
2027           ]}
2028
2029   Type 3: Reference Station Parameters
2030       Here are the payload members of a type 3 (Reference Station Parameters)
2031       message:
2032
2033       Table 20. Reference Station Parameters
2034       ┌─────┬──────┬────────────────────┐
2035       │     │      │                    │
2036       │Name │ Type │ Description        │
2037       ├─────┼──────┼────────────────────┤
2038       │     │      │                    │
2039       │x    │ real │ ECEF X coordinate. │
2040       ├─────┼──────┼────────────────────┤
2041       │     │      │                    │
2042       │y    │ real │ ECEF Y coordinate. │
2043       ├─────┼──────┼────────────────────┤
2044       │     │      │                    │
2045       │z    │ real │ ECEF Z coordinate. │
2046       └─────┴──────┴────────────────────┘
2047
2048       The coordinates are the position of the station, in meters to two
2049       decimal places, in Earth Centred Earth Fixed coordinates. These are
2050       usually referred to the WGS84 reference frame, but may be referred to
2051       NAD83 in the US (essentially identical to WGS84 for all except
2052       geodesists), or some other reference frame in other parts of the world.
2053
2054       An invalid reference message is represented by a type 3 header without
2055       payload fields.
2056
2057       Here’s an example:
2058
2059           {"class":"RTCM2","type":3,
2060               "station_id":652,"zcount":1657.2,"seqnum":2,"length":4,"station_health":6,
2061               "x":3878620.92,"y":670281.40,"z":5002093.59
2062           }
2063
2064   Type 4: Datum
2065       Here are the payload members of a type 4 (Datum) message:
2066
2067       Table 21. Datum
2068       ┌───────────┬─────────┬─────────────────────┐
2069       │           │         │                     │
2070       │Name       │ Type    │ Description         │
2071       ├───────────┼─────────┼─────────────────────┤
2072       │           │         │                     │
2073       │dgnss_type │ string  │ Either "GPS",       │
2074       │           │         │ "GLONASS",          │
2075       │           │         │ "GALILEO", or       │
2076       │           │         │ "UNKNOWN".          │
2077       ├───────────┼─────────┼─────────────────────┤
2078       │           │         │                     │
2079       │dat        │ integer │ 0 or 1 and          │
2080       │           │         │ indicates the sense │
2081       │           │         │ of the offset shift │
2082       │           │         │ given by dx, dy,    │
2083       │           │         │ dz. dat = 0 means   │
2084       │           │         │ that the station    │
2085       │           │         │ coordinates (in the │
2086       │           │         │ reference message)  │
2087       │           │         │ are referred to a   │
2088       │           │         │ local datum and     │
2089       │           │         │ that adding dx, dy, │
2090       │           │         │ dz to that position │
2091       │           │         │ will render it in   │
2092       │           │         │ GNSS coordinates    │
2093       │           │         │ (WGS84 for GPS). If │
2094       │           │         │ dat = 1 then the    │
2095       │           │         │ ref station         │
2096       │           │         │ position is in GNSS │
2097       │           │         │ coordinates and     │
2098       │           │         │ adding dx, dy, dz   │
2099       │           │         │ will give it        │
2100       │           │         │ referred to the     │
2101       │           │         │ local datum.        │
2102       ├───────────┼─────────┼─────────────────────┤
2103       │           │         │                     │
2104       │datum_name │ string  │ A standard name for │
2105       │           │         │ the datum.          │
2106       ├───────────┼─────────┼─────────────────────┤
2107       │           │         │                     │
2108       │dx         │ real    │ X offset.           │
2109       ├───────────┼─────────┼─────────────────────┤
2110       │           │         │                     │
2111       │dy         │ real    │ Y offset.           │
2112       ├───────────┼─────────┼─────────────────────┤
2113       │           │         │                     │
2114       │dz         │ real    │ Z offset.           │
2115       └───────────┴─────────┴─────────────────────┘
2116
2117       <dx> <dy> <dz> are offsets to convert from local datum to GNSS datum or
2118       vice versa. These fields are optional.
2119
2120       An invalid datum message is represented by a type 4 header without
2121       payload fields.
2122
2123   Type 5: Constellation Health
2124       One or more of these follow the header for type 5 messages — one for
2125       each satellite.
2126
2127       Here is the format:
2128
2129       Table 22. Constellation health
2130       ┌────────────┬─────────┬─────────────────────┐
2131       │            │         │                     │
2132       │Name        │ Type    │ Description         │
2133       ├────────────┼─────────┼─────────────────────┤
2134       │            │         │                     │
2135       │ident       │ integer │ The PRN number of   │
2136       │            │         │ the satellite.      │
2137       ├────────────┼─────────┼─────────────────────┤
2138       │            │         │                     │
2139       │iodl        │ bool    │ True indicates that │
2140       │            │         │ this information    │
2141       │            │         │ relates to the      │
2142       │            │         │ satellite           │
2143       │            │         │ information in an   │
2144       │            │         │ accompanying type 1 │
2145       │            │         │ or type 9 message.  │
2146       ├────────────┼─────────┼─────────────────────┤
2147       │            │         │                     │
2148       │health      │ integer │ 0 indicates that    │
2149       │            │         │ the satellite is    │
2150       │            │         │ healthy. Any other  │
2151       │            │         │ value indicates a   │
2152       │            │         │ problem (coding is  │
2153       │            │         │ not known).         │
2154       ├────────────┼─────────┼─────────────────────┤
2155       │            │         │                     │
2156       │snr         │ integer │ The carrier/noise   │
2157       │            │         │ ratio of the        │
2158       │            │         │ received signal in  │
2159       │            │         │ the range 25 to 55  │
2160       │            │         │ dB(Hz).             │
2161       ├────────────┼─────────┼─────────────────────┤
2162       │            │         │                     │
2163       │health_en   │ bool    │ If set to True it   │
2164       │            │         │ indicates that the  │
2165       │            │         │ satellite is        │
2166       │            │         │ healthy even if the │
2167       │            │         │ satellite           │
2168       │            │         │ navigation data     │
2169       │            │         │ says it is          │
2170       │            │         │ unhealthy.          │
2171       ├────────────┼─────────┼─────────────────────┤
2172       │            │         │                     │
2173       │new_data    │ bool    │ True indicates that │
2174       │            │         │ the IOD for this    │
2175       │            │         │ satellite will soon │
2176       │            │         │ be updated in type  │
2177       │            │         │ 1 or 9 messages.    │
2178       ├────────────┼─────────┼─────────────────────┤
2179       │            │         │                     │
2180       │los_warning │ bool    │ Line-of-sight       │
2181       │            │         │ warning. True       │
2182       │            │         │ indicates that the  │
2183       │            │         │ satellite will      │
2184       │            │         │ shortly go          │
2185       │            │         │ unhealthy.          │
2186       ├────────────┼─────────┼─────────────────────┤
2187       │            │         │                     │
2188       │tou         │ integer │ Healthy time        │
2189       │            │         │ remaining in        │
2190       │            │         │ seconds.            │
2191       └────────────┴─────────┴─────────────────────┘
2192
2193   Type 6: Null
2194       This just indicates a null message. There are no payload fields.
2195
2196   Unknown message
2197       This format is used to dump message words in hexadecimal when the
2198       message type field doesn’t match any of the known ones.
2199
2200       Here is the format:
2201
2202       Table 23. Unknown Message
2203       ┌─────┬──────┬────────────────────┐
2204       │     │      │                    │
2205       │Name │ Type │ Description        │
2206       ├─────┼──────┼────────────────────┤
2207       │     │      │                    │
2208       │data │ list │ A list of strings. │
2209       └─────┴──────┴────────────────────┘
2210
2211       Each string in the array is a hex literal representing 30 bits of
2212       information, after parity checks and inversion. The high two bits
2213       should be ignored.
2214
2215   Type 7: Radio Beacon Almanac
2216       Here is the format:
2217
2218       Table 24. Constellation health
2219       ┌───────────┬─────────┬─────────────────────┐
2220       │           │         │                     │
2221       │Name       │ Type    │ Description         │
2222       ├───────────┼─────────┼─────────────────────┤
2223       │           │         │                     │
2224       │lat        │ real    │ Latitude in         │
2225       │           │         │ degrees, of the LF  │
2226       │           │         │ transmitter antenna │
2227       │           │         │ for the station for │
2228       │           │         │ which this is an    │
2229       │           │         │ almanac. North is   │
2230       │           │         │ positive.           │
2231       ├───────────┼─────────┼─────────────────────┤
2232       │           │         │                     │
2233       │lon        │ real    │ Longitude in        │
2234       │           │         │ degrees, of the LF  │
2235       │           │         │ transmitter antenna │
2236       │           │         │ for the station for │
2237       │           │         │ which this is an    │
2238       │           │         │ almanac. East is    │
2239       │           │         │ positive.           │
2240       ├───────────┼─────────┼─────────────────────┤
2241       │           │         │                     │
2242       │range      │ integer │ Published range of  │
2243       │           │         │ the station in km.  │
2244       ├───────────┼─────────┼─────────────────────┤
2245       │           │         │                     │
2246       │frequency  │ real    │ Station broadcast   │
2247       │           │         │ frequency in kHz.   │
2248       ├───────────┼─────────┼─────────────────────┤
2249       │           │         │                     │
2250       │health     │ integer │ <health> is the     │
2251       │           │         │ health of the       │
2252       │           │         │ station for which   │
2253       │           │         │ this is an almanac. │
2254       │           │         │ If it is non-zero,  │
2255       │           │         │ the station is      │
2256       │           │         │ issuing suspect     │
2257       │           │         │ data and should not │
2258       │           │         │ be used for fixes.  │
2259       │           │         │ The ITU and RTCM104 │
2260       │           │         │ standards differ    │
2261       │           │         │ about the mode      │
2262       │           │         │ detailed            │
2263       │           │         │ interpretation of   │
2264       │           │         │ the <health> field  │
2265       │           │         │ and even about its  │
2266       │           │         │ bit width.          │
2267       ├───────────┼─────────┼─────────────────────┤
2268       │           │         │                     │
2269       │station_id │ integer │ The id of the       │
2270       │           │         │ transmitter. This   │
2271       │           │         │ is not the same as  │
2272       │           │         │ the reference id in │
2273       │           │         │ the header, the     │
2274       │           │         │ latter being the id │
2275       │           │         │ of the reference    │
2276       │           │         │ receiver.           │
2277       ├───────────┼─────────┼─────────────────────┤
2278       │           │         │                     │
2279       │bitrate    │ integer │ The transmitted     │
2280       │           │         │ bitrate.            │
2281       └───────────┴─────────┴─────────────────────┘
2282
2283       Here’s an example:
2284
2285           {"class":"RTCM2","type":9,"station_id":268,"zcount":252.6,
2286                   "seqnum":4,"length":5,"station_health":0,
2287                   "satellites":[
2288                       {"ident":13,"udre":0,"iod":3,"prc":-25.940,"rrc":0.066},
2289                       {"ident":2,"udre":0,"iod":73,"prc":0.920,"rrc":-0.080},
2290                       {"ident":8,"udre":0,"iod":22,"prc":23.820,"rrc":0.014}
2291           ]}
2292
2293   Type 13: GPS Time of Week
2294       Here are the payload members of a type 13 (Groumf Tramitter Parameters)
2295       message:
2296
2297       Table 25. Ground Transmitter Parameters
2298       ┌──────────┬─────────┬─────────────────────┐
2299       │          │         │                     │
2300       │Name      │ Type    │ Description         │
2301       ├──────────┼─────────┼─────────────────────┤
2302       │          │         │                     │
2303       │status    │ bool    │ If True, signals    │
2304       │          │         │ user to expect a    │
2305       │          │         │ type 16 explanatory │
2306       │          │         │ message associated  │
2307       │          │         │ with this station.  │
2308       │          │         │ Probably indicates  │
2309       │          │         │ some sort of        │
2310       │          │         │ unusual event.      │
2311       ├──────────┼─────────┼─────────────────────┤
2312       │          │         │                     │
2313       │rangeflag │ bool    │ If True, indicates  │
2314       │          │         │ that the estimated  │
2315       │          │         │ range is different  │
2316       │          │         │ from that found in  │
2317       │          │         │ the type 7 message  │
2318       │          │         │ (which contains the │
2319       │          │         │ beacon’s listed     │
2320       │          │         │ range). Generally   │
2321       │          │         │ indicates a range   │
2322       │          │         │ reduction due to    │
2323       │          │         │ causes such as poor │
2324       │          │         │ ionospheric         │
2325       │          │         │ conditions or       │
2326       │          │         │ reduced             │
2327       │          │         │ transmission power. │
2328       ├──────────┼─────────┼─────────────────────┤
2329       │          │         │                     │
2330       │lat       │ real    │ Degrees latitude,   │
2331       │          │         │ signed. Positive is │
2332       │          │         │ N, negative is S.   │
2333       ├──────────┼─────────┼─────────────────────┤
2334       │          │         │                     │
2335       │lon       │ real    │ Degrees longitude,  │
2336       │          │         │ signed. Positive is │
2337       │          │         │ E, negative is W.   │
2338       ├──────────┼─────────┼─────────────────────┤
2339       │          │         │                     │
2340       │range     │ integer │ Transmission range  │
2341       │          │         │ in km (1-1024).     │
2342       └──────────┴─────────┴─────────────────────┘
2343
2344       This message type replaces message type 3 (Reference Station
2345       Parameters) in RTCM 2.3.
2346
2347   Type 14: GPS Time of Week
2348       Here are the payload members of a type 14 (GPS Time of Week) message:
2349
2350       Table 26. Reference Station Parameters
2351       ┌─────────┬─────────┬───────────────────┐
2352       │         │         │                   │
2353       │Name     │ Type    │ Description       │
2354       ├─────────┼─────────┼───────────────────┤
2355       │         │         │                   │
2356       │week     │ integer │ GPS week (0-123). │
2357       ├─────────┼─────────┼───────────────────┤
2358       │         │         │                   │
2359       │hour     │ integer │ Hour of week      │
2360       │         │         │ (0-167).          │
2361       ├─────────┼─────────┼───────────────────┤
2362       │         │         │                   │
2363       │leapsecs │ integer │ Leap Seconds      │
2364       │         │         │ (0-63).           │
2365       └─────────┴─────────┴───────────────────┘
2366
2367       Here’s an example:
2368
2369           {"class":"RTCM2","type":14,"station_id":652,"zcount":1657.2,
2370                   "seqnum":3,"length":1,"station_health":6,"week":601,"hour":109,
2371                   "leapsecs":15}
2372
2373   Type 16: Special Message
2374       Table 27. Special Message
2375       ┌────────┬────────┬─────────────────────┐
2376       │        │        │                     │
2377       │Name    │ Type   │ Description         │
2378       ├────────┼────────┼─────────────────────┤
2379       │        │        │                     │
2380       │message │ string │ A text message sent │
2381       │        │        │ by the beacon       │
2382       │        │        │ operator.           │
2383       └────────┴────────┴─────────────────────┘
2384
2385   Type 31: Correction data
2386       One or more GLONASS satellite objects follow the header for type 1 or
2387       type 9 messages. Here is the format:
2388
2389       Table 28. Satellite object
2390       ┌───────┬──────────┬─────────────────────┐
2391       │       │          │                     │
2392       │Name   │ Type     │ Description         │
2393       ├───────┼──────────┼─────────────────────┤
2394       │       │          │                     │
2395       │ident  │ integer  │ The PRN number of   │
2396       │       │          │ the satellite for   │
2397       │       │          │ which this is       │
2398       │       │          │ correction data.    │
2399       ├───────┼──────────┼─────────────────────┤
2400       │       │          │                     │
2401       │udre   │ integer  │ User Differential   │
2402       │       │          │ Range Error (0-3).  │
2403       │       │          │ See the table       │
2404       │       │          │ following for       │
2405       │       │          │ values.             │
2406       ├───────┼──────────┼─────────────────────┤
2407       │       │          │                     │
2408       │change │ boolean  │ Change-of-ephemeris │
2409       │       │          │ bit.                │
2410       ├───────┼──────────┼─────────────────────┤
2411       │       │          │                     │
2412       │tod    │ uinteger │ Count of 30-second  │
2413       │       │          │ periods since the   │
2414       │       │          │ top of the hour.    │
2415       ├───────┼──────────┼─────────────────────┤
2416       │       │          │                     │
2417       │prc    │ real     │ The pseudorange     │
2418       │       │          │ error in meters for │
2419       │       │          │ this satellite as   │
2420       │       │          │ measured by the     │
2421       │       │          │ beacon reference    │
2422       │       │          │ receiver at the     │
2423       │       │          │ epoch indicated by  │
2424       │       │          │ the z_count in the  │
2425       │       │          │ parent record.      │
2426       ├───────┼──────────┼─────────────────────┤
2427       │       │          │                     │
2428       │rrc    │ real     │ The rate of change  │
2429       │       │          │ of pseudorange      │
2430       │       │          │ error in meters/sec │
2431       │       │          │ for this satellite  │
2432       │       │          │ as measured by the  │
2433       │       │          │ beacon reference    │
2434       │       │          │ receiver at the     │
2435       │       │          │ epoch indicated by  │
2436       │       │          │ the z_count field   │
2437       │       │          │ in the parent       │
2438       │       │          │ record. This is     │
2439       │       │          │ used to calculate   │
2440       │       │          │ pseudorange errors  │
2441       │       │          │ at other epochs, if │
2442       │       │          │ required by the GPS │
2443       │       │          │ receiver.           │
2444       └───────┴──────────┴─────────────────────┘
2445
2446       Here’s an example:
2447
2448           {"class":"RTCM2","type":31,"station_id":652,"zcount":1642.2,
2449               "seqnum":0,"length":14,"station_health":6,
2450               "satellites":[
2451                   {"ident":5,"udre":0,"change":false,"tod":0,"prc":132.360,"rrc":0.000},
2452                   {"ident":15,"udre":0,"change":false,"tod":0,"prc":134.840,"rrc":0.002},
2453                   {"ident":14,"udre":0,"change":false,"tod":0,"prc":141.520,"rrc":0.000},
2454                   {"ident":6,"udre":0,"change":false,"tod":0,"prc":127.000,"rrc":0.000},
2455                   {"ident":21,"udre":0,"change":false,"tod":0,"prc":128.780,"rrc":0.000},
2456                   {"ident":22,"udre":0,"change":false,"tod":0,"prc":125.260,"rrc":0.002},
2457                   {"ident":20,"udre":0,"change":false,"tod":0,"prc":117.280,"rrc":-0.004},
2458                   {"ident":16,"udre":0,"change":false,"tod":17,"prc":113.460,"rrc":0.018}
2459           ]}
2460

RTCM3 DUMP FORMAT

2462       The support for RTCM104v3 dumping is incomplete and buggy. Do not
2463       attempt to use it for production! Anyone interested in it should read
2464       the source code.
2465

AIS DUMP FORMATS

2467       AIS support is an extension. It may not be present if your instance of
2468       gpsd has been built with a restricted feature set.
2469
2470       AIS packets are dumped as JSON objects with class "AIS". Each AIS
2471       report object contains a "type" field giving the AIS message type and a
2472       "scaled" field telling whether the remainder of the fields are dumped
2473       in scaled or unscaled form. (These will be emitted before any
2474       type-specific fields.) It will also contain a "device" field naming the
2475       data source. Other fields have names and types as specified in the
2476       AIVDM/AIVDO Protocol Decoding document on the GPSD project website;
2477       each message field table may be directly interpreted as a specification
2478       for the members of the corresponding JSON object type.
2479
2480       By default, certain scaling and conversion operations are performed for
2481       JSON output. Latitudes and longitudes are scaled to decimal degrees
2482       rather than the native AIS unit of 1/10000th of a minute of arc. Ship
2483       (but not air) speeds are scaled to knots rather than tenth-of-knot
2484       units. Rate of turn may appear as "nan" if is unavailable, or as one of
2485       the strings "fastright" or "fastleft" if it is out of the AIS encoding
2486       range; otherwise it is quadratically mapped back to the turn sensor
2487       number in degrees per minute. Vessel draughts are converted to decimal
2488       meters rather than native AIS decimeters. Various other scaling
2489       conversions are described in "AIVDM/AIVDO Protocol Decoding".
2490

SUBFRAME DUMP FORMATS

2492       Subframe support is always compiled into gpsd but many GPSes do not
2493       output subframe data or the gpsd driver may not support subframes.
2494
2495       Subframe packets are dumped as JSON objects with class "SUBFRAME". Each
2496       subframe report object contains a "frame" field giving the subframe
2497       number, a "tSV" field for the transmitting satellite number, a "TOW17"
2498       field containing the 17 MSBs of the start of the next 12-second message
2499       and a "scaled" field telling whether the remainder of the fields are
2500       dumped in scaled or unscaled form. It will also contain a "device"
2501       field naming the data source. Each SUBFRAME object will have a
2502       sub-object specific to that subframe page type. Those sub-object fields
2503       have names and types similar to those specified in the IS-GPS-200
2504       document; each message field table may be directly interpreted as a
2505       specification for the members of the corresponding JSON object type.
2506
2507       Table 29. SUBFRAME object
2508       ┌───────┬─────────┬─────────┬──────────────────┐
2509       │       │         │         │                  │
2510       │Name   │ Always? │ Type    │ Description      │
2511       ├───────┼─────────┼─────────┼──────────────────┤
2512       │       │         │         │                  │
2513       │class  │ Yes     │ string  │ Fixed:           │
2514       │       │         │         │ "SUBFRAME"       │
2515       ├───────┼─────────┼─────────┼──────────────────┤
2516       │       │         │         │                  │
2517       │device │ Yes     │ string  │ Name of the      │
2518       │       │         │         │ originating      │
2519       │       │         │         │ device.          │
2520       ├───────┼─────────┼─────────┼──────────────────┤
2521       │       │         │         │                  │
2522       │gnssId │ Yes     │ integer │ Constellation of │
2523       │       │         │         │ transmitting     │
2524       │       │         │         │ satellite        │
2525       ├───────┼─────────┼─────────┼──────────────────┤
2526       │       │         │         │                  │
2527       │tSV    │ Yes     │ integer │ ID of            │
2528       │       │         │         │ transmitting     │
2529       │       │         │         │ satellite (Not   │
2530       │       │         │         │ PRN)             │
2531       ├───────┼─────────┼─────────┼──────────────────┤
2532       │       │         │         │                  │
2533       │TOW17  │ No      │ integer │ Type 17 bits of  │
2534       │       │         │         │ the next GPS     │
2535       │       │         │         │ Time Of Week     │
2536       ├───────┼─────────┼─────────┼──────────────────┤
2537       │       │         │         │                  │
2538       │frame  │ No      │ integer │ Frame number     │
2539       ├───────┼─────────┼─────────┼──────────────────┤
2540       │       │         │         │                  │
2541       │scaled │ Yes     │ boolean │ True is values   │
2542       │       │         │         │ scaled           │
2543       └───────┴─────────┴─────────┴──────────────────┘
2544

READING

2546       Reading the raw JSON can be tedious. You can pretty print, and
2547       colorize, your JSON with [jq] to make reading easier. Using jq ito
2548       pretty pring a JSON file can be as simple as:
2549
2550           $ jq . GPSD.json
2551
2552       To grab 10 seconds of live gpsd JSON, and pretty print it:
2553
2554           $ gpspipe -w -x 10 | jq .
2555
2556       If you only want to see the TPV messages:
2557
2558           $ gpspipe -w -x 10 | fgrep TPV | jq .
2559

SEE ALSO

2561       gpsd(8), libgps(3), libgpsmm(3), jq(1)
2562

RESOURCES

2564       Project web site: https://gpsd.io/
2565
2566        [RFC 2783]: https://datatracker.ietf.org/doc/html/rfc2783
2567       Pulse-Per-Second API for UNIX-like Operating Systems
2568
2569        [RFC 7159]: https://datatracker.ietf.org/doc/html/rfc7159
2570       The JavaScript Object Notation (JSON) Data Interchange Format
2571
2572        [jq]: https://github.com/stedolan/jq
2573

COPYING

2575       This file is Copyright 2013 by the GPSD project
2576       SPDX-License-Identifier: BSD-2-clause
2577

AUTHOR

2579       Eric S. Raymond
2580
2581
2582
2583GPSD, Version 3.24                2022-04-27                      GPSD_JSON(5)
Impressum