gpsrinex.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
  3. <!--
  4. This file is Copyright 2018 by the GPSD project
  5. SPDX-License-Identifier: BSD-2-clause
  6. --><refentry id="gpsrinex.1">
  7. <refentryinfo>
  8. <date>30 March 2020</date>
  9. </refentryinfo>
  10. <refmeta>
  11. <refentrytitle>gpsrinex</refentrytitle>
  12. <manvolnum>1</manvolnum>
  13. <refmiscinfo class="source">The GPSD Project</refmiscinfo>
  14. <refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
  15. </refmeta>
  16. <refnamediv id="name">
  17. <refname>gpsrinex</refname>
  18. <refpurpose>Read data from gpsd convert to RINEX3 and save to a file.</refpurpose>
  19. </refnamediv>
  20. <refsynopsisdiv id="synopsis">
  21. <cmdsynopsis>
  22. <command>gpsrinex</command>
  23. <arg choice="opt">-D <replaceable>debuglevel</replaceable></arg>
  24. <arg choice="opt">-f <replaceable>filename</replaceable></arg>
  25. <arg choice="opt">-h</arg>
  26. <arg choice="opt">-i <replaceable>interval</replaceable></arg>
  27. <arg choice="opt">-n <replaceable>count</replaceable></arg>
  28. <arg choice="opt">-V</arg>
  29. <group>
  30. <replaceable>server</replaceable>
  31. <group>
  32. <replaceable>:port</replaceable>
  33. <group>
  34. <replaceable>:device</replaceable>
  35. </group>
  36. </group>
  37. </group>
  38. </cmdsynopsis>
  39. </refsynopsisdiv>
  40. <refsect1 id="description">
  41. <title>DESCRIPTION</title>
  42. <para>
  43. <application>gpsrinex</application> is a tool to connect to
  44. <application>gpsd</application> and output the received raw measurements
  45. as a RINEX 3 observation file. This is useful for sending raw measurements
  46. (pseudorange and carrierphase) from <application>gpsd</application> to
  47. a Precise Point Positioning (PPP) program or service.</para>
  48. <para>
  49. <application>gpsrinex</application> does not require root
  50. privileges, and can be run concurrently with other tools connecting
  51. to a local or remote <application>gpsd</application> without causing
  52. problems.</para>
  53. <para>gpsrinex needs the GPS receiver to be sending raw measurements
  54. to <application>gpsd</application>. Only a few GPS have this capability.
  55. In addition, the <application>gpsd</application> driver for that GPS
  56. must support raw mode. Currently only the u-blox driver has this support.
  57. Only a few u-blox 8 GPS implement the required UBX-RXM-RAWX message. The
  58. NEO-M8T is known to work, but requires configuration with
  59. <application>ubxtool</application>.</para>
  60. <para>Before using <application>ubxtool</application> be sure to
  61. set the UBXOPTS environment variable with the correct protocol version
  62. for your u-blox receiver. If your protocol version is 32.00, you
  63. would do this:
  64. <programlisting>
  65. export UBXOPTS="-P 32.00"
  66. </programlisting></para>
  67. <para>RINEX has its own definitions and abbreviations. Be
  68. sure to consult their documentation. An observation file (.obs)
  69. contains data sets, called epochs, that contain the pseudorange
  70. and carrierphase for each satellite seen.</para>
  71. <para>
  72. <application>gpsrinex</application> by default will acquire
  73. 20 epochs spaced apart by 30 seconds. That will take 10 minutes to
  74. complete. Most users consider the 30 second interval to be optimal.
  75. Many PPP programs require at least 1 or 2 hours data, but no more than
  76. 24 or 48 hours of data. Most users consider 4 to 6 hours of data
  77. as a minimum for good accuracy. Additional hours will not yield much
  78. improvement. </para>
  79. <para>The output will consist of one RINEX 3 observation file that
  80. is ready to be read by your PPP program. The default filename will be
  81. in the form: gpsrinexYYYYJJJHHMMSS.obs. You can override this filename
  82. with the -f option.</para>
  83. <para>Optionally a server, TCP/IP port number and remote device can
  84. be given. If omitted, <application>gpsrinex</application> connects to
  85. localhost on the default port (2947) and watches all devices opened by
  86. <application>gpsd</application>.</para>
  87. </refsect1>
  88. <refsect1 id="options">
  89. <title>OPTIONS</title>
  90. <variablelist remap='TP'>
  91. <varlistentry>
  92. <term>-D, --debug [debuglevel]</term>
  93. <listitem><para>set debug level to [debuglevel].</para>
  94. </listitem>
  95. </varlistentry>
  96. <varlistentry>
  97. <term>-f, --fileout [filename] </term>
  98. <listitem><para>save RINEX into [filename].</para>
  99. </listitem>
  100. </varlistentry>
  101. <varlistentry>
  102. <term>-h, --help </term>
  103. <listitem><para>print a usage message and exit.</para>
  104. </listitem>
  105. </varlistentry>
  106. <varlistentry>
  107. <term>-i, --interval [interval] </term>
  108. <listitem><para>wait [interval] seconds between epochs.
  109. The interval can be specified to the millisecond.
  110. OPUS accepts intervals of 1, 2, 3, 5, 10, 15 or,30 seconds. OPUS then
  111. reduces the data to 30 second intervals. Default is 30.000.</para>
  112. </listitem>
  113. </varlistentry>
  114. <varlistentry>
  115. <term>-n, --count [count] </term>
  116. <listitem><para>causes [count] epochs to be output. OPUS
  117. requires a minimum af 15 minutes, and a maximum of 48 hours, of data.</para>
  118. </listitem>
  119. </varlistentry>
  120. <varlistentry>
  121. <term>-V, --version</term>
  122. <listitem><para>makes <application>gpsrinex</application> print
  123. its version and exit.</para>
  124. </listitem>
  125. </varlistentry>
  126. </variablelist>
  127. <para>The following options set strings that are placed in the generated
  128. RINEX 3 obs file.</para>
  129. <variablelist remap='TP'>
  130. <varlistentry>
  131. <term>--agency [agency]</term>
  132. <listitem><para>agency</para>
  133. </listitem>
  134. </varlistentry>
  135. <varlistentry>
  136. <term>--ant_num [number]</term>
  137. <listitem><para>antenna number</para>
  138. </listitem>
  139. </varlistentry>
  140. <varlistentry>
  141. <term>--ant_type [type]</term>
  142. <listitem><para>antenna type</para>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry>
  146. <term>--marker_name [name]</term>
  147. <listitem><para>marker name</para>
  148. </listitem>
  149. </varlistentry>
  150. <varlistentry>
  151. <term>--marker_type [type]</term>
  152. <listitem><para>marker type</para>
  153. </listitem>
  154. </varlistentry>
  155. <varlistentry>
  156. <term>--observer [observer]</term>
  157. <listitem><para>observer</para>
  158. </listitem>
  159. </varlistentry>
  160. <varlistentry>
  161. <term>--rec_num [num]</term>
  162. <listitem><para>receiver number</para>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry>
  166. <term>--rec_type [type]</term>
  167. <listitem><para>receiver type</para>
  168. </listitem>
  169. </varlistentry>
  170. <varlistentry>
  171. <term>--rec_vers [vers]</term>
  172. <listitem><para>receiver vers</para>
  173. </listitem>
  174. </varlistentry>
  175. </variablelist>
  176. <para>The following options set floating point numbers that are placed
  177. in the generated RINEX 3 obs file.</para>
  178. <variablelist remap='TP'>
  179. <varlistentry>
  180. <term>--ant_e [easting]</term>
  181. <listitem><para>antenna easting in meters</para>
  182. </listitem>
  183. </varlistentry>
  184. <varlistentry>
  185. <term>--ant_h [height]</term>
  186. <listitem><para>antenna height in meters</para>
  187. </listitem>
  188. </varlistentry>
  189. <varlistentry>
  190. <term>--ant_n [northing]</term>
  191. <listitem><para>antenna northing in meters</para>
  192. </listitem>
  193. </varlistentry>
  194. </variablelist>
  195. </refsect1>
  196. <refsect1 id="exampletitle">
  197. <title>EXAMPLES</title>
  198. <para>Example 1:</para>
  199. <para>Create a 4 hour .obs file. With a running
  200. <application>gpsd</application> accessible on the localhost do all of
  201. the following, in order. Order matters.</para>
  202. <para>The raw measurement messages are long. Be sure your serial port
  203. speed is high enough:
  204. <programlisting>
  205. gpsctl -s 115200
  206. </programlisting></para>
  207. <para>Disable all NMEA messages, and enable binary messages:
  208. <programlisting>
  209. ubxtool -d NMEA
  210. ubxtool -e BINARY
  211. </programlisting></para>
  212. <para>The NEO-M8N will only reliably output raw measurements
  213. when only the GPS and QZSS constellations are enabled. If your PPP
  214. service can use GLONASS, then enable that as well. Be sure to
  215. disable, before enable, so as not to momentarily have too many
  216. constellations selected.
  217. <application>ubxtool</application>, as recommended by u-blox, enables
  218. the QZSS constellation in tandem with GPS. Disable all constellations,
  219. except GPS (and QZSS):
  220. <programlisting>
  221. ubxtool -d BEIDOU
  222. ubxtool -d GALILEO
  223. ubxtool -d GLONASS
  224. ubxtool -d SBAS
  225. ubxtool -e GPS
  226. </programlisting></para>
  227. <para>Verify the constellations enabled:
  228. <programlisting>
  229. ubxtool -p CFG-GNSS
  230. </programlisting></para>
  231. <para>Enable the good stuff, the raw measurement messages:
  232. <programlisting>
  233. ubxtool -e RAWX
  234. </programlisting></para>
  235. <para>Verify raw data messages are being sent:
  236. <programlisting>
  237. ubxtool | fgrep RAWX
  238. </programlisting>
  239. You should see this output:
  240. <programlisting>
  241. UBX-RXM-RAWX:
  242. UBX-RXM-RAWX:
  243. </programlisting></para>
  244. <para>Collect 4 hours of samples at 30 second intervals, save the
  245. RINEX 3 observations in the file today.obs:
  246. <programlisting>
  247. gpsrinex -i 30 -n 480 -f today.obs
  248. </programlisting></para>
  249. <para>Wait 4 hours. Enjoy a meal, or do some exercise. When
  250. <application>gpsrinex</application> finishes, upload the file today.obs
  251. to your favorite PPP service.</para>
  252. <para>Example 2:</para>
  253. <para>Collect raw measurement data from a remote gpsd. The
  254. process it later with <application>gpsrinex</application> and
  255. <application>gpsprof</application>.</para>
  256. <para>Ensure the GPS is configured properly, as shown in Example 1.</para>
  257. <para>Grab 4 hours of raw live data from remote
  258. <application>gpsd</application> at 10.168.1.2:
  259. <programlisting>
  260. gpspipe -x 14400 -R 10.168.1.2 > 4h-raw.ubx
  261. </programlisting></para>
  262. <para>When <application>gpspipe</application> is complete, feed the
  263. data to <application>gpsfake</application>:
  264. <programlisting>
  265. gpsfake -1 -P 3000 4h-raw.ubx
  266. </programlisting></para>
  267. <para>In another window, feed the data to
  268. <application>gpsrinex</application>. Use -n 10000000 so that
  269. all the data from the raw file is used::
  270. <programlisting>
  271. gpsrinex -i 30 -n 1000000 :3000
  272. </programlisting></para>
  273. <para>Repeat the process with
  274. <application>gpsfake</application> to send the data to
  275. <application>gpsprof</application>.</para>
  276. </refsect1>
  277. <refsect1 id="see_also">
  278. <title>SEE ALSO</title>
  279. <para>One service known to work with gbsrinex output is at:
  280. https://webapp.geod.nrcan.gc.ca/geod/tools-outils/ppp.php</para>
  281. <para>OPUS requires 2 frequency observation files.
  282. https://www.ngs.noaa.gov/OPUS/</para>
  283. <para>The curious can find the RINEX 3.04 format described here:
  284. ftp://igs.org/pub/data/format/rinex304.pdf </para>
  285. <para>
  286. <citerefentry>
  287. <refentrytitle>gpsd</refentrytitle>
  288. <manvolnum>8</manvolnum>
  289. </citerefentry>,
  290. <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
  291. <citerefentry><refentrytitle>ubxtool</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
  292. </para>
  293. </refsect1>
  294. <refsect1 id="maintainer">
  295. <title>AUTHOR</title>
  296. <para>Gary E. Miller <email>gem@rellim.com</email>.</para>
  297. </refsect1>
  298. </refentry>