gpsd_json.xml 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!--
  3. This file is Copyright (c) 2010-2018 by the GPSD project
  4. SPDX-License-Identifier: BSD-2-clause
  5. -->
  6. <!DOCTYPE refentry PUBLIC
  7. "-//OASIS//DTD DocBook XML V4.1.2//EN"
  8. "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
  9. <!ENTITY gpsdsock "/var/run/gpsd.sock">
  10. ]>
  11. <refentry id='gpsd_json.5'>
  12. <refentryinfo><date>23 June 2019</date></refentryinfo>
  13. <refmeta>
  14. <refentrytitle>gpsd_json</refentrytitle>
  15. <manvolnum>5</manvolnum>
  16. <refmiscinfo class="source">The GPSD Project</refmiscinfo>
  17. <refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
  18. </refmeta>
  19. <refnamediv id='name'>
  20. <refname>gpsd_json</refname>
  21. <refpurpose>gpsd request/response protocol</refpurpose>
  22. </refnamediv>
  23. <refsect1 id='overview'><title>OVERVIEW</title>
  24. <para><application>gpsd</application> is a service daemon that can be used
  25. to monitor GPSes, DGPS receivers, Marine AIS broadcasts, and various other
  26. location-related and kinematic sensors.</para>
  27. <para>Clients may communicate with <application>gpsd</application> via
  28. textual requests and responses over a socket. It is a bad idea for
  29. applications to speak the protocol directly: rather, they should use
  30. the <application>libgps</application> client library (for C; bindings
  31. also exist for other languages) and take appropriate care to
  32. conditionalize their code on the major and minor protocol version
  33. symbols.</para>
  34. <para>The GPSD protocol is built on top of JSON, JavaScript Object
  35. Notation, as specified in RFC 7159: <citetitle>The JavaScript Object
  36. Notation (JSON) Data Interchange Format</citetitle>. GPSD's use of
  37. JSON is restricted in some ways that make parsing it in fixed-extent
  38. languages (such as C) easier.</para>
  39. <para>A request line is introduced by "?" and may include multiple
  40. commands. Commands begin with a command identifier, followed either
  41. by a terminating ';' or by an equal sign "=" and a JSON object treated
  42. as an argument. Any ';' or newline indication (either LF or CR-LF)
  43. after the end of a command is ignored. All request lines must be
  44. composed of US-ASCII characters and may be no more than 80 characters
  45. in length, exclusive of the trailing newline.</para>
  46. <para>Responses are JSON objects all of which have a "class" attribute
  47. the value of which is either the name of the invoking command. There
  48. are reports (including but not limited to as "TPV", "SKY", "DEVICE",
  49. and "ERROR") which are not direct responses to commands.</para>
  50. <para> The order of JSON attributes within a response object is never
  51. significant, and you may specify attributes in commands in any
  52. order. Responses never contain the special JSON value null; instead,
  53. attributes with empty or undefined values are omitted. The length
  54. limit for responses and reports is 1536 characters, including trailing
  55. newline; longer responses will be truncated, so client code must be
  56. prepared for the possibility of invalid JSON fragments.</para>
  57. <para>In JSON reports, if an attribute is present only if the parent
  58. attribute is present or has a particular range, then the parent
  59. attribute is emitted first.</para>
  60. <para>There is one constraint on the order in which attributes will
  61. be omitted. If an optional attribute is present only when a parent
  62. attribute has a specified value or range of values, the parent
  63. attribute will be emitted first to make parsing easier.</para>
  64. <para>The next subsection section documents the core GPSD protocol.
  65. Extensions are documented in the following subsections. The extensions
  66. may not be supported in your <application>gpsd</application> instance
  67. if it has been compiled with a restricted feature set.</para>
  68. </refsect1>
  69. <refsect1 id='core-protocol'><title>CORE SOCKET PROTOCOL</title>
  70. <para>Here are the core-protocol responses:</para>
  71. <variablelist>
  72. <varlistentry>
  73. <term>TPV</term>
  74. <listitem>
  75. <para>A TPV object is a time-position-velocity report. The "class" and "mode"
  76. fields will reliably be present. The "mode" field will be emitted
  77. before optional fields that may be absent when there is no fix. Error
  78. estimates will be emitted after the fix components they're associated with.
  79. Others may be reported or not depending on the fix quality.</para>
  80. <para>All error estimates (epc, epd, epe, eph, ept, epv, epx, epy)
  81. are assumed to be 95% confidence, may also be 50%, one sigma, or two
  82. sigma confidence. Many GPS do not specify a confidence level. No
  83. GPS specifies how the value is calculated. Use error estimates with
  84. caution, and only as relative "goodness" indicators. If the GPS reports
  85. a value to gpsd, then gpsd will report that value. Otherwise gpsd will
  86. try to compute the value from the skyview.</para>
  87. <table frame="all" pgwide="0"><title>TPV object</title>
  88. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  89. <thead>
  90. <row>
  91. <entry>Name</entry>
  92. <entry>Always?</entry>
  93. <entry>Type</entry>
  94. <entry>Description</entry>
  95. </row>
  96. </thead>
  97. <tbody>
  98. <row>
  99. <entry>class</entry>
  100. <entry>Yes</entry>
  101. <entry>string</entry>
  102. <entry>Fixed: "TPV"</entry>
  103. </row>
  104. <row>
  105. <entry>device</entry>
  106. <entry>No</entry>
  107. <entry>string</entry>
  108. <entry>Name of originating device.</entry>
  109. </row>
  110. <row>
  111. <entry>status</entry>
  112. <entry>No</entry>
  113. <entry>numeric</entry>
  114. <entry>GPS status: %d, 2=DGPS fix, otherwise not present.</entry>
  115. </row>
  116. <row>
  117. <entry>mode</entry>
  118. <entry>Yes</entry>
  119. <entry>numeric</entry>
  120. <entry>NMEA mode: %d, 0=no mode value yet seen, 1=no fix, 2=2D, 3=3D.</entry>
  121. </row>
  122. <row>
  123. <entry>time</entry>
  124. <entry>No</entry>
  125. <entry>string</entry>
  126. <entry>Time/date stamp in ISO8601 format, UTC. May have a
  127. fractional part of up to .001sec precision. May be absent if mode
  128. is not 2 or 3.</entry>
  129. </row>
  130. <row>
  131. <entry>altHAE</entry>
  132. <entry>No</entry>
  133. <entry>numeric</entry>
  134. <entry>Altitude, height above allipsoid, in meters. Probably
  135. WGS84. Present if mode is 3.
  136. </entry>
  137. </row>
  138. <row>
  139. <entry>altMSL</entry>
  140. <entry>No</entry>
  141. <entry>numeric</entry>
  142. <entry>MSL Altitude in meters. The geoid used is rarely specified
  143. and is often inacurate. See the comments below on geoidSep. Present if
  144. mode is 3. altMSL is altHAE - geoidSep.</entry>
  145. </row>
  146. <row>
  147. <entry>climb</entry>
  148. <entry>No</entry>
  149. <entry>numeric</entry>
  150. <entry>Climb (positive) or sink (negative) rate, meters per
  151. second.</entry>
  152. </row>
  153. <row>
  154. <entry>datum</entry>
  155. <entry>No</entry>
  156. <entry>string</entry>
  157. <entry>Current datum.</entry>
  158. </row>
  159. <row>
  160. <entry>depth</entry>
  161. <entry>No</entry>
  162. <entry>numeric</entry>
  163. <entry>Depth in meters. Probably depth below the keel..</entry>
  164. </row>
  165. <row>
  166. <entry>dgpsAge</entry>
  167. <entry>No</entry>
  168. <entry>numeric</entry>
  169. <entry>Age of DGPS data. In seconds</entry>
  170. </row>
  171. <row>
  172. <entry>dgpsSta</entry>
  173. <entry>No</entry>
  174. <entry>numeric</entry>
  175. <entry>Station of DGPS data.</entry>
  176. </row>
  177. <row>
  178. <entry>epc</entry>
  179. <entry>No</entry>
  180. <entry>numeric</entry>
  181. <entry>Estimated climb error in meters per second. Present
  182. if consecutive 3D fixes.</entry>
  183. </row>
  184. <row>
  185. <entry>epd</entry>
  186. <entry>No</entry>
  187. <entry>numeric</entry>
  188. <entry>Estimated track (direction) error in degrees. Present if
  189. consecutive 2D fixes.</entry>
  190. </row>
  191. <row>
  192. <entry>eph</entry>
  193. <entry>No</entry>
  194. <entry>numeric</entry>
  195. <entry>Estimated horizontal Position (2D) Error in meters.
  196. Also known as Estimated Position Error (epe). Present
  197. if mode is 2D or 3D and DOPs can be calculated from the satellite
  198. view.</entry>
  199. </row>
  200. <row>
  201. <entry>eps</entry>
  202. <entry>No</entry>
  203. <entry>numeric</entry>
  204. <entry>Estimated speed error in meters per second. Present
  205. for consecutive 2D or 3D fixes.</entry>
  206. </row>
  207. <row>
  208. <entry>ept</entry>
  209. <entry>No</entry>
  210. <entry>numeric</entry>
  211. <entry>Estimated timestamp error in seconds.
  212. Present if time is present.</entry>
  213. </row>
  214. <row>
  215. <entry>epx</entry>
  216. <entry>No</entry>
  217. <entry>numeric</entry>
  218. <entry>Longitude error estimate in meters. Present
  219. if mode is 2D or 3D and DOPs can be calculated from the satellite
  220. view.</entry>
  221. </row>
  222. <row>
  223. <entry>epy</entry>
  224. <entry>No</entry>
  225. <entry>numeric</entry>
  226. <entry>Latitude error estimate in meters. Present
  227. if mode is 2 or 3 and DOPs can be calculated from the satellite
  228. view.</entry>
  229. </row>
  230. <row>
  231. <entry>epv</entry>
  232. <entry>No</entry>
  233. <entry>numeric</entry>
  234. <entry>Estimated vertical error in meters. Present
  235. if mode is 3 and DOPs can be calculated from the satellite
  236. view.</entry>
  237. </row>
  238. <row>
  239. <entry>lat</entry>
  240. <entry>No</entry>
  241. <entry>numeric</entry>
  242. <entry>Latitude in degrees: +/- signifies North/South. Present
  243. when mode is 2 or 3.</entry>
  244. </row>
  245. <row>
  246. <entry>leapseconds</entry>
  247. <entry>integer</entry>
  248. <entry><para>Current leap seconds.</para></entry>
  249. </row>
  250. <row>
  251. <entry>lon</entry>
  252. <entry>No</entry>
  253. <entry>numeric</entry>
  254. <entry>Longitude in degrees: +/- signifies East/West. Present
  255. when mode is 2 or 3.</entry>
  256. </row>
  257. <row>
  258. <entry>track</entry>
  259. <entry>No</entry>
  260. <entry>numeric</entry>
  261. <entry>Course over ground, degrees from true north.</entry>
  262. </row>
  263. <row>
  264. <entry>magtrack</entry>
  265. <entry>No</entry>
  266. <entry>numeric</entry>
  267. <entry>Course over ground, degrees magnetic.</entry>
  268. </row>
  269. <row>
  270. <entry>magvar</entry>
  271. <entry>No</entry>
  272. <entry>numeric</entry>
  273. <entry>Magnetic variation, degrees. Also known as
  274. the magnetic declination (the direction of the horizontal component of
  275. the magnetic field measured clockwise from north) in degrees,
  276. Positive is West variation. Negative is East variation.</entry>
  277. </row>
  278. <row>
  279. <entry>speed</entry>
  280. <entry>No</entry>
  281. <entry>numeric</entry>
  282. <entry>Speed over ground, meters per second.</entry>
  283. </row>
  284. <row>
  285. <entry>ecefx</entry>
  286. <entry>No</entry>
  287. <entry>numeric</entry>
  288. <entry>ECEF X position in meters.</entry>
  289. </row>
  290. <row>
  291. <entry>ecefy</entry>
  292. <entry>No</entry>
  293. <entry>numeric</entry>
  294. <entry>ECEF Y position in meters.</entry>
  295. </row>
  296. <row>
  297. <entry>ecefz</entry>
  298. <entry>No</entry>
  299. <entry>numeric</entry>
  300. <entry>ECEF Z position in meters.</entry>
  301. </row>
  302. <row>
  303. <entry>ecefpAcc</entry>
  304. <entry>No</entry>
  305. <entry>numeric</entry>
  306. <entry>ECEF position error in meters.</entry>
  307. </row>
  308. <row>
  309. <entry>ecefvx</entry>
  310. <entry>No</entry>
  311. <entry>numeric</entry>
  312. <entry>ECEF X velocity in meters/second.</entry>
  313. </row>
  314. <row>
  315. <entry>ecefvy</entry>
  316. <entry>No</entry>
  317. <entry>numeric</entry>
  318. <entry>ECEF Y velocity in meters/second.</entry>
  319. </row>
  320. <row>
  321. <entry>ecefvz</entry>
  322. <entry>No</entry>
  323. <entry>numeric</entry>
  324. <entry>ECEF Z velocity in meters/second.</entry>
  325. </row>
  326. <row>
  327. <entry>ecefvAcc</entry>
  328. <entry>No</entry>
  329. <entry>numeric</entry>
  330. <entry>ECEF velocity error in meters/second.</entry>
  331. </row>
  332. <row>
  333. <entry>sep</entry>
  334. <entry>No</entry>
  335. <entry>numeric</entry>
  336. <entry>Estimated Spherical (3D) Position Error in meters.
  337. Present if mode is 3D and DOPs can be calculated from the satellite
  338. view. Assumed to be 95% confidence, but many GPS do not specify.
  339. </entry>
  340. </row>
  341. <row>
  342. <entry>relN</entry>
  343. <entry>No</entry>
  344. <entry>numeric</entry>
  345. <entry>North component of relative position vector in meters.</entry>
  346. </row>
  347. <row>
  348. <entry>relE</entry>
  349. <entry>No</entry>
  350. <entry>numeric</entry>
  351. <entry>East component of relative position vector in meters.</entry>
  352. </row>
  353. <row>
  354. <entry>relD</entry>
  355. <entry>No</entry>
  356. <entry>numeric</entry>
  357. <entry>Down component of relative position vector in meters.</entry>
  358. </row>
  359. <row>
  360. <entry>velN</entry>
  361. <entry>No</entry>
  362. <entry>numeric</entry>
  363. <entry>North velocity component in meters.</entry>
  364. </row>
  365. <row>
  366. <entry>velE</entry>
  367. <entry>No</entry>
  368. <entry>numeric</entry>
  369. <entry>wEast velocity component in meters.</entry>
  370. </row>
  371. <row>
  372. <entry>velD</entry>
  373. <entry>No</entry>
  374. <entry>numeric</entry>
  375. <entry>Down velocity component in meters.</entry>
  376. </row>
  377. <row>
  378. <entry>geoidSep</entry>
  379. <entry>No</entry>
  380. <entry>numeric</entry>
  381. <entry>Geoid separation is the difference between the WGS84
  382. reference elipsoid and the geoid (Mean Sea Level) in meters. Almost no
  383. GNSS receiver specifies how they compute their geoid. gpsd interpolates the
  384. geoid from a 5x5 degree table of EGM2008 values when the receiver does
  385. not supply a geoid separation. The gpsd computed geoidSep is usually
  386. within one meter of the "true" value, but can be off as much as 12 meters.
  387. </entry>
  388. </row>
  389. </tbody>
  390. </tgroup>
  391. </table>
  392. <para>When the C client library parses a response of this kind, it
  393. will assert validity bits in the top-level set member for each
  394. field actually received; see gps.h for bitmask names and values.</para>
  395. <para>Invalid or known floating point values will be set to NAN.
  396. </para>
  397. <para>Here's an example:</para>
  398. <programlisting>
  399. {"class":"TPV","device":"/dev/pts/1",
  400. "time":"2005-06-08T10:34:48.283Z","ept":0.005,
  401. "lat":46.498293369,"lon":7.567411672,"alt":1343.127,
  402. "eph":36.000,"epv":32.321,
  403. "track":10.3788,"speed":0.091,"climb":-0.085,"mode":3}
  404. </programlisting>
  405. </listitem>
  406. </varlistentry>
  407. <varlistentry>
  408. <term>SKY</term>
  409. <listitem>
  410. <para>A SKY object reports a sky view of the GPS satellite positions.
  411. If there is no GPS device available, or no skyview has been reported
  412. yet, only the "class" field will reliably be present.</para>
  413. <table frame="all" pgwide="0"><title>SKY object</title>
  414. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  415. <thead>
  416. <row>
  417. <entry>Name</entry>
  418. <entry>Always?</entry>
  419. <entry>Type</entry>
  420. <entry>Description</entry>
  421. </row>
  422. </thead>
  423. <tbody>
  424. <row>
  425. <entry>class</entry>
  426. <entry>Yes</entry>
  427. <entry>string</entry>
  428. <entry>Fixed: "SKY"</entry>
  429. </row>
  430. <row>
  431. <entry>device</entry>
  432. <entry>No</entry>
  433. <entry>string</entry>
  434. <entry>Name of originating device</entry>
  435. </row>
  436. <row>
  437. <entry>time</entry>
  438. <entry>No</entry>
  439. <entry>string</entry>
  440. <entry>Time/date stamp in ISO8601 format, UTC. May have a
  441. fractional part of up to .001sec precision.</entry>
  442. </row>
  443. <row>
  444. <entry>gdop</entry>
  445. <entry>No</entry>
  446. <entry>numeric</entry>
  447. <entry>Geometric (hyperspherical) dilution of precision, a
  448. combination of PDOP and TDOP. A dimensionless factor which
  449. should be multiplied by a base UERE
  450. to get an error estimate.</entry>
  451. </row>
  452. <row>
  453. <entry>hdop</entry>
  454. <entry>No</entry>
  455. <entry>numeric</entry>
  456. <entry>Horizontal dilution of precision, a dimensionless
  457. factor which should be multiplied by a base UERE to get a
  458. circular error estimate.</entry>
  459. </row>
  460. <row>
  461. <entry>pdop</entry>
  462. <entry>No</entry>
  463. <entry>numeric</entry>
  464. <entry>Position (spherical/3D) dilution of precision, a dimensionless
  465. factor which should be multiplied by a base UERE to get an
  466. error estimate.</entry>
  467. </row>
  468. <row>
  469. <entry>tdop</entry>
  470. <entry>No</entry>
  471. <entry>numeric</entry>
  472. <entry>Time dilution of precision, a dimensionless
  473. factor which should be multiplied by a base UERE to get an
  474. error estimate.</entry>
  475. </row>
  476. <row>
  477. <entry>vdop</entry>
  478. <entry>No</entry>
  479. <entry>numeric</entry>
  480. <entry>Vertical (altitude) dilution of precision, a dimensionless
  481. factor which should be multiplied by a base UERE to get an
  482. error estimate.</entry>
  483. </row>
  484. <row>
  485. <entry>xdop</entry>
  486. <entry>No</entry>
  487. <entry>numeric</entry>
  488. <entry>Longitudinal dilution of precision, a dimensionless
  489. factor which should be multiplied by a base UERE to get an
  490. error estimate.</entry>
  491. </row>
  492. <row>
  493. <entry>ydop</entry>
  494. <entry>No</entry>
  495. <entry>numeric</entry>
  496. <entry>Latitudinal dilution of precision, a dimensionless
  497. factor which should be multiplied by a base UERE to get an
  498. error estimate.</entry>
  499. </row>
  500. <row>
  501. <entry>satellites</entry>
  502. <entry>Yes</entry>
  503. <entry>list</entry>
  504. <entry>List of satellite objects in skyview</entry>
  505. </row>
  506. </tbody>
  507. </tgroup>
  508. </table>
  509. <para>Many devices compute dilution of precision factors but do not
  510. include them in their reports. Many that do report DOPs report only
  511. HDOP, two-dimensional circular error. <application>gpsd</application>
  512. always passes through whatever the device actually reports, then
  513. attempts to fill in other DOPs by calculating the appropriate
  514. determinants in a covariance matrix based on the satellite view. DOPs
  515. may be missing if some of these determinants are singular. It can even
  516. happen that the device reports an error estimate in meters when the
  517. corresponding DOP is unavailable; some devices use more sophisticated
  518. error modeling than the covariance calculation.</para>
  519. <para>The satellite list objects have the following elements:</para>
  520. <table frame="all" pgwide="0"><title>Satellite object</title>
  521. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  522. <thead>
  523. <row>
  524. <entry>Name</entry>
  525. <entry>Always?</entry>
  526. <entry>Type</entry>
  527. <entry>Description</entry>
  528. </row>
  529. </thead>
  530. <tbody>
  531. <row>
  532. <entry>PRN</entry>
  533. <entry>Yes</entry>
  534. <entry>numeric</entry>
  535. <entry>PRN ID of the satellite. 1-63 are GNSS satellites,
  536. 64-96 are GLONASS satellites, 100-164 are SBAS satellites</entry>
  537. </row>
  538. <row>
  539. <entry>az</entry>
  540. <entry>No</entry>
  541. <entry>numeric</entry>
  542. <entry>Azimuth, degrees from true north.</entry>
  543. </row>
  544. <row>
  545. <entry>el</entry>
  546. <entry>No</entry>
  547. <entry>numeric</entry>
  548. <entry>Elevation in degrees.</entry>
  549. </row>
  550. <row>
  551. <entry>ss</entry>
  552. <entry>No</entry>
  553. <entry>numeric</entry>
  554. <entry>Signal to Noise ratio in dBHz.</entry>
  555. </row>
  556. <row>
  557. <entry>used</entry>
  558. <entry>Yes</entry>
  559. <entry>boolean</entry>
  560. <entry>Used in current solution? (SBAS/WAAS/EGNOS satellites
  561. may be flagged used if the solution has corrections from them,
  562. but not all drivers make this information available.)</entry>
  563. </row>
  564. <row>
  565. <entry>gnssid</entry>
  566. <entry>No</entry>
  567. <entry>numeric</entry>
  568. <entry>The GNSS ID, as defined by u-blox, not NMEA. 0=GPS,
  569. 2=Galileo, 3=Beidou, 5=QZSS, 6-GLONASS.</entry>
  570. </row>
  571. <row>
  572. <entry>svid</entry>
  573. <entry>no</entry>
  574. <entry>numeric</entry>
  575. <entry>The satellite ID within its constellation. As defined
  576. by u-blox, not NMEA).</entry>
  577. </row>
  578. <row>
  579. <entry>sigid</entry>
  580. <entry>no</entry>
  581. <entry>numeric</entry>
  582. <entry>The signal ID of this signal. As defined by u-blox, not
  583. NMEA. See u-blox doc for details.</entry>
  584. </row>
  585. <row>
  586. <entry>freqid</entry>
  587. <entry>no</entry>
  588. <entry>numeric</entry>
  589. <entry>For GLONASS satellites only: the frequency ID of the signal.
  590. As defined by u-blox, range 0 to 13. The freqid is the frequency slot
  591. plus 7.</entry>
  592. </row>
  593. <row>
  594. <entry>health</entry>
  595. <entry>no</entry>
  596. <entry>numeric</entry>
  597. <entry>The health of this satellite. 0 is unknown, 1 is
  598. OK, and 2 is unhealthy.</entry>
  599. </row>
  600. </tbody>
  601. </tgroup>
  602. </table>
  603. <para>Note that satellite objects do not have a "class" field, as
  604. they are never shipped outside of a SKY object.</para>
  605. <para>When the C client library parses a SKY response, it
  606. will assert the SATELLITE_SET bit in the top-level set member.</para>
  607. <para>Here's an example:</para>
  608. <programlisting>
  609. {"class":"SKY","device":"/dev/pts/1",
  610. "time":"2005-07-08T11:28:07.114Z",
  611. "xdop":1.55,"hdop":1.24,"pdop":1.99,
  612. "satellites":[
  613. {"PRN":23,"el":6,"az":84,"ss":0,"used":false},
  614. {"PRN":28,"el":7,"az":160,"ss":0,"used":false},
  615. {"PRN":8,"el":66,"az":189,"ss":44,"used":true},
  616. {"PRN":29,"el":13,"az":273,"ss":0,"used":false},
  617. {"PRN":10,"el":51,"az":304,"ss":29,"used":true},
  618. {"PRN":4,"el":15,"az":199,"ss":36,"used":true},
  619. {"PRN":2,"el":34,"az":241,"ss":43,"used":true},
  620. {"PRN":27,"el":71,"az":76,"ss":43,"used":true}]}
  621. </programlisting>
  622. </listitem>
  623. </varlistentry>
  624. <varlistentry>
  625. <term>GST</term>
  626. <listitem>
  627. <para>A GST object is a pseudorange noise report.</para>
  628. <table frame="all" pgwide="0"><title>GST object</title>
  629. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  630. <thead>
  631. <row>
  632. <entry>Name</entry>
  633. <entry>Always?</entry>
  634. <entry>Type</entry>
  635. <entry>Description</entry>
  636. </row>
  637. </thead>
  638. <tbody>
  639. <row>
  640. <entry>class</entry>
  641. <entry>Yes</entry>
  642. <entry>string</entry>
  643. <entry>Fixed: "GST"</entry>
  644. </row>
  645. <row>
  646. <entry>device</entry>
  647. <entry>No</entry>
  648. <entry>string</entry>
  649. <entry>Name of originating device</entry>
  650. </row>
  651. <row>
  652. <entry>time</entry>
  653. <entry>No</entry>
  654. <entry>string</entry>
  655. <entry>Time/date stamp in ISO8601 format, UTC. May have a
  656. fractional part of up to .001sec precision.</entry>
  657. </row>
  658. <row>
  659. <entry>rms</entry>
  660. <entry>No</entry>
  661. <entry>numeric</entry>
  662. <entry>Value of the standard deviation of the range inputs to the
  663. navigation process (range inputs include pseudoranges and DGPS
  664. corrections).</entry>
  665. </row>
  666. <row>
  667. <entry>major</entry>
  668. <entry>No</entry>
  669. <entry>numeric</entry>
  670. <entry>Standard deviation of semi-major axis of error ellipse, in meters.</entry>
  671. </row>
  672. <row>
  673. <entry>minor</entry>
  674. <entry>No</entry>
  675. <entry>numeric</entry>
  676. <entry>Standard deviation of semi-minor axis of error ellipse, in meters.</entry>
  677. </row>
  678. <row>
  679. <entry>orient</entry>
  680. <entry>No</entry>
  681. <entry>numeric</entry>
  682. <entry>Orientation of semi-major axis of error ellipse, in degrees from true north.</entry>
  683. </row>
  684. <row>
  685. <entry>lat</entry>
  686. <entry>No</entry>
  687. <entry>numeric</entry>
  688. <entry>Standard deviation of latitude error, in meters.</entry>
  689. </row>
  690. <row>
  691. <entry>lon</entry>
  692. <entry>No</entry>
  693. <entry>numeric</entry>
  694. <entry>Standard deviation of longitude error, in meters.</entry>
  695. </row>
  696. <row>
  697. <entry>alt</entry>
  698. <entry>No</entry>
  699. <entry>numeric</entry>
  700. <entry>Standard deviation of altitude error, in meters.</entry>
  701. </row>
  702. </tbody>
  703. </tgroup>
  704. </table>
  705. <para>Here's an example:</para>
  706. <programlisting>
  707. {"class":"GST","device":"/dev/ttyUSB0",
  708. "time":"2010-12-07T10:23:07.096Z","rms":2.440,
  709. "major":1.660,"minor":1.120,"orient":68.989,
  710. "lat":1.600,"lon":1.200,"alt":2.520}
  711. </programlisting>
  712. </listitem>
  713. </varlistentry>
  714. <varlistentry>
  715. <term>ATT</term>
  716. <listitem>
  717. <para>An ATT object is a vehicle-attitude report. It is returned by
  718. digital-compass and gyroscope sensors; depending on device, it may
  719. include: heading, pitch, roll, yaw, gyroscope, and magnetic-field
  720. readings. Because such sensors are often bundled as part of
  721. marine-navigation systems, the ATT response may also include
  722. water depth.</para>
  723. <para>The "class" and "mode" fields will reliably be present. Others
  724. may be reported or not depending on the specific device type.</para>
  725. <table frame="all" pgwide="0"><title>ATT object</title>
  726. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  727. <thead>
  728. <row>
  729. <entry>Name</entry>
  730. <entry>Always?</entry>
  731. <entry>Type</entry>
  732. <entry>Description</entry>
  733. </row>
  734. </thead>
  735. <tbody>
  736. <row>
  737. <entry>class</entry>
  738. <entry>Yes</entry>
  739. <entry>string</entry>
  740. <entry>Fixed: "ATT"</entry>
  741. </row>
  742. <row>
  743. <entry>device</entry>
  744. <entry>Yes</entry>
  745. <entry>string</entry>
  746. <entry>Name of originating device</entry>
  747. </row>
  748. <row>
  749. <entry>time</entry>
  750. <entry>No</entry>
  751. <entry>string</entry>
  752. <entry>Time/date stamp in ISO8601 format, UTC. May have a
  753. fractional part of up to .001sec precision.</entry>
  754. </row>
  755. <row>
  756. <entry>heading</entry>
  757. <entry>No</entry>
  758. <entry>numeric</entry>
  759. <entry>Heading, degrees from true north.</entry>
  760. </row>
  761. <row>
  762. <entry>mag_st</entry>
  763. <entry>No</entry>
  764. <entry>string</entry>
  765. <entry>Magnetometer status.</entry>
  766. </row>
  767. <row>
  768. <entry>pitch</entry>
  769. <entry>No</entry>
  770. <entry>numeric</entry>
  771. <entry>Pitch in degrees.</entry>
  772. </row>
  773. <row>
  774. <entry>pitch_st</entry>
  775. <entry>No</entry>
  776. <entry>string</entry>
  777. <entry>Pitch sensor status.</entry>
  778. </row>
  779. <row>
  780. <entry>yaw</entry>
  781. <entry>No</entry>
  782. <entry>numeric</entry>
  783. <entry>Yaw in degrees</entry>
  784. </row>
  785. <row>
  786. <entry>yaw_st</entry>
  787. <entry>No</entry>
  788. <entry>string</entry>
  789. <entry>Yaw sensor status.</entry>
  790. </row>
  791. <row>
  792. <entry>roll</entry>
  793. <entry>No</entry>
  794. <entry>numeric</entry>
  795. <entry>Roll in degrees.</entry>
  796. </row>
  797. <row>
  798. <entry>roll_st</entry>
  799. <entry>No</entry>
  800. <entry>string</entry>
  801. <entry>Roll sensor status.</entry>
  802. </row>
  803. <row>
  804. <entry>dip</entry>
  805. <entry>No</entry>
  806. <entry>numeric</entry>
  807. <entry>Local magnetic inclination, degrees, positive when the magnetic
  808. field points downward (into the Earth).</entry>
  809. </row>
  810. <row>
  811. <entry>mag_len</entry>
  812. <entry>No</entry>
  813. <entry>numeric</entry>
  814. <entry>Scalar magnetic field strength.</entry>
  815. </row>
  816. <row>
  817. <entry>mag_x</entry>
  818. <entry>No</entry>
  819. <entry>numeric</entry>
  820. <entry>X component of magnetic field strength.</entry>
  821. </row>
  822. <row>
  823. <entry>mag_y</entry>
  824. <entry>No</entry>
  825. <entry>numeric</entry>
  826. <entry>Y component of magnetic field strength.</entry>
  827. </row>
  828. <row>
  829. <entry>mag_z</entry>
  830. <entry>No</entry>
  831. <entry>numeric</entry>
  832. <entry>Z component of magnetic field strength.</entry>
  833. </row>
  834. <row>
  835. <entry>acc_len</entry>
  836. <entry>No</entry>
  837. <entry>numeric</entry>
  838. <entry>Scalar acceleration.</entry>
  839. </row>
  840. <row>
  841. <entry>acc_x</entry>
  842. <entry>No</entry>
  843. <entry>numeric</entry>
  844. <entry>X component of acceleration.</entry>
  845. </row>
  846. <row>
  847. <entry>acc_y</entry>
  848. <entry>No</entry>
  849. <entry>numeric</entry>
  850. <entry>Y component of acceleration.</entry>
  851. </row>
  852. <row>
  853. <entry>acc_z</entry>
  854. <entry>No</entry>
  855. <entry>numeric</entry>
  856. <entry>Z component of acceleration.</entry>
  857. </row>
  858. <row>
  859. <entry>gyro_x</entry>
  860. <entry>No</entry>
  861. <entry>numeric</entry>
  862. <entry>X component of acceleration.</entry>
  863. </row>
  864. <row>
  865. <entry>gyro_y</entry>
  866. <entry>No</entry>
  867. <entry>numeric</entry>
  868. <entry>Y component of acceleration.</entry>
  869. </row>
  870. <row>
  871. <entry>depth</entry>
  872. <entry>No</entry>
  873. <entry>numeric</entry>
  874. <entry>Water depth in meters.</entry>
  875. </row>
  876. <row>
  877. <entry>temp</entry>
  878. <entry>No</entry>
  879. <entry>numeric</entry>
  880. <entry>Temperature at sensor, degrees centigrade.</entry>
  881. </row>
  882. </tbody>
  883. </tgroup>
  884. </table>
  885. <para>The heading, pitch, and roll status codes (if present) vary by device.
  886. For the TNT Revolution digital compasses, they are coded as follows: </para>
  887. <table frame="all" pgwide="0"><title>Device flags</title>
  888. <tgroup cols="2" align="left" colsep="1" rowsep="1">
  889. <thead>
  890. <row>
  891. <entry>Code</entry>
  892. <entry>Description</entry>
  893. </row>
  894. </thead>
  895. <tbody>
  896. <row>
  897. <entry>C</entry>
  898. <entry>magnetometer calibration alarm</entry>
  899. </row>
  900. <row>
  901. <entry>L</entry>
  902. <entry>low alarm</entry>
  903. </row>
  904. <row>
  905. <entry>M</entry>
  906. <entry>low warning</entry>
  907. </row>
  908. <row>
  909. <entry>N</entry>
  910. <entry>normal</entry>
  911. </row>
  912. <row>
  913. <entry>O</entry>
  914. <entry>high warning</entry>
  915. </row>
  916. <row>
  917. <entry>P</entry>
  918. <entry>high alarm</entry>
  919. </row>
  920. <row>
  921. <entry>V</entry>
  922. <entry>magnetometer voltage level alarm</entry>
  923. </row>
  924. </tbody>
  925. </tgroup>
  926. </table>
  927. <para>When the C client library parses a response of this kind, it
  928. will assert ATT_IS.</para>
  929. <para>Here's an example:</para>
  930. <programlisting>
  931. {"class":"ATT","time":1270938096.843,
  932. "heading":14223.00,"mag_st":"N",
  933. "pitch":169.00,"pitch_st":"N", "roll":-43.00,"roll_st":"N",
  934. "dip":13641.000,"mag_x":2454.000}
  935. </programlisting>
  936. </listitem>
  937. </varlistentry>
  938. </variablelist>
  939. <para>And here are the commands:</para>
  940. <variablelist>
  941. <varlistentry>
  942. <term>?VERSION;</term>
  943. <listitem><para>Returns an object with the following attributes:</para>
  944. <table frame="all" pgwide="0"><title>VERSION object</title>
  945. <tgroup cols="4" align="left" colsep="1" rowsep="1">
  946. <thead>
  947. <row>
  948. <entry>Name</entry>
  949. <entry>Always?</entry>
  950. <entry>Type</entry>
  951. <entry>Description</entry>
  952. </row>
  953. </thead>
  954. <tbody>
  955. <row>
  956. <entry>class</entry>
  957. <entry>Yes</entry>
  958. <entry>string</entry>
  959. <entry>Fixed: "VERSION"</entry>
  960. </row>
  961. <row>
  962. <entry>release</entry>
  963. <entry>Yes</entry>
  964. <entry>string</entry>
  965. <entry>Public release level</entry>
  966. </row>
  967. <row>
  968. <entry>rev</entry>
  969. <entry>Yes</entry>
  970. <entry>string</entry>
  971. <entry>Internal revision-control level.</entry>
  972. </row>
  973. <row>
  974. <entry>proto_major</entry>
  975. <entry>Yes</entry>
  976. <entry>numeric</entry>
  977. <entry>API major revision level.</entry>
  978. </row>
  979. <row>
  980. <entry>proto_minor</entry>
  981. <entry>Yes</entry>
  982. <entry>numeric</entry>
  983. <entry>API minor revision level.</entry>
  984. </row>
  985. <row>
  986. <entry>remote</entry>
  987. <entry>No</entry>
  988. <entry>string</entry>
  989. <entry>URL of the remote daemon reporting this version. If
  990. empty, this is the version of the local daemon.</entry>
  991. </row>
  992. </tbody>
  993. </tgroup>
  994. </table>
  995. <para>The daemon ships a VERSION response to each client when the
  996. client first connects to it.</para>
  997. <para>When the C client library parses a response of this kind, it
  998. will assert the VERSION_SET bit in the top-level set member.</para>
  999. <para>Here's an example:</para>
  1000. <programlisting>
  1001. {"class":"VERSION","version":"2.40dev",
  1002. "rev":"06f62e14eae9886cde907dae61c124c53eb1101f",
  1003. "proto_major":3,"proto_minor":1
  1004. }
  1005. </programlisting>
  1006. </listitem>
  1007. </varlistentry>
  1008. <varlistentry>
  1009. <term>?DEVICES;</term>
  1010. <listitem><para>Returns a device list object with the
  1011. following elements:</para>
  1012. <table frame="all" pgwide="0"><title>DEVICES object</title>
  1013. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  1014. <thead>
  1015. <row>
  1016. <entry>Name</entry>
  1017. <entry>Always?</entry>
  1018. <entry>Type</entry>
  1019. <entry>Description</entry>
  1020. </row>
  1021. </thead>
  1022. <tbody>
  1023. <row>
  1024. <entry>class</entry>
  1025. <entry>Yes</entry>
  1026. <entry>string</entry>
  1027. <entry>Fixed: "DEVICES"</entry>
  1028. </row>
  1029. <row>
  1030. <entry>devices</entry>
  1031. <entry>Yes</entry>
  1032. <entry>list</entry>
  1033. <entry>List of device descriptions</entry>
  1034. </row>
  1035. <row>
  1036. <entry>remote</entry>
  1037. <entry>No</entry>
  1038. <entry>string</entry>
  1039. <entry>URL of the remote daemon reporting the device set. If
  1040. empty, this is a DEVICES response from the local daemon.</entry>
  1041. </row>
  1042. </tbody>
  1043. </tgroup>
  1044. </table>
  1045. <para>When the C client library parses a response of this kind, it
  1046. will assert the DEVICELIST_SET bit in the top-level set member.</para>
  1047. <para>Here's an example:</para>
  1048. <programlisting>
  1049. {"class"="DEVICES","devices":[
  1050. {"class":"DEVICE","path":"/dev/pts/1","flags":1,"driver":"SiRF binary"},
  1051. {"class":"DEVICE","path":"/dev/pts/3","flags":4,"driver":"AIVDM"}]}
  1052. </programlisting>
  1053. <para>The daemon occasionally ships a bare DEVICE object to the client
  1054. (that is, one not inside a DEVICES wrapper). The data content of these
  1055. objects will be described later as a response to the ?DEVICE command.</para>
  1056. </listitem>
  1057. </varlistentry>
  1058. <varlistentry>
  1059. <term>?WATCH;</term>
  1060. <listitem>
  1061. <para>This command sets watcher mode. It also sets or elicits a report
  1062. of per-subscriber policy and the raw bit. An argument WATCH object
  1063. changes the subscriber's policy. The response describes the
  1064. subscriber's policy. The response will also include a DEVICES
  1065. object.</para>
  1066. <para>A WATCH object has the following elements:</para>
  1067. <table frame="all" pgwide="0"><title>WATCH object</title>
  1068. <tgroup cols="4" align="left" colsep="1" rowsep="1">
  1069. <thead>
  1070. <row>
  1071. <entry>Name</entry>
  1072. <entry>Always?</entry>
  1073. <entry>Type</entry>
  1074. <entry>Description</entry>
  1075. </row>
  1076. </thead>
  1077. <tbody>
  1078. <row>
  1079. <entry>class</entry>
  1080. <entry>Yes</entry>
  1081. <entry>string</entry>
  1082. <entry>Fixed: "WATCH"</entry>
  1083. </row>
  1084. <row>
  1085. <entry>enable</entry>
  1086. <entry>No</entry>
  1087. <entry>boolean</entry>
  1088. <entry>Enable (true) or disable (false) watcher mode. Default
  1089. is true.</entry>
  1090. </row>
  1091. <row>
  1092. <entry>json</entry>
  1093. <entry>No</entry>
  1094. <entry>boolean</entry>
  1095. <entry>Enable (true) or disable (false) dumping of JSON reports.
  1096. Default is false.</entry>
  1097. </row>
  1098. <row>
  1099. <entry>nmea</entry>
  1100. <entry>No</entry>
  1101. <entry>boolean</entry>
  1102. <entry>Enable (true) or disable (false) dumping of binary
  1103. packets as pseudo-NMEA. Default
  1104. is false.</entry>
  1105. </row>
  1106. <row>
  1107. <entry>raw</entry>
  1108. <entry>No</entry>
  1109. <entry>integer</entry>
  1110. <entry>Controls 'raw' mode. When this attribute is set to 1
  1111. for a channel, <application>gpsd</application> reports the
  1112. unprocessed NMEA or AIVDM data stream from whatever device is attached.
  1113. Binary GPS packets are hex-dumped. RTCM2 and RTCM3
  1114. packets are not dumped in raw mode. When this attribute is set to
  1115. 2 for a channel that processes binary data,
  1116. <application>gpsd</application> reports the received data verbatim
  1117. without hex-dumping.</entry>
  1118. </row>
  1119. <row>
  1120. <entry>scaled</entry>
  1121. <entry>No</entry>
  1122. <entry>boolean</entry>
  1123. <entry>If true, apply scaling divisors to output before
  1124. dumping; default is false.</entry>
  1125. </row>
  1126. <row>
  1127. <entry>split24</entry>
  1128. <entry>No</entry>
  1129. <entry>boolean</entry>
  1130. <entry>If true, aggregate AIS type24 sentence parts. If false,
  1131. report each part as a separate JSON object, leaving the
  1132. client to match MMSIs and aggregate. Default is
  1133. false. Applies only to AIS reports.</entry>
  1134. </row>
  1135. <row>
  1136. <entry>pps</entry>
  1137. <entry>No</entry>
  1138. <entry>boolean</entry>
  1139. <entry>If true, emit the TOFF JSON message on each cycle and a
  1140. PPS JSON message when the device issues 1PPS. Default is false.</entry>
  1141. </row>
  1142. <row>
  1143. <entry>device</entry>
  1144. <entry>No</entry>
  1145. <entry>string</entry>
  1146. <entry>If present, enable watching only of the specified device
  1147. rather than all devices. Useful with raw and NMEA modes
  1148. in which device responses aren't tagged. Has no effect when
  1149. used with enable:false.</entry>
  1150. </row>
  1151. <row>
  1152. <entry>remote</entry>
  1153. <entry>No</entry>
  1154. <entry>string</entry>
  1155. <entry>URL of the remote daemon reporting the watch set. If
  1156. empty, this is a WATCH response from the local daemon.</entry>
  1157. </row>
  1158. </tbody>
  1159. </tgroup>
  1160. </table>
  1161. <para>There is an additional boolean "timing" attribute which is
  1162. undocumented because that portion of the interface is considered
  1163. unstable and for developer use only.</para>
  1164. <para>In watcher mode, GPS reports are dumped as TPV and SKY
  1165. responses. AIS, Subframe and RTCM reporting is described in the next
  1166. section.</para>
  1167. <para>When the C client library parses a response of this kind, it
  1168. will assert the POLICY_SET bit in the top-level set member.</para>
  1169. <para>Here's an example:</para>
  1170. <programlisting>
  1171. {"class":"WATCH", "raw":1,"scaled":true}
  1172. </programlisting>
  1173. </listitem>
  1174. </varlistentry>
  1175. <varlistentry>
  1176. <term>?POLL;</term>
  1177. <listitem>
  1178. <para>The POLL command requests data from the last-seen fixes on all
  1179. active GPS devices. Devices must previously have been activated by
  1180. ?WATCH to be pollable.</para>
  1181. <para>Polling can lead to possibly surprising results when it is used
  1182. on a device such as an NMEA GPS for which a complete fix has to be
  1183. accumulated from several sentences. If you poll while those sentences
  1184. are being emitted, the response will contain the last complete fix
  1185. data and may be as much as one cycle time (typically 1 second)
  1186. stale.</para>
  1187. <para>The POLL response will contain a timestamped list of TPV objects
  1188. describing cached data, and a timestamped list of SKY objects
  1189. describing satellite configuration. If a device has not seen fixes, it
  1190. will be reported with a mode field of zero.</para>
  1191. <table frame="all" pgwide="0"><title>POLL object</title>
  1192. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  1193. <thead>
  1194. <row>
  1195. <entry>Name</entry>
  1196. <entry>Always?</entry>
  1197. <entry>Type</entry>
  1198. <entry>Description</entry>
  1199. </row>
  1200. </thead>
  1201. <tbody>
  1202. <row>
  1203. <entry>class</entry>
  1204. <entry>Yes</entry>
  1205. <entry>string</entry>
  1206. <entry>Fixed: "POLL"</entry>
  1207. </row>
  1208. <row>
  1209. <entry>time</entry>
  1210. <entry>Yes</entry>
  1211. <entry>Numeric</entry>
  1212. <entry>Timestamp in ISO 8601 format. May have a
  1213. fractional part of up to .001sec precision.</entry>
  1214. </row>
  1215. <row>
  1216. <entry>active</entry>
  1217. <entry>Yes</entry>
  1218. <entry>Numeric</entry>
  1219. <entry>Count of active devices.</entry>
  1220. </row>
  1221. <row>
  1222. <entry>tpv</entry>
  1223. <entry>Yes</entry>
  1224. <entry>JSON array</entry>
  1225. <entry>Comma-separated list of TPV objects.</entry>
  1226. </row>
  1227. <row>
  1228. <entry>sky</entry>
  1229. <entry>Yes</entry>
  1230. <entry>JSON array</entry>
  1231. <entry>Comma-separated list of SKY objects.</entry>
  1232. </row>
  1233. </tbody>
  1234. </tgroup>
  1235. </table>
  1236. <para>Here's an example of a POLL response:</para>
  1237. <programlisting>
  1238. {"class":"POLL","time":"2010-06-04T10:31:00.289Z","active":1,
  1239. "tpv":[{"class":"TPV","device":"/dev/ttyUSB0",
  1240. "time":"2010-09-08T13:33:06.095Z",
  1241. "ept":0.005,"lat":40.035093060,
  1242. "lon":-75.519748733,"track":99.4319,"speed":0.123,"mode":2}],
  1243. "sky":[{"class":"SKY","device":"/dev/ttyUSB0",
  1244. "time":1270517264.240,"hdop":9.20,
  1245. "satellites":[{"PRN":16,"el":55,"az":42,"ss":36,"used":true},
  1246. {"PRN":19,"el":25,"az":177,"ss":0,"used":false},
  1247. {"PRN":7,"el":13,"az":295,"ss":0,"used":false},
  1248. {"PRN":6,"el":56,"az":135,"ss":32,"used":true},
  1249. {"PRN":13,"el":47,"az":304,"ss":0,"used":false},
  1250. {"PRN":23,"el":66,"az":259,"ss":0,"used":false},
  1251. {"PRN":20,"el":7,"az":226,"ss":0,"used":false},
  1252. {"PRN":3,"el":52,"az":163,"ss":32,"used":true},
  1253. {"PRN":31,"el":16,"az":102,"ss":0,"used":false}
  1254. ]}]}
  1255. </programlisting>
  1256. <note>
  1257. <para>Client software should not assume the field inventory of the
  1258. POLL response is fixed for all time. As
  1259. <application>gpsd</application> collects and caches more data from
  1260. more sensor types, those data are likely to find their way
  1261. into this response.</para>
  1262. </note>
  1263. </listitem>
  1264. </varlistentry>
  1265. <varlistentry>
  1266. <term>TOFF</term>
  1267. <listitem>
  1268. <para>This message is emitted on each cycle and reports the offset
  1269. between the host's clock time and the GPS time at top of second
  1270. (actually, when the first data for the reporting cycle is received).</para>
  1271. <para>This message exactly mirrors the PPS message except for two
  1272. details.</para>
  1273. <para>TOFF emits no NTP precision, this is assumed to be -2. See
  1274. the NTP documentation for their definition of precision.</para>
  1275. <para> The TOFF message reports the GPS time as derived from the GPS
  1276. serial data stream. The PPS message reports the GPS time as derived
  1277. from the GPS PPS pulse.</para>
  1278. <para>A TOFF object has the following elements:</para>
  1279. <table frame="all" pgwide="0"><title>TOFF object</title>
  1280. <tgroup cols="4" align="left" colsep="1" rowsep="1">
  1281. <thead>
  1282. <row>
  1283. <entry>Name</entry>
  1284. <entry>Always?</entry>
  1285. <entry>Type</entry>
  1286. <entry>Description</entry>
  1287. </row>
  1288. </thead>
  1289. <tbody>
  1290. <row>
  1291. <entry>class</entry>
  1292. <entry>Yes</entry>
  1293. <entry>string</entry>
  1294. <entry>Fixed: "TOFF"</entry>
  1295. </row>
  1296. <row>
  1297. <entry>device</entry>
  1298. <entry>Yes</entry>
  1299. <entry>string</entry>
  1300. <entry>Name of originating device</entry>
  1301. </row>
  1302. <row>
  1303. <entry>real_sec</entry>
  1304. <entry>Yes</entry>
  1305. <entry>numeric</entry>
  1306. <entry>seconds from the GPS clock</entry>
  1307. </row>
  1308. <row>
  1309. <entry>real_nsec</entry>
  1310. <entry>Yes</entry>
  1311. <entry>numeric</entry>
  1312. <entry>nanoseconds from the GPS clock</entry>
  1313. </row>
  1314. <row>
  1315. <entry>clock_sec</entry>
  1316. <entry>Yes</entry>
  1317. <entry>numeric</entry>
  1318. <entry>seconds from the system clock</entry>
  1319. </row>
  1320. <row>
  1321. <entry>clock_nsec</entry>
  1322. <entry>Yes</entry>
  1323. <entry>numeric</entry>
  1324. <entry>nanoseconds from the system clock</entry>
  1325. </row>
  1326. </tbody>
  1327. </tgroup>
  1328. </table>
  1329. <para>This message is emitted once per second to watchers of a device
  1330. and is intended to report the time stamps of the in-band report of the
  1331. GPS and seconds as reported by the system clock (which may be
  1332. NTP-corrected) when the first valid timestamp of the reporting cycle
  1333. was seen.</para>
  1334. <para>The message contains two second/nanosecond pairs: real_sec and
  1335. real_nsec contain the time the GPS thinks it was at the start of the
  1336. current cycle; clock_sec and clock_nsec contain the time the system
  1337. clock thinks it was on receipt of the first timing message of the cycle.
  1338. real_nsec is always to nanosecond precision. clock_nsec is nanosecond
  1339. precision on most systems.</para>
  1340. <para>Here's an example:</para>
  1341. <programlisting>
  1342. {"class":"TOFF","device":"/dev/ttyUSB0",
  1343. "real_sec":1330212592, "real_nsec":343182,
  1344. "clock_sec":1330212592,"clock_nsec":343184,
  1345. "precision":-2}}
  1346. </programlisting>
  1347. </listitem>
  1348. </varlistentry>
  1349. <varlistentry>
  1350. <term>PPS</term>
  1351. <listitem>
  1352. <para>This message is emitted each time the daemon sees a valid PPS (Pulse
  1353. Per Second) strobe from a device.</para>
  1354. <para>This message exactly mirrors the TOFF message except for two
  1355. details.</para>
  1356. <para>PPS emits the NTP precision. See the NTP documentation for their
  1357. definition of precision.</para>
  1358. <para>The TOFF message reports the GPS time as derived from the GPS
  1359. serial data stream. The PPS message reports the GPS time as derived
  1360. from the GPS PPS pulse.</para>
  1361. <para>There are various sources of error in the reported clock times.
  1362. The speed of the serial connection between the GPS and the system adds
  1363. a delay to start of cycle detection. An even bigger error is added
  1364. by the variable computation time inside the GPS. Taken together the
  1365. time derived from the start of the GPS cycle can have offsets of
  1366. 10 millisecond to 700 milliseconds and combined jjitter and wander of
  1367. 100 to 300 millisecond.</para>
  1368. <para>A PPS object has the following elements:</para>
  1369. <table frame="all" pgwide="0"><title>PPS object</title>
  1370. <tgroup cols="4" align="left" colsep="1" rowsep="1">
  1371. <thead>
  1372. <row>
  1373. <entry>Name</entry>
  1374. <entry>Always?</entry>
  1375. <entry>Type</entry>
  1376. <entry>Description</entry>
  1377. </row>
  1378. </thead>
  1379. <tbody>
  1380. <row>
  1381. <entry>class</entry>
  1382. <entry>Yes</entry>
  1383. <entry>string</entry>
  1384. <entry>Fixed: "PPS"</entry>
  1385. </row>
  1386. <row>
  1387. <entry>device</entry>
  1388. <entry>Yes</entry>
  1389. <entry>string</entry>
  1390. <entry>Name of originating device</entry>
  1391. </row>
  1392. <row>
  1393. <entry>real_sec</entry>
  1394. <entry>Yes</entry>
  1395. <entry>numeric</entry>
  1396. <entry>seconds from the PPS source</entry>
  1397. </row>
  1398. <row>
  1399. <entry>real_nsec</entry>
  1400. <entry>Yes</entry>
  1401. <entry>numeric</entry>
  1402. <entry>nanoseconds from the PPS source</entry>
  1403. </row>
  1404. <row>
  1405. <entry>clock_sec</entry>
  1406. <entry>Yes</entry>
  1407. <entry>numeric</entry>
  1408. <entry>seconds from the system clock</entry>
  1409. </row>
  1410. <row>
  1411. <entry>clock_nsec</entry>
  1412. <entry>Yes</entry>
  1413. <entry>numeric</entry>
  1414. <entry>nanoseconds from the system clock</entry>
  1415. </row>
  1416. <row>
  1417. <entry>precision</entry>
  1418. <entry>Yes</entry>
  1419. <entry>numeric</entry>
  1420. <entry>NTP style estimate of PPS precision</entry>
  1421. </row>
  1422. <row>
  1423. <entry>qErr</entry>
  1424. <entry>No</entry>
  1425. <entry>numeric</entry>
  1426. <entry>Quantization error of the PPS, in pico seconds. Sometimes
  1427. called the "sawtooth" error.</entry>
  1428. </row>
  1429. </tbody>
  1430. </tgroup>
  1431. </table>
  1432. <para>This message is emitted once per second to watchers of a device
  1433. emitting PPS, and reports the time of the start of the GPS second (when
  1434. the 1PPS arrives) and seconds as reported by the system clock (which
  1435. may be NTP-corrected) at that moment.</para>
  1436. <para>The message contains two second/nanosecond pairs: real_sec and
  1437. real_nsec contain the time the GPS thinks it was at the PPS edge;
  1438. clock_sec and clock_nsec contain the time the system clock thinks it was
  1439. at the PPS edge. real_nsec is always to nanosecond precision. clock_nsec
  1440. is nanosecond precision on most systems.</para>
  1441. <para>There are various sources of error in the reported clock times.
  1442. For PPS delivered via a real serial-line strobe, serial-interrupt
  1443. latency plus processing time to the timer call should be bounded above
  1444. by about 10 microseconds; that can be reduced to less than 1 microsecond if
  1445. your kernel supports RFC 2783. USB1.1-to-serial control-line emulation is
  1446. limited to about 1 millisecond. seconds.</para>
  1447. <para>Here's an example:</para>
  1448. <programlisting>
  1449. {"class":"PPS","device":"/dev/ttyUSB0",
  1450. "real_sec":1330212592, "real_nsec":343182,
  1451. "clock_sec":1330212592,"clock_nsec":343184,
  1452. "precision":-3}
  1453. </programlisting>
  1454. </listitem>
  1455. </varlistentry>
  1456. <varlistentry>
  1457. <term>OSC</term>
  1458. <listitem>
  1459. <para>This message reports the status of a GPS-disciplined oscillator
  1460. (GPSDO). The GPS PPS output (which has excellent long-term stability)
  1461. is typically used to discipline a local oscillator with much better
  1462. short-term stability (such as a rubidium atomic clock).</para>
  1463. <para>An OSC object has the following elements:</para>
  1464. <table frame="all" pgwide="0"><title>OSC object</title>
  1465. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  1466. <thead>
  1467. <row>
  1468. <entry>Name</entry>
  1469. <entry>Always?</entry>
  1470. <entry>Type</entry>
  1471. <entry>Description</entry>
  1472. </row>
  1473. </thead>
  1474. <tbody>
  1475. <row>
  1476. <entry>class</entry>
  1477. <entry>Yes</entry>
  1478. <entry>string</entry>
  1479. <entry>Fixed: "OSC"</entry>
  1480. </row>
  1481. <row>
  1482. <entry>device</entry>
  1483. <entry>Yes</entry>
  1484. <entry>string</entry>
  1485. <entry>Name of originating device.</entry>
  1486. </row>
  1487. <row>
  1488. <entry>running</entry>
  1489. <entry>Yes</entry>
  1490. <entry>boolean</entry>
  1491. <entry>If true, the oscillator is currently running. Oscillators may require warm-up time at start of day.</entry>
  1492. </row>
  1493. <row>
  1494. <entry>reference</entry>
  1495. <entry>Yes</entry>
  1496. <entry>boolean</entry>
  1497. <entry>If true, the oscillator is receiving a GPS PPS signal.</entry>
  1498. </row>
  1499. <row>
  1500. <entry>disciplined</entry>
  1501. <entry>Yes</entry>
  1502. <entry>boolean</entry>
  1503. <entry>If true, the GPS PPS signal is sufficiently stable and is being used to discipline the local oscillator.</entry>
  1504. </row>
  1505. <row>
  1506. <entry>delta</entry>
  1507. <entry>Yes</entry>
  1508. <entry>numeric</entry>
  1509. <entry>The time difference (in nanoseconds) between the GPS-disciplined oscillator PPS output pulse and the most recent GPS PPS input pulse.</entry>
  1510. </row>
  1511. </tbody>
  1512. </tgroup>
  1513. </table>
  1514. <para>Here's an example:</para>
  1515. <programlisting>
  1516. {"class":"OSC","running":true,"device":"/dev/ttyUSB0",
  1517. "reference":true,"disciplined":true,"delta":67}
  1518. </programlisting>
  1519. </listitem>
  1520. </varlistentry>
  1521. <varlistentry>
  1522. <term>?DEVICE</term>
  1523. <listitem>
  1524. <para>This command reports (when followed by ';') the state of a
  1525. device, or sets (when followed by '=' and a DEVICE object)
  1526. device-specific control bits, notably the device's speed and serial
  1527. mode and the native-mode bit. The parameter-setting form will be rejected if
  1528. more than one client is attached to the channel.</para>
  1529. <para>Pay attention to the response, because it is
  1530. possible for this command to fail if the GPS does not support a
  1531. speed-switching command or only supports some combinations of
  1532. serial modes. In case of failure, the daemon and GPS will
  1533. continue to communicate at the old speed.</para>
  1534. <para>Use the parameter-setting form with caution. On USB and
  1535. Bluetooth GPSes it is also possible for serial mode setting to fail
  1536. either because the serial adaptor chip does not support non-8N1 modes
  1537. or because the device firmware does not properly synchronize the
  1538. serial adaptor chip with the UART on the GPS chipset when the speed
  1539. changes. These failures can hang your device, possibly requiring a GPS
  1540. power cycle or (in extreme cases) physically disconnecting the NVRAM
  1541. backup battery.</para>
  1542. <para>A DEVICE object has the following elements:</para>
  1543. <table frame="all" pgwide="0"><title>DEVICE object</title>
  1544. <tgroup cols="4" align="left" colsep="1" rowsep="1">
  1545. <thead>
  1546. <row>
  1547. <entry>Name</entry>
  1548. <entry>Always?</entry>
  1549. <entry>Type</entry>
  1550. <entry>Description</entry>
  1551. </row>
  1552. </thead>
  1553. <tbody>
  1554. <row>
  1555. <entry>class</entry>
  1556. <entry>Yes</entry>
  1557. <entry>string</entry>
  1558. <entry>Fixed: "DEVICE"</entry>
  1559. </row>
  1560. <row>
  1561. <entry>path</entry>
  1562. <entry>No</entry>
  1563. <entry>string</entry>
  1564. <entry>Name the device for which the control bits are
  1565. being reported, or for which they are to be applied. This
  1566. attribute may be omitted only when there is exactly one
  1567. subscribed channel.</entry>
  1568. </row>
  1569. <row>
  1570. <entry>activated</entry>
  1571. <entry>No</entry>
  1572. <entry>string</entry>
  1573. <entry>Time the device was activated as an ISO8601
  1574. timestamp. If the device is inactive this attribute is
  1575. absent.</entry>
  1576. </row>
  1577. <row>
  1578. <entry>flags</entry>
  1579. <entry>No</entry>
  1580. <entry>integer</entry>
  1581. <entry>Bit vector of property flags. Currently defined flags are:
  1582. describe packet types seen so far (GPS, RTCM2, RTCM3,
  1583. AIS). Won't be reported if empty, e.g. before
  1584. <application>gpsd</application> has seen identifiable packets
  1585. from the device.</entry>
  1586. </row>
  1587. <row>
  1588. <entry>driver</entry>
  1589. <entry>No</entry>
  1590. <entry>string</entry>
  1591. <entry>GPSD's name for the device driver type. Won't be reported before
  1592. <application>gpsd</application> has seen identifiable packets
  1593. from the device.</entry>
  1594. </row>
  1595. <row>
  1596. <entry>subtype</entry>
  1597. <entry>No</entry>
  1598. <entry>string</entry>
  1599. <entry>Whatever version information the device driver returned.</entry>
  1600. </row>
  1601. <row>
  1602. <entry>subtype1</entry>
  1603. <entry>No</entry>
  1604. <entry>string</entry>
  1605. <entry>More version information the device driver returned.</entry>
  1606. </row>
  1607. <row>
  1608. <entry>bps</entry>
  1609. <entry>No</entry>
  1610. <entry>integer</entry>
  1611. <entry>Device speed in bits per second.</entry>
  1612. </row>
  1613. <row>
  1614. <entry>parity</entry>
  1615. <entry>No</entry>
  1616. <entry>string</entry>
  1617. <entry><para>N, O or E for no parity, odd, or even.</para></entry>
  1618. </row>
  1619. <row>
  1620. <entry>stopbits</entry>
  1621. <entry>Yes</entry>
  1622. <entry>string</entry>
  1623. <entry><para>Stop bits (1 or 2).</para></entry>
  1624. </row>
  1625. <row>
  1626. <entry>native</entry>
  1627. <entry>No</entry>
  1628. <entry>integer</entry>
  1629. <entry>0 means NMEA mode and 1 means
  1630. alternate mode (binary if it has one, for SiRF and Evermore chipsets
  1631. in particular). Attempting to set this mode on a non-GPS
  1632. device will yield an error.</entry>
  1633. </row>
  1634. <row>
  1635. <entry>cycle</entry>
  1636. <entry>No</entry>
  1637. <entry>real</entry>
  1638. <entry>Device cycle time in seconds.</entry>
  1639. </row>
  1640. <row>
  1641. <entry>mincycle</entry>
  1642. <entry>No</entry>
  1643. <entry>real</entry>
  1644. <entry>Device minimum cycle time in seconds. Reported from
  1645. ?DEVICE when (and only when) the rate is switchable. It is
  1646. read-only and not settable.</entry>
  1647. </row>
  1648. </tbody>
  1649. </tgroup>
  1650. </table>
  1651. <para>The serial parameters will (bps, parity, stopbits) be omitted in
  1652. a response describing a TCP/IP source such as an Ntrip, DGPSIP, or AIS
  1653. feed; on a serial device they will always be present.</para>
  1654. <para>The contents of the flags field should be interpreted as follows:</para>
  1655. <table frame="all" pgwide="0"><title>Device flags</title>
  1656. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  1657. <thead>
  1658. <row>
  1659. <entry>C #define</entry>
  1660. <entry>Value</entry>
  1661. <entry>Description</entry>
  1662. </row>
  1663. </thead>
  1664. <tbody>
  1665. <row>
  1666. <entry>SEEN_GPS</entry>
  1667. <entry>0x01</entry>
  1668. <entry>GPS data has been seen on this device</entry>
  1669. </row>
  1670. <row>
  1671. <entry>SEEN_RTCM2</entry>
  1672. <entry>0x02</entry>
  1673. <entry>RTCM2 data has been seen on this device</entry>
  1674. </row>
  1675. <row>
  1676. <entry>SEEN_RTCM3</entry>
  1677. <entry>0x04</entry>
  1678. <entry>RTCM3 data has been seen on this device</entry>
  1679. </row>
  1680. <row>
  1681. <entry>SEEN_AIS</entry>
  1682. <entry>0x08</entry>
  1683. <entry>AIS data has been seen on this device</entry>
  1684. </row>
  1685. </tbody>
  1686. </tgroup>
  1687. </table>
  1688. <!--
  1689. <para>The mincycle member may be 0, indicating no hard lower limit on the
  1690. cycle time. On an NMEA device of this kind it is possible to try to
  1691. push more characters through per cycle than the time to transmit will
  1692. allow. You must set the time high enough to let all sentences come
  1693. through. Here are the maxima to use for computation:</para>
  1694. <table frame='all'>
  1695. <tgroup cols='2'>
  1696. <tbody>
  1697. <row><entry>ZDA </entry><entry>36</entry></row>
  1698. <row><entry>GLL </entry><entry>47</entry></row>
  1699. <row><entry>GGA </entry><entry>82</entry></row>
  1700. <row><entry>VTG </entry><entry>46</entry></row>
  1701. <row><entry>RMC </entry><entry>77</entry></row>
  1702. <row><entry>GSA </entry><entry>67</entry></row>
  1703. <row><entry>GSV </entry><entry>60 (per line, thus 180 for a set of 3)</entry> </row>
  1704. </tbody>
  1705. </tgroup>
  1706. </table>
  1707. <para>The transmit time for a cycle (which must be less than 1 second)
  1708. is the total character count multiplied by 10 and divided by the baud
  1709. rate. A typical budget is GGA, RMC, GSA, 3*GSV = 82+75+67+(3*60) =
  1710. 404.</para>
  1711. -->
  1712. <para>When the C client library parses a response of this kind, it
  1713. will assert the DEVICE_SET bit in the top-level set member.</para>
  1714. <para>Here's an example:</para>
  1715. <programlisting>
  1716. {"class":"DEVICE","bps":4800,"parity":"N","stopbits":1,"native":0}
  1717. </programlisting>
  1718. </listitem>
  1719. </varlistentry>
  1720. </variablelist>
  1721. <para>When a client is in watcher mode, the daemon will ship it DEVICE
  1722. notifications when a device is added to the pool or
  1723. deactivated.</para>
  1724. <para>When the C client library parses a response of this kind, it
  1725. will assert the DEVICE_SET bit in the top-level set member.</para>
  1726. <para>Here's an example:</para>
  1727. <programlisting>
  1728. {"class":"DEVICE","path":"/dev/pts1","activated":0}
  1729. </programlisting>
  1730. <para>The daemon may ship an error object in response to a
  1731. syntactically invalid command line or unknown command. It has
  1732. the following elements:</para>
  1733. <table frame="all" pgwide="0"><title>ERROR notification object</title>
  1734. <tgroup cols="4" align="left" colsep="1" rowsep="1">
  1735. <thead>
  1736. <row>
  1737. <entry>Name</entry>
  1738. <entry>Always?</entry>
  1739. <entry>Type</entry>
  1740. <entry>Description</entry>
  1741. </row>
  1742. </thead>
  1743. <tbody>
  1744. <row>
  1745. <entry>class</entry>
  1746. <entry>Yes</entry>
  1747. <entry>string</entry>
  1748. <entry>Fixed: "ERROR"</entry>
  1749. </row>
  1750. <row>
  1751. <entry>message</entry>
  1752. <entry>Yes</entry>
  1753. <entry>string</entry>
  1754. <entry>Textual error message</entry>
  1755. </row>
  1756. </tbody>
  1757. </tgroup>
  1758. </table>
  1759. <para>Here's an example:</para>
  1760. <programlisting>
  1761. {"class":"ERROR","message":"Unrecognized request '?FOO'"}
  1762. </programlisting>
  1763. <para>When the C client library parses a response of this kind, it
  1764. will assert the ERR_SET bit in the top-level set member.</para>
  1765. </refsect1>
  1766. <refsect1 id='rtcm2'><title>RTCM2</title>
  1767. <para>RTCM-104 is a family of serial protocols used for broadcasting pseudorange
  1768. corrections from differential-GPS reference stations. Many GPS receivers can
  1769. accept these corrections to improve their reporting accuracy.</para>
  1770. <para>RTCM-104 comes in two major and incompatible flavors, 2.x and
  1771. 3.x. Each major flavor has minor (compatible) revisions.</para>
  1772. <para>The applicable standard for RTCM Version 2.x is <citetitle>RTCM
  1773. Recommended Standards for Differential NAVSTAR GPS Service</citetitle>
  1774. RTCM Paper 194-93/SC 104-STD. For RTCM 3.1 it is <citetitle>RTCM Paper
  1775. 177-2006-SC104-STD</citetitle>. Ordering instructions for both
  1776. standards are accessible from the website of the <ulink
  1777. url='http://www.rtcm.org/'>Radio Technical Commission for Maritime
  1778. Services</ulink> under "Publications".</para>
  1779. <refsect2 id='wire-format'><title>RTCM WIRE TRANSMISSIONS</title>
  1780. <para>Differential-GPS correction stations consist of a GPS reference
  1781. receiver coupled to a low frequency (LF) transmitter. The GPS
  1782. reference receiver is a survey-grade GPS that does GPS carrier
  1783. tracking and can work out its own position to a few millimeters. It
  1784. generates range and range-rate corrections and encodes them into
  1785. RTCM104. It ships the RTCM104 to the LF transmitter over serial rs-232
  1786. signal at 100 baud or 200 baud depending on the requirements of the
  1787. transmitter.</para>
  1788. <para>The LF transmitter broadcasts the approximately 300khz radio
  1789. signal that differential-GPS radio receivers pick up. Transmitters
  1790. that are meant to have a higher range will need to transmit at the
  1791. slower rate. The higher the data rate the harder it will be for the
  1792. remote radio receiver to receive with a good signal-to-noise ration.
  1793. (Higher data rate signals can't be averaged over as long a time frame,
  1794. hence they appear noisier.)</para>
  1795. </refsect2>
  1796. <refsect2 id='rtcm-wire-format'><title>RTCM WIRE FORMATS</title>
  1797. <para>An RTCM 2.x message consists of a sequence of up to 33 30-bit
  1798. words. The 24 most significant bits of each word are data and the six
  1799. least significant bits are parity. The parity algorithm used is the
  1800. same ISGPS-2000 as that used on GPS satellite downlinks. Each RTCM
  1801. 2.x message consists of two header words followed by zero or more data
  1802. words, depending upon message type.</para>
  1803. <para>An RTCM 3.x message begins with a fixed leader byte 0xD3. That
  1804. is followed by six bits of version information and 10 bits of payload
  1805. length information. Following that is the payload; following the
  1806. payload is a 3-byte checksum of the payload using the Qualcomm CRC-24Q
  1807. algorithm.</para>
  1808. </refsect2>
  1809. <refsect2 id='rtcm2-dump-format2'><title>RTCM2 JSON FORMAT</title>
  1810. <para>Each RTCM2 message is dumped as a single JSON object per
  1811. message, with the message fields as attributes of that object. Arrays
  1812. of satellite, station, and constellation statistics become arrays of
  1813. JSON sub-objects. Each sentence will normally also have a "device"
  1814. field containing the pathname of the originating device.</para>
  1815. <para>All attributes other than the device field are mandatory. Header
  1816. attributes are emitted before others.</para>
  1817. <refsect3><title>Header portion</title>
  1818. <table frame="all" pgwide="0"><title>SKY object</title>
  1819. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  1820. <thead>
  1821. <row>
  1822. <entry>Name</entry>
  1823. <entry>Type</entry>
  1824. <entry><para>Description</para></entry>
  1825. </row>
  1826. </thead>
  1827. <tbody>
  1828. <row>
  1829. <entry>class</entry>
  1830. <entry>string</entry>
  1831. <entry><para>Fixed: "RTCM2".</para></entry>
  1832. </row>
  1833. <row>
  1834. <entry>type</entry>
  1835. <entry>integer</entry>
  1836. <entry><para>Message type (1-9).</para></entry>
  1837. </row>
  1838. <row>
  1839. <entry>station_id</entry>
  1840. <entry>integer</entry>
  1841. <entry><para>The id of the GPS reference receiver. The
  1842. LF transmitters also have (different) id numbers.</para></entry>
  1843. </row>
  1844. <row>
  1845. <entry>zcount</entry>
  1846. <entry>real</entry>
  1847. <entry><para>The reference time of the
  1848. corrections in the message in seconds within the current hour. Note
  1849. that it is in GPS time, which is some seconds ahead of UTC (see the
  1850. U.S. Naval Observatory's <ulink
  1851. url="ftp://maia.usno.navy.mil/ser7/tai-utc.dat">table of leap second
  1852. corrections</ulink>).</para></entry>
  1853. </row>
  1854. <row>
  1855. <entry>seqnum</entry>
  1856. <entry>integer</entry>
  1857. <entry><para>Sequence number. Only 3 bits wide, wraps after 7.</para></entry>
  1858. </row>
  1859. <row>
  1860. <entry>length</entry>
  1861. <entry>integer</entry>
  1862. <entry><para>The number of words after the header that comprise the
  1863. message.</para></entry>
  1864. </row>
  1865. <row>
  1866. <entry>station_health</entry>
  1867. <entry>integer</entry>
  1868. <entry><para>Station transmission status. Indicates the health of
  1869. the beacon as a reference source. Any nonzero value means the
  1870. satellite is probably transmitting bad data and should not be
  1871. used in a fix. 6 means the transmission is unmonitored. 7
  1872. means the station is not working properly. Other values are
  1873. defined by the beacon operator.</para></entry>
  1874. </row>
  1875. </tbody>
  1876. </tgroup>
  1877. </table>
  1878. <para>&lt;message type&gt; is one of</para>
  1879. <variablelist>
  1880. <varlistentry>
  1881. <term>1</term>
  1882. <listitem><para>full corrections - one message containing corrections for
  1883. all GPS satellites in view. This is not common.</para></listitem>
  1884. </varlistentry>
  1885. <varlistentry>
  1886. <term>3</term>
  1887. <listitem><para>reference station parameters - the position of the
  1888. reference station GPS antenna.</para></listitem>
  1889. </varlistentry>
  1890. <varlistentry>
  1891. <term>4</term>
  1892. <listitem><para>datum &mdash; the datum to which the DGPS data is
  1893. referred.</para></listitem>
  1894. </varlistentry>
  1895. <varlistentry>
  1896. <term>5</term>
  1897. <listitem><para>constellation health &mdash; information about the
  1898. satellites the beacon can see.</para></listitem>
  1899. </varlistentry>
  1900. <varlistentry>
  1901. <term>6</term>
  1902. <listitem><para>null message &mdash; just a filler.</para></listitem>
  1903. </varlistentry>
  1904. <varlistentry>
  1905. <term>7</term>
  1906. <listitem><para>radio beacon almanac &mdash; information about this or other beacons.</para></listitem>
  1907. </varlistentry>
  1908. <varlistentry>
  1909. <term>9</term>
  1910. <listitem><para>subset corrections &mdash; a message containing corrections
  1911. for only a subset of the GPS satellites in view.</para></listitem>
  1912. </varlistentry>
  1913. <varlistentry>
  1914. <term>16</term>
  1915. <listitem><para>special message &mdash; a text message from the beacon
  1916. operator.</para></listitem>
  1917. </varlistentry>
  1918. <varlistentry>
  1919. <term>31</term>
  1920. <listitem><para>GLONASS subset corrections &mdash; a message
  1921. containing corrections for a set of the GLONASS satellites in
  1922. view.</para></listitem>
  1923. </varlistentry>
  1924. </variablelist>
  1925. </refsect3>
  1926. <refsect3><title>Type 1 and 9: Correction data</title>
  1927. <para>One or more satellite objects follow the header for type 1 or type 9
  1928. messages. Here is the format:</para>
  1929. <table frame="all" pgwide="0"><title>Satellite object</title>
  1930. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  1931. <thead>
  1932. <row>
  1933. <entry>Name</entry>
  1934. <entry>Type</entry>
  1935. <entry><para>Description</para></entry>
  1936. </row>
  1937. </thead>
  1938. <tbody>
  1939. <row>
  1940. <entry>ident</entry>
  1941. <entry>integer</entry>
  1942. <entry><para>The PRN number of the satellite for which this is
  1943. correction data.</para></entry>
  1944. </row>
  1945. <row>
  1946. <entry>udre</entry>
  1947. <entry>integer</entry>
  1948. <entry><para>User Differential Range Error (0-3). See the
  1949. table following for values.</para></entry>
  1950. </row>
  1951. <row>
  1952. <entry>iod</entry>
  1953. <entry>integer</entry>
  1954. <entry><para>Issue Of Data, matching the IOD for the current
  1955. ephemeris of this satellite, as transmitted by the satellite.
  1956. The IOD is a unique tag that identifies the ephemeris; the GPS
  1957. using the DGPS correction and the DGPS generating the data
  1958. must use the same orbital positions for the
  1959. satellite.</para></entry>
  1960. </row>
  1961. <row>
  1962. <entry>prc</entry>
  1963. <entry>real</entry>
  1964. <entry><para>The pseudorange error in meters for this
  1965. satellite as measured by the beacon reference receiver at the
  1966. epoch indicated by the z_count in the parent
  1967. record.</para></entry>
  1968. </row>
  1969. <row>
  1970. <entry>rrc</entry>
  1971. <entry>real</entry>
  1972. <entry><para>The rate of change of pseudorange error in
  1973. meters/sec for this satellite as measured by the beacon
  1974. reference receiver at the epoch indicated by the z_count field
  1975. in the parent record. This is used to calculate pseudorange
  1976. errors at other epochs, if required by the GPS
  1977. receiver.</para></entry>
  1978. </row>
  1979. </tbody>
  1980. </tgroup>
  1981. </table>
  1982. <para>User Differential Range Error values are as follows:</para>
  1983. <table frame="all" pgwide="0"><title>UDRE values</title>
  1984. <tgroup cols="2" align="left" colsep="1" rowsep="1">
  1985. <tbody>
  1986. <row><entry>0</entry><entry>1-sigma error &lt;= 1m</entry></row>
  1987. <row><entry>1</entry><entry>1-sigma error &lt;= 4m</entry></row>
  1988. <row><entry>2</entry><entry>1-sigma error &lt;= 8m</entry></row>
  1989. <row><entry>3</entry><entry>1-sigma error &gt; 8m</entry></row>
  1990. </tbody>
  1991. </tgroup>
  1992. </table>
  1993. <para>Here's an example:</para>
  1994. <programlisting>
  1995. {"class":"RTCM2","type":1,
  1996. "station_id":688,"zcount":843.0,"seqnum":5,"length":19,"station_health":6,
  1997. "satellites":[
  1998. {"ident":10,"udre":0,"iod":46,"prc":-2.400,"rrc":0.000},
  1999. {"ident":13,"udre":0,"iod":94,"prc":-4.420,"rrc":0.000},
  2000. {"ident":7,"udre":0,"iod":22,"prc":-5.160,"rrc":0.002},
  2001. {"ident":2,"udre":0,"iod":34,"prc":-6.480,"rrc":0.000},
  2002. {"ident":4,"udre":0,"iod":47,"prc":-8.860,"rrc":0.000},
  2003. {"ident":8,"udre":0,"iod":76,"prc":-7.980,"rrc":0.002},
  2004. {"ident":5,"udre":0,"iod":99,"prc":-8.260,"rrc":0.002},
  2005. {"ident":23,"udre":0,"iod":81,"prc":-8.060,"rrc":0.000},
  2006. {"ident":16,"udre":0,"iod":70,"prc":-11.740,"rrc":0.000},
  2007. {"ident":30,"udre":0,"iod":4,"prc":-18.960,"rrc":-0.006},
  2008. {"ident":29,"udre":0,"iod":101,"prc":-24.960,"rrc":-0.002}
  2009. ]}
  2010. </programlisting>
  2011. </refsect3>
  2012. <refsect3><title>Type 3: Reference Station Parameters</title>
  2013. <para>Here are the payload members of a type 3 (Reference Station
  2014. Parameters) message:</para>
  2015. <table frame="all" pgwide="0"><title>Reference Station Parameters</title>
  2016. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2017. <thead>
  2018. <row>
  2019. <entry>Name</entry>
  2020. <entry>Type</entry>
  2021. <entry><para>Description</para></entry>
  2022. </row>
  2023. </thead>
  2024. <tbody>
  2025. <row>
  2026. <entry>x</entry>
  2027. <entry>real</entry>
  2028. <entry><para>ECEF X coordinate.</para></entry>
  2029. </row>
  2030. <row>
  2031. <entry>y</entry>
  2032. <entry>real</entry>
  2033. <entry><para>ECEF Y coordinate.</para></entry>
  2034. </row>
  2035. <row>
  2036. <entry>z</entry>
  2037. <entry>real</entry>
  2038. <entry><para>ECEF Z coordinate.</para></entry>
  2039. </row>
  2040. </tbody>
  2041. </tgroup>
  2042. </table>
  2043. <para>The coordinates are the position of the station, in meters to two
  2044. decimal places, in Earth Centred Earth Fixed coordinates.
  2045. These are usually referred to the WGS84 reference frame, but may
  2046. be referred to NAD83 in the US (essentially identical to WGS84 for
  2047. all except geodesists), or to some other reference frame in other
  2048. parts of the world.</para>
  2049. <para>An invalid reference message is represented by a type 3 header
  2050. without payload fields.</para>
  2051. <para>Here's an example:</para>
  2052. <programlisting>
  2053. {"class":"RTCM2","type":3,
  2054. "station_id":652,"zcount":1657.2,"seqnum":2,"length":4,"station_health":6,
  2055. "x":3878620.92,"y":670281.40,"z":5002093.59
  2056. }
  2057. </programlisting>
  2058. </refsect3>
  2059. <refsect3><title>Type 4: Datum</title>
  2060. <para>Here are the payload members of a type 4 (Datum) message:</para>
  2061. <table frame="all" pgwide="0"><title>Datum</title>
  2062. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2063. <thead>
  2064. <row>
  2065. <entry>Name</entry>
  2066. <entry>Type</entry>
  2067. <entry><para>Description</para></entry>
  2068. </row>
  2069. </thead>
  2070. <tbody>
  2071. <row>
  2072. <entry>dgnss_type</entry>
  2073. <entry>string</entry>
  2074. <entry><para>Either "GPS", "GLONASS", "GALILEO", or
  2075. "UNKNOWN".</para></entry>
  2076. </row>
  2077. <row>
  2078. <entry>dat</entry>
  2079. <entry>integer</entry>
  2080. <entry><para>0 or 1 and indicates the sense of the offset
  2081. shift given by dx, dy, dz. dat = 0 means that the station
  2082. coordinates (in the reference message) are referred to a local
  2083. datum and that adding dx, dy, dz to that position will render
  2084. it in GNSS coordinates (WGS84 for GPS). If dat = 1 then the
  2085. ref station position is in GNSS coordinates and adding dx, dy,
  2086. dz will give it referred to the local datum.</para></entry>
  2087. </row>
  2088. <row>
  2089. <entry>datum_name</entry>
  2090. <entry>string</entry>
  2091. <entry><para>A standard name for the datum.</para></entry>
  2092. </row>
  2093. <row>
  2094. <entry>dx</entry>
  2095. <entry>real</entry>
  2096. <entry><para>X offset.</para></entry>
  2097. </row>
  2098. <row>
  2099. <entry>dy</entry>
  2100. <entry>real</entry>
  2101. <entry><para>Y offset.</para></entry>
  2102. </row>
  2103. <row>
  2104. <entry>dz</entry>
  2105. <entry>real</entry>
  2106. <entry><para>Z offset.</para></entry>
  2107. </row>
  2108. </tbody>
  2109. </tgroup>
  2110. </table>
  2111. <para>&lt;dx&gt; &lt;dy&gt; &lt;dz&gt; are offsets to convert from
  2112. local datum to GNSS datum or vice versa. These fields are
  2113. optional.</para>
  2114. <para>An invalid datum message is represented by a type 4 header
  2115. without payload fields.</para>
  2116. </refsect3>
  2117. <refsect3><title>Type 5: Constellation Health</title>
  2118. <para>One or more of these follow the header for type 5 messages &mdash; one
  2119. for each satellite.</para>
  2120. <para>Here is the format:</para>
  2121. <table frame="all" pgwide="0"><title>Constellation health</title>
  2122. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2123. <thead>
  2124. <row>
  2125. <entry>Name</entry>
  2126. <entry>Type</entry>
  2127. <entry><para>Description</para></entry>
  2128. </row>
  2129. </thead>
  2130. <tbody>
  2131. <row>
  2132. <entry>ident</entry>
  2133. <entry>integer</entry>
  2134. <entry><para>The PRN number of the satellite.</para></entry>
  2135. </row>
  2136. <row>
  2137. <entry>iodl</entry>
  2138. <entry>bool</entry>
  2139. <entry><para>True indicates that this information relates to
  2140. the satellite information in an accompanying type 1 or type 9
  2141. message.</para></entry>
  2142. </row>
  2143. <row>
  2144. <entry>health</entry>
  2145. <entry>integer</entry>
  2146. <entry>0 indicates that the satellite is healthy. Any other value
  2147. indicates a problem (coding is not known).<para></para></entry>
  2148. </row>
  2149. <row>
  2150. <entry>snr</entry>
  2151. <entry>integer</entry>
  2152. <entry><para>The carrier/noise ratio of the received signal in
  2153. the range 25 to 55 dB(Hz).</para></entry>
  2154. </row>
  2155. <row>
  2156. <entry>health_en</entry>
  2157. <entry>bool</entry>
  2158. <entry><para>If set to True it indicates that the satellite is
  2159. healthy even if the satellite navigation data says it is
  2160. unhealthy.</para></entry>
  2161. </row>
  2162. <row>
  2163. <entry>new_data</entry>
  2164. <entry>bool</entry>
  2165. <entry>True indicates that the IOD for this satellite will
  2166. soon be updated in type 1 or 9 messages.<para></para></entry>
  2167. </row>
  2168. <row>
  2169. <entry>los_warning</entry>
  2170. <entry>bool</entry>
  2171. <entry><para>Line-of-sight warning. True indicates that the
  2172. satellite will shortly go unhealthy.</para></entry>
  2173. </row>
  2174. <row>
  2175. <entry>tou</entry>
  2176. <entry>integer</entry>
  2177. <entry><para>Healthy time remaining in seconds.</para></entry>
  2178. </row>
  2179. </tbody>
  2180. </tgroup>
  2181. </table>
  2182. </refsect3>
  2183. <refsect3><title>Type 6: Null</title>
  2184. <para>This just indicates a null message. There are no payload fields.</para>
  2185. </refsect3>
  2186. <refsect3><title>Unknown message</title>
  2187. <para>This format is used to dump message words in hexadecimal when the
  2188. message type field doesn't match any of the known ones.</para>
  2189. <para>Here is the format:</para>
  2190. <table frame="all" pgwide="0"><title>Unknown Message</title>
  2191. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2192. <thead>
  2193. <row>
  2194. <entry>Name</entry>
  2195. <entry>Type</entry>
  2196. <entry><para>Description</para></entry>
  2197. </row>
  2198. </thead>
  2199. <tbody>
  2200. <row>
  2201. <entry>data</entry>
  2202. <entry>list</entry>
  2203. <entry><para>A list of strings.</para></entry>
  2204. </row>
  2205. </tbody>
  2206. </tgroup>
  2207. </table>
  2208. <para>Each string in the array is a hex literal representing 30 bits
  2209. of information, after parity checks and inversion. The high two bits
  2210. should be ignored.</para>
  2211. </refsect3>
  2212. <refsect3><title>Type 7: Radio Beacon Almanac</title>
  2213. <para>Here is the format:</para>
  2214. <table frame="all" pgwide="0"><title>Contellation health</title>
  2215. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2216. <thead>
  2217. <row>
  2218. <entry>Name</entry>
  2219. <entry>Type</entry>
  2220. <entry><para>Description</para></entry>
  2221. </row>
  2222. </thead>
  2223. <tbody>
  2224. <row>
  2225. <entry>lat</entry>
  2226. <entry>real</entry>
  2227. <entry><para>Latitude in degrees, of the LF transmitter
  2228. antenna for the station for which this is an almanac. North
  2229. is positive.</para></entry>
  2230. </row>
  2231. <row>
  2232. <entry>lon</entry>
  2233. <entry>real</entry>
  2234. <entry><para>Longitude in degrees, of the LF transmitter
  2235. antenna for the station for which this is an almanac.
  2236. East is positive.</para></entry>
  2237. </row>
  2238. <row>
  2239. <entry>range</entry>
  2240. <entry>integer</entry>
  2241. <entry>Published range of the station in km.<para></para></entry>
  2242. </row>
  2243. <row>
  2244. <entry>frequency</entry>
  2245. <entry>real</entry>
  2246. <entry><para>Station broadcast frequency in kHz.</para></entry>
  2247. </row>
  2248. <row>
  2249. <entry>health</entry>
  2250. <entry>integer</entry>
  2251. <entry><para>&lt;health&gt; is the health of the station for
  2252. which this is an almanac. If it is non-zero, the station is
  2253. issuing suspect data and should not be used for fixes. The
  2254. ITU and RTCM104 standards differ about the mode detailed
  2255. interpretation of the &lt;health&gt; field and even about its
  2256. bit width.
  2257. <!--
  2258. From itu p.9 just under the type7 msg figure:
  2259. *** Radiobeacon health:
  2260. 00 (0) Radiobeacon operation normal
  2261. 01 (1) No integrity monitor operating
  2262. 10 (2) No information available
  2263. 11 (3) Do not use this radiobeacon
  2264. RTCM104, in the other hand, makes it 3 bits wide.
  2265. The Sager documentation said health has the same meaning as in the header.
  2266. but this cannot be true unless the field is 3 bits wide.
  2267. -->
  2268. </para></entry>
  2269. </row>
  2270. <row>
  2271. <entry>station_id</entry>
  2272. <entry>integer</entry>
  2273. <entry><para>The id of the transmitter. This is not the same
  2274. as the reference id in the header, the latter being the id of
  2275. the reference receiver. <!-- John Sager noted: "However I know
  2276. of at least one station that gets it wrong." --></para></entry>
  2277. </row>
  2278. <row>
  2279. <entry>bitrate</entry>
  2280. <entry>integer</entry>
  2281. <entry><para>The transmitted bitrate.</para></entry>
  2282. </row>
  2283. </tbody>
  2284. </tgroup>
  2285. </table>
  2286. <para>Here's an example:</para>
  2287. <programlisting>
  2288. {"class":"RTCM2","type":9,"station_id":268,"zcount":252.6,
  2289. "seqnum":4,"length":5,"station_health":0,
  2290. "satellites":[
  2291. {"ident":13,"udre":0,"iod":3,"prc":-25.940,"rrc":0.066},
  2292. {"ident":2,"udre":0,"iod":73,"prc":0.920,"rrc":-0.080},
  2293. {"ident":8,"udre":0,"iod":22,"prc":23.820,"rrc":0.014}
  2294. ]}
  2295. </programlisting>
  2296. </refsect3>
  2297. <refsect3><title>Type 13: GPS Time of Week</title>
  2298. <para>Here are the payload members of a type 13 (Groumf Tramitter Parameters)
  2299. message:</para>
  2300. <table frame="all" pgwide="0"><title>Grund Transmitter Parameters</title>
  2301. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2302. <thead>
  2303. <row>
  2304. <entry>Name</entry>
  2305. <entry>Type</entry>
  2306. <entry><para>Description</para></entry>
  2307. </row>
  2308. </thead>
  2309. <tbody>
  2310. <row>
  2311. <entry>status</entry>
  2312. <entry>bool</entry>
  2313. <entry><para>If True, signals user to expect a type 16 explanatory
  2314. message associated with this station. Probably indicates some
  2315. sort of unusual event.</para></entry>
  2316. </row>
  2317. <row>
  2318. <entry>rangeflag</entry>
  2319. <entry>bool</entry>
  2320. <entry><para>If True, indicates that the estimated range is
  2321. different from that found in the Type 7 message (which contains the
  2322. beacon's listed range). Generally indicates a range reduction due to
  2323. causes such as poor ionospheric conditions or reduced transmission
  2324. power.</para></entry>
  2325. </row>
  2326. <row>
  2327. <entry>lat</entry>
  2328. <entry>real</entry>
  2329. <entry><para>Degrees latitude, signed.
  2330. Positive is N, negative is S.</para></entry>
  2331. </row>
  2332. <row>
  2333. <entry>lon</entry>
  2334. <entry>real</entry>
  2335. <entry><para>Degrees longitude, signed.
  2336. Positive is E, negative is W.</para></entry>
  2337. </row>
  2338. <row>
  2339. <entry>range</entry>
  2340. <entry>integer</entry>
  2341. <entry><para>Transmission range in km (1-1024).</para></entry>
  2342. </row>
  2343. </tbody>
  2344. </tgroup>
  2345. </table>
  2346. <para>This message type replaces message type 3 (Reference Station Parameters)
  2347. in RTCM 2.3.</para>
  2348. </refsect3>
  2349. <refsect3><title>Type 14: GPS Time of Week</title>
  2350. <para>Here are the payload members of a type 14 (GPS Time of Week)
  2351. message:</para>
  2352. <table frame="all" pgwide="0"><title>Reference Station Parameters</title>
  2353. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2354. <thead>
  2355. <row>
  2356. <entry>Name</entry>
  2357. <entry>Type</entry>
  2358. <entry><para>Description</para></entry>
  2359. </row>
  2360. </thead>
  2361. <tbody>
  2362. <row>
  2363. <entry>week</entry>
  2364. <entry>integer</entry>
  2365. <entry><para>GPS week (0-123).</para></entry>
  2366. </row>
  2367. <row>
  2368. <entry>hour</entry>
  2369. <entry>integer</entry>
  2370. <entry><para>Hour of week (0-167).</para></entry>
  2371. </row>
  2372. <row>
  2373. <entry>leapsecs</entry>
  2374. <entry>integer</entry>
  2375. <entry><para>Leap Seconds (0-63).</para></entry>
  2376. </row>
  2377. </tbody>
  2378. </tgroup>
  2379. </table>
  2380. <para>Here's an example:</para>
  2381. <programlisting>
  2382. {"class":"RTCM2","type":14,"station_id":652,"zcount":1657.2,
  2383. "seqnum":3,"length":1,"station_health":6,"week":601,"hour":109,
  2384. "leapsecs":15}
  2385. </programlisting>
  2386. </refsect3>
  2387. <refsect3><title>Type 16: Special Message</title>
  2388. <table frame="all" pgwide="0"><title>Special Message</title>
  2389. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2390. <thead>
  2391. <row>
  2392. <entry>Name</entry>
  2393. <entry>Type</entry>
  2394. <entry><para>Description</para></entry>
  2395. </row>
  2396. </thead>
  2397. <tbody>
  2398. <row>
  2399. <entry>message</entry>
  2400. <entry>string</entry>
  2401. <entry><para>A text message sent by the beacon operator.</para></entry>
  2402. </row>
  2403. </tbody>
  2404. </tgroup>
  2405. </table>
  2406. </refsect3>
  2407. <refsect3><title>Type 31: Correction data</title>
  2408. <para>One or more GLONASS satellite objects follow the header for type
  2409. 1 or type 9 messages. Here is the format:</para>
  2410. <table frame="all" pgwide="0"><title>Satellite object</title>
  2411. <tgroup cols="3" align="left" colsep="1" rowsep="1">
  2412. <thead>
  2413. <row>
  2414. <entry>Name</entry>
  2415. <entry>Type</entry>
  2416. <entry><para>Description</para></entry>
  2417. </row>
  2418. </thead>
  2419. <tbody>
  2420. <row>
  2421. <entry>ident</entry>
  2422. <entry>integer</entry>
  2423. <entry><para>The PRN number of the satellite for which this is
  2424. correction data.</para></entry>
  2425. </row>
  2426. <row>
  2427. <entry>udre</entry>
  2428. <entry>integer</entry>
  2429. <entry><para>User Differential Range Error (0-3). See the
  2430. table following for values.</para></entry>
  2431. </row>
  2432. <row>
  2433. <entry>change</entry>
  2434. <entry>boolean</entry>
  2435. <entry><para>Change-of-ephemeris bit.</para></entry>
  2436. </row>
  2437. <row>
  2438. <entry>tod</entry>
  2439. <entry>uinteger</entry>
  2440. <entry><para>Count of 30-second periods since the top of the
  2441. hour.</para></entry>
  2442. </row>
  2443. <row>
  2444. <entry>prc</entry>
  2445. <entry>real</entry>
  2446. <entry><para>The pseudorange error in meters for this
  2447. satellite as measured by the beacon reference receiver at the
  2448. epoch indicated by the z_count in the parent
  2449. record.</para></entry>
  2450. </row>
  2451. <row>
  2452. <entry>rrc</entry>
  2453. <entry>real</entry>
  2454. <entry><para>The rate of change of pseudorange error in
  2455. meters/sec for this satellite as measured by the beacon
  2456. reference receiver at the epoch indicated by the z_count field
  2457. in the parent record. This is used to calculate pseudorange
  2458. errors at other epochs, if required by the GPS
  2459. receiver.</para></entry>
  2460. </row>
  2461. </tbody>
  2462. </tgroup>
  2463. </table>
  2464. <para>Here's an example:</para>
  2465. <programlisting>
  2466. {"class":"RTCM2","type":31,"station_id":652,"zcount":1642.2,
  2467. "seqnum":0,"length":14,"station_health":6,
  2468. "satellites":[
  2469. {"ident":5,"udre":0,"change":false,"tod":0,"prc":132.360,"rrc":0.000},
  2470. {"ident":15,"udre":0,"change":false,"tod":0,"prc":134.840,"rrc":0.002},
  2471. {"ident":14,"udre":0,"change":false,"tod":0,"prc":141.520,"rrc":0.000},
  2472. {"ident":6,"udre":0,"change":false,"tod":0,"prc":127.000,"rrc":0.000},
  2473. {"ident":21,"udre":0,"change":false,"tod":0,"prc":128.780,"rrc":0.000},
  2474. {"ident":22,"udre":0,"change":false,"tod":0,"prc":125.260,"rrc":0.002},
  2475. {"ident":20,"udre":0,"change":false,"tod":0,"prc":117.280,"rrc":-0.004},
  2476. {"ident":16,"udre":0,"change":false,"tod":17,"prc":113.460,"rrc":0.018}
  2477. ]}
  2478. </programlisting>
  2479. </refsect3>
  2480. </refsect2>
  2481. </refsect1>
  2482. <refsect1 id='dump-format3'><title>RTCM3 DUMP FORMAT</title>
  2483. <para>The support for RTCM104v3 dumping is incomplete and buggy. Do not
  2484. attempt to use it for production! Anyone interested in it should read
  2485. the source code.</para>
  2486. </refsect1>
  2487. <refsect1 id='ais'><title>AIS DUMP FORMATS</title>
  2488. <para>AIS support is an extension. It may not be present if your
  2489. instance of <application>gpsd</application> has been built with
  2490. a restricted feature set.</para>
  2491. <para>AIS packets are dumped as JSON objects with class "AIS". Each
  2492. AIS report object contains a "type" field giving the AIS message type
  2493. and a "scaled" field telling whether the remainder of the fields are
  2494. dumped in scaled or unscaled form. (These will be emitted before any
  2495. type-specific fields.) It will also contain a "device" field naming
  2496. the data source. Other fields have names and types as specified in
  2497. the <citetitle>AIVDM/AIVDO Protocol Decoding</citetitle> document on
  2498. the GPSD project website; each message field table may be directly
  2499. interpreted as a specification for the members of the corresponding
  2500. JSON object type.</para>
  2501. <para>By default, certain scaling and conversion operations are
  2502. performed for JSON output. Latitudes and longitudes are scaled to
  2503. decimal degrees rather than the native AIS unit of 1/10000th of a
  2504. minute of arc. Ship (but not air) speeds are scaled to knots rather
  2505. than tenth-of-knot units. Rate of turn may appear as "nan" if is
  2506. unavailable, or as one of the strings "fastright" or "fastleft" if it
  2507. is out of the AIS encoding range; otherwise it is quadratically mapped
  2508. back to the turn sensor number in degrees per minute. Vessel draughts
  2509. are converted to decimal meters rather than native AIS
  2510. decimeters. Various other scaling conversions are described in
  2511. <citetitle>"AIVDM/AIVDO Protocol Decoding"</citetitle>.</para>
  2512. </refsect1>
  2513. <refsect1 id='subframe'><title>SUBFRAME DUMP FORMATS</title>
  2514. <para>Subframe support is always compiled into
  2515. <application>gpsd</application> but many GPSes do not output subframe data
  2516. or the <application>gpsd</application> driver may not support subframes.
  2517. </para>
  2518. <para>Subframe packets are dumped as JSON objects with class "SUBFRAME".
  2519. Each subframe report object contains a "frame" field giving the subframe
  2520. number, a "tSV" field for the transmitting satellite number, a "TOW17"
  2521. field containing the 17 MSBs of the start of the next 12-second message
  2522. and a "scaled" field telling whether the remainder of the fields are
  2523. dumped in scaled or unscaled form. It will also contain a "device" field
  2524. naming the data source. Each SUBFRAME object will have a sub-object
  2525. specific to that subframe page type. Those sub-object fields have names
  2526. and types similar to those specified in the IS-GPS-200E document; each
  2527. message field table may be directly interpreted as a specification for
  2528. the members of the corresponding JSON object type.</para>
  2529. </refsect1>
  2530. <refsect1 id='see_also'><title>SEE ALSO</title>
  2531. <para>
  2532. <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
  2533. <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
  2534. </para>
  2535. </refsect1>
  2536. <refsect1 id='maintainer'><title>AUTHOR</title>
  2537. <para>The protocol was designed and documented by Eric S. Raymond.</para>
  2538. </refsect1>
  2539. </refentry>