GPSPROF(1) | GPSD Documentation | GPSPROF(1) |
NAME
gpsprof - profile a GPS and gpsd, plotting latency information
SYNOPSIS
gpsprof [OPTIONS] [server[:port[:device]]]
gpsprof -h
gpsprof -V
DESCRIPTION
gpsprof performs accuracy, latency, skyview, and time drift profiling on a GPS. It emits to standard output a GNUPLOT program that draws one of several illustrative graphs. It can also be told to emit the raw profile data.
Information from the default spatial plot it provides can be useful for characterizing position accuracy of a GPS.
gpsprof uses instrumentation built into gpsd. It can read data from a local or remote running gpsd. Or it can read data from a saved logfile.
gpsprof is designed to be lightweight and use minimal host resources. No graphics subsystem needs to be installed on the host running gpsprof. Simply copy the resultant plot file to another host to be rendered with gnuplot(1).
gpsprof does not require root privileges, but it will run fine as root.
OPTIONS
The -f, --formatter option sets the plot type. Currently the following plot types are defined:
space
polar
polarunused
polarused
time
instrumented
For purposes of the description, below, start-of-reporting-cycle (SORC) is when a device’s reporting cycle begins. This time is detected by watching to see when data availability follows a long enough amount of quiet time that we can be sure we’ve seen the gap at the end of the sensor’s previous report-transmission cycle. Detecting this gap requires a device running at 9600bps or faster.
Similarly, EORC is end-of-reporting-cycle; when the daemon has seen the last sentence it needs in the reporting cycle and ready to ship a fix to the client.
The components of the instrumented plot are as follows:
Fix latency
RS232 time
Analysis time
Reception time
Because of RS232 buffering effects, the profiler sometimes generates reports of ridiculously high latencies right at the beginning of a session. The -m option lets you set a latency threshold, in multiples of the cycle time, above which reports are discarded.
uninstrumented
-?, -h, --help
-d FILE, --dumpfile FILE
-d LVL, --debug LVL
-l FILE, --logfile FILE
-n SEC, --wait SEC
-r, --redo
-S STR, --subtitle STR
-t STR, --title STR
-T TERM, --terminal TERM
Different installations of gnuplot(1) will support different terminal types. Different terminal types may work better for you than other ones. "-T png" will generate PNG images. Use "-T jpeg" to generate JPEG images. "-T pngcairo" often works best, but is not supported by some distributions. The same terminal type may work very differently on different distributions.
To see which terminal types your copy of gnuplot(1) supports:
gnuplot -e "set terminal"
ARGUMENTS
By default, clients collect data from the local gpsd daemon running on localhost, using the default GPSD port 2947. The optional argument to any client may override this behavior: [server[:port[:device]]]
For further explanation, and examples, see the ARGUMENTS section in the gps(1) man page
SIGNALS
Sending SIGUSR1 to a running instance causes it to write a completion message to standard error and resume processing. The first number in the startup message is the process ID to signal.
EXAMPLES
To display the graph, use gnuplot(1) . Thus, for example, to display the default spatial scatter plot on your x11 display, do this:
gpsprof | gnuplot -persist
To generate an image file:
gpsprof -T png | gnuplot > image.png
To generate a polar plot, and save the GPS data for further plots:
gpsprof -f polar -T jpeg -l polar.json | gnuplot > polar.png
Then to make the matching polarused and polarunused plots and pngs from the just saved the GPS data:
gpsprof -f polarused -T jpeg -r < polar.json > polarused.plot gnuplot < polarused.plot > polarused.png gpsprof -f polarunused -T jpeg -r < polar.json > polarunused.plot gnuplot < polarunused.plot > polarunused.png
You can split the pieces up, so you do not need to run the entire chain at once. To allow tweaking settings without recollecting all the data. Like this:
gpspipe -w -x 3600 ::/dev/ttyS0 > MY.raw gpsdecode < MY.raw > MY.json gpsprof -r -T pngcairo -t "MY Title" < MY.json > MY.plt gnuplot MY.plt > MY.png display MY.png
The gpspipe saves one hour of raw data from the local gpsd device /dev/ttyS0 into MY.raw. It will take one hour to complete.
The gpsdecode converts the raw data in MY.raw into a gpsd JSON file called MY.json.
The gpsprof reads MY.json and creates a gnuplot program in MY.plt.
The gnuplot executes the program in MY.plt and creates the image file MY.png.
The display program paints MY.png on your desktop.
RETURN VALUES
0
1
SEE ALSO
gpsd(8), display(1), gnuplot(1), gpsctl(1), gps(1), libgps(3), libgpsmm(3), gpsprof(1), gpsfake(1).
RESOURCES
Project web site: https://gpsd.io/
COPYING
This file is Copyright 2013 by the GPSD project
SPDX-License-Identifier: BSD-2-clause
AUTHOR
Eric S. Raymond
2023-01-10 | GPSD, Version 3.25 |