GPSPROF(1)

NAME
gpsprof - profile a GPS and gpsd, plotting latency information

SYNOPSIS

gpsprof [-f plot_type] [-m threshold] [-n packetcount] [-o outfile] [-r] [-s speed] [-t title] [-T terminal type] [-h]

DESCRIPTION

gpsprof measures the various latencies between a GPS and its client. It draws an illustrative graph. It can also be told to save the raw profile data. The information it provides can be useful for establishing an upper bound on latency, and thus on position accuracy of a GPS in motion, especially in combination with the static-precision reports from gpsprobe(1).

gpsprof uses instrumentation built into gpsd that will only be present if it was configured to support profiling.

Graphs are generated using gnuplot(1).

OPTIONS

The -f option sets the plot type. The X axis is samples (sentences with timestamps). The Y axis is latency in seconds. Currently the following plot types are defined:

space
    Generate a scattergram of fixes and plot a probable-error circle. This data is only meaningful if the GPS is held stationary while gpsprof is running.

raw Plot raw data.

split
    Plot filtered data. Sentences with an apparent latency larger than 1 second are discarded. Each sentence has its RS232 latency time colored differently. This is the default.

uninstrumented
    Plot total latency without instrumentation. Useful mainly as a check that the instrumentation is not producing significant distortion.

Each plot conveys the following information:

RS232 time
    Minimum time required to send the sentence from the GPS to gpsd. This is computed, not measured, and may be an underestimate.

Other line latency
    The transmission latency between the GPS and gpsd not accounted for by RS232 time. Total line latency (the sum of this bar and RS232 time) is measured; it begins with the GPS sentence's timestamp and ends with a timestamp that gpsd generates at sentence-reading time, before it is decoded.

Decode time
    Elapsed time between sentence reception and the moment that gpsd ships the resulting update to the profiling client.

TCP/IP latency
    Elapsed time between the moment that gpsd ships the update to the profiling client and the moment it is decoded and timestamped.

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.

The -n option sets the number of packets to sample. The default is 100.

The -o option specifies the name of a file in which to dump the profiling data; gnuplot(1) will read out from there. If this option is not specified, the data will be written to a tempfile and discarded after the plot id made

The -s option sets the baud rate. Note, this will only work if the chipset accepts a speed-change command (SiRF-II supports this feature).

The -t option sets a text string to be included in the plot title. Specifying the GPS make and model is a good use for it.

The -T option sets a terminal type for gnuplot(1) . It will normally default to "x11" at produce a display immediately, but (for example) specifying "-T png" will instead cause a PNG image of the graphic to be shipped to standard output.

The -h option makes gpsprof print a usage message and exit.

BUGS AND LIMITAIONS

Probably overestimates TCP/IP latency somewhat, as that includes the Python interpreter's decode time. A C client would be faster.

SEE ALSO

 gpsd(1) libgps(3) libgpsd(3) gpsprobe(1) gnuplot(1)

AUTHOR

Eric S. Raymond <esr@thyrsus.com>. There is a project page for gpsd here: http://gpsd.berlios.de/.