Devuan fork of gpsd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

292 lines
11 KiB

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!--
  3. This file is Copyright (c) 2010 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. <refentry id='gpsprof.1'>
  10. <refentryinfo><date>30 May 2018</date></refentryinfo>
  11. <refmeta>
  12. <refentrytitle>gpsprof</refentrytitle>
  13. <manvolnum>1</manvolnum>
  14. <refmiscinfo class="source">The GPSD Project</refmiscinfo>
  15. <refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
  16. </refmeta>
  17. <refnamediv id='name'>
  18. <refname>gpsprof</refname>
  19. <refpurpose>profile a GPS and gpsd, plotting latency information</refpurpose>
  20. </refnamediv>
  21. <refsynopsisdiv id='synopsis'>
  22. <cmdsynopsis>
  23. <command>gpsprof</command>
  24. <arg choice='opt'>-D <replaceable>debuglevel</replaceable></arg>
  25. <arg choice='opt'>-d <replaceable>dumpfile</replaceable></arg>
  26. <arg choice='opt'>-f <replaceable>plot_type</replaceable></arg>
  27. <arg choice='opt'>-h </arg>
  28. <arg choice='opt'>-l <replaceable>logfile</replaceable></arg>
  29. <arg choice='opt'>-m <replaceable>threshold</replaceable></arg>
  30. <arg choice='opt'>-n <replaceable>samplecount</replaceable></arg>
  31. <arg choice='opt'>-r </arg>
  32. <arg choice='opt'>-S <replaceable>subtitle</replaceable></arg>
  33. <arg choice='opt'>-T <replaceable>terminal</replaceable></arg>
  34. <arg choice='opt'>-t <replaceable>title</replaceable></arg>
  35. <arg choice='opt'>[server[:port[:device]]]</arg>
  36. </cmdsynopsis>
  37. </refsynopsisdiv>
  38. <refsect1 id='description'><title>DESCRIPTION</title>
  39. <para><application>gpsprof</application> performs accuracy, latency,
  40. skyview, and time drift profiling on a GPS. It emits to standard output
  41. a GNUPLOT program that draws one of several illustrative graphs. It can
  42. also be told to emit the raw profile data.</para>
  43. <para>Information from the default spatial plot it provides can be
  44. useful for characterizing position accuracy of a GPS.</para>
  45. <para><application>gpsprof</application> uses instrumentation built
  46. into <application>gpsd</application>. It can read data from a local
  47. or remote running <application>gpsd</application>. Or it can read
  48. data from a saved logfile.</para>
  49. <para><application>gpsprof</application> is designed to be lightweight
  50. and use minimal host resources. No graphics subsystem needs to be
  51. installed on the host running <application>gpsprof</application>. Simply
  52. copy the resultant plot file to another host to be rendered
  53. with <application>gnuplot</application>.
  54. </para>
  55. </refsect1>
  56. <refsect1 id='options'><title>OPTIONS</title>
  57. <para>The -f option sets the plot type. Currently the following plot
  58. types are defined:</para>
  59. <variablelist>
  60. <varlistentry>
  61. <term>space</term>
  62. <listitem>
  63. <para>Generate a scatterplot of fixes and plot probable error circles.
  64. This data is only meaningful if the GPS is held stationary while
  65. <application>gpsprof</application> is running. Various statistics about
  66. the fixes are listed at the bottom. This is the default plot type.</para>
  67. </listitem>
  68. </varlistentry>
  69. <varlistentry>
  70. <term>polar</term>
  71. <listitem>
  72. <para>Generate a heat map of reported satellite Signal to Noise Ratio
  73. (SNR) using polar coordinates. A colored dot is plotted for
  74. each satellite seen by the GPS. The color of dot corresponds to the
  75. SNR of the satellite. The dots are plotted by azimuth and
  76. elevation. North, azimuth 0 degrees, is at the top of the plot.
  77. Directly overhead, elevation of 90 degrees, is plotted at the center.
  78. Useful for analyzing the quality of the skyview as seen by the GPS.
  79. </para>
  80. </listitem>
  81. </varlistentry>
  82. <varlistentry>
  83. <term>polarunused</term>
  84. <listitem>
  85. <para>Similar to the polar plot, but only unused satellites
  86. are plotted. Useful for seeing which parts of the antenna skyview
  87. are obstructed, degraded, below the GPS elevation mask, or otherwise
  88. rejected.</para>
  89. </listitem>
  90. </varlistentry>
  91. <varlistentry>
  92. <term>polarused</term>
  93. <listitem>
  94. <para>Similar to the polar plot, but only satellites used to compute
  95. fixs are plotted. Useful for seeing which parts of the antenna
  96. skyview are being used in fixes.</para>
  97. </listitem>
  98. </varlistentry>
  99. <varlistentry>
  100. <term>time</term>
  101. <listitem>
  102. <para>Plot delta of system clock (NTP corrected time) against GPS time
  103. as reported in PPS messages. The X axis is sample time in seconds
  104. from the start of the plot. The Y axis is the system clock delta from
  105. GPS time. This plot only works if <application>gpsd</application> was
  106. built with the timing (latency timing support) configure option
  107. enabled.</para>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry>
  111. <term>instrumented</term>
  112. <listitem>
  113. <para>Plot instrumented profile. Plots various components of the total
  114. latency between the GPS's fix time and when the client receives the
  115. fix. This plot only works if <application>gpsd</application> was built
  116. with the timing (latency timing support) configuration option enabled.
  117. </para>
  118. <para>For purposes of the description, below, start-of-reporting-cycle
  119. (SORC) is when a device's reporting cycle begins. This time is
  120. detected by watching to see when data availability follows a long
  121. enough amount of quiet time that we can be sure we've seen the gap at
  122. the end of the sensor's previous report-transmission cycle. Detecting
  123. this gap requires a device running at 9600bps or faster.</para>
  124. <para>Similarly, EORC is end-of-reporting-cycle; when the daemon has
  125. seen the last sentence it needs in the reporting cycle and ready to ship
  126. a fix to the client.</para>
  127. <para>The components of the instrumented plot are as follows:</para>
  128. <variablelist>
  129. <varlistentry>
  130. <term>Fix latency</term>
  131. <listitem>
  132. <para>Delta between GPS time and SORC.</para>
  133. </listitem>
  134. </varlistentry>
  135. <varlistentry>
  136. <term>RS232 time</term>
  137. <listitem>
  138. <para>RS232 transmission time for data shipped during the cycle
  139. (computed from character volume and baud rate).</para>
  140. </listitem>
  141. </varlistentry>
  142. <varlistentry>
  143. <term>Analysis time</term>
  144. <listitem>
  145. <para>EORC, minus SORC, minus RS232 time. The amount of real time the daemon
  146. spent on computation rather than I/O.</para>
  147. </listitem>
  148. </varlistentry>
  149. <varlistentry>
  150. <term>Reception time</term>
  151. <listitem>
  152. <para>Shipping time from
  153. the daemon to when it was received by <application>gpsprof</application>.</para>
  154. </listitem>
  155. </varlistentry>
  156. </variablelist>
  157. <para>Because of RS232 buffering effects, the profiler sometimes
  158. generates reports of ridiculously high latencies right at the
  159. beginning of a session. The -m option lets you set a latency
  160. threshold, in multiples of the cycle time, above which reports are
  161. discarded.</para>
  162. </listitem>
  163. </varlistentry>
  164. <varlistentry>
  165. <term>uninstrumented</term>
  166. <listitem>
  167. <para>Plot total latency without instrumentation. Useful mainly as a
  168. check that the instrumentation is not producing significant distortion.
  169. The X axis is sample time in seconds from the start of the plot. The Y
  170. axs is latency in seconds.It only plots times for reports that contain
  171. fixes; staircase-like artifacts in the plot are created when elapsed
  172. time from reports without fixes is lumped in.</para>
  173. </listitem>
  174. </varlistentry>
  175. </variablelist>
  176. <para>The -d option dumps the plot data, without attached gnuplot
  177. code, to a specified file for post-analysis.</para>
  178. <para>The -D sets debug level.</para>
  179. <para>The -h option makes <application>gpsprof</application> print
  180. a usage message and exit.</para>
  181. <para>The -l option dumps the raw JSON reports collected from the device
  182. to a specified file.</para>
  183. <para>The -n option sets the number of packets to sample. The default
  184. is 100. Most GPS are configured to emit one fix per second, so 100
  185. samples would then span 100 seconds.</para>
  186. <para>The -r option replots from a JSON logfile (such as -l produces)
  187. on standard input. Both -n and -l options are ignored when this
  188. one is selected.</para>
  189. <para>The -S option sets a text string to be included in the plot
  190. as a subtitle. This will be below the title.</para>
  191. <para>The -t option sets a text string to be the plot title. This
  192. will replace the default title.</para>
  193. <para>The -T option generates a terminal type setting into the gnuplot
  194. code. Typical usage is "-T png", or "-T pngcairo" telling gnuplot to
  195. write a PNG file. Without this option gnuplot will call its X11 display
  196. code.</para>
  197. <para> Different installations of <application>gnuplot</application> will
  198. support different terminal types. Different terminal types may work better
  199. for you than other ones. "-T png" will generate PNG images. Use "-T jpeg"
  200. to generate JPEG images. "-T pngcairo" often works best, but is not
  201. supported by some distributions.</para>
  202. </refsect1>
  203. <refsect1 id='signals'><title>SIGNALS</title>
  204. <para>Sending SIGUSR1 to a running instance causes it to write a
  205. completion message to standard error and resume processing. The
  206. first number in the startup message is the process ID to signal.</para>
  207. </refsect1>
  208. <refsect1 id='examples'><title>EXAMPLES</title>
  209. <para>To display the graph, use
  210. <citerefentry><refentrytitle>gnuplot</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
  211. Thus, for example, to display the default spatial scatter plot, do
  212. this:
  213. <programlisting>
  214. gpsprof | gnuplot -persist
  215. </programlisting>
  216. </para>
  217. <para>To generate an image file:
  218. <programlisting>
  219. gpsprof -T png | gnuplot &gt; image.png
  220. </programlisting>
  221. </para>
  222. <para>
  223. To generate a polar plot, and save the GPS data for further plots:
  224. <programlisting>
  225. gpsprof -f polar -T jpeg -l polar.json | gnuplot &gt; polar.png
  226. </programlisting>
  227. Then to make the matching polarused and polarunused plots and pngs from
  228. the just saved the GPS data:
  229. <programlisting>
  230. gpsprof -f polarused -T jpeg -r &lt; polar.json &gt; polarused.plot
  231. gnuplot &lt; polarused.plot &gt; polarused.png
  232. gpsprof -f polarunused -T jpeg -r &lt; polar.json &gt; polarunused.plot
  233. gnuplot &lt; polarunused.plot &gt; polarunused.png
  234. </programlisting>
  235. </para>
  236. </refsect1>
  237. <refsect1 id='see_also'><title>SEE ALSO</title>
  238. <para>
  239. <citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
  240. <citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
  241. <citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
  242. <citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
  243. <citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
  244. <citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
  245. <citerefentry><refentrytitle>gpscat</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
  246. <citerefentry><refentrytitle>gnuplot</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
  247. </para>
  248. </refsect1>
  249. <refsect1 id='maintainer'><title>AUTHOR</title>
  250. <para>Eric S. Raymond <email>esr@thyrsus.com</email>.</para>
  251. </refsect1>
  252. </refentry>