Browse Source

New upstream version 3.21.99~rc1

master upstream/3.21.99_rc1
Bernd Zeimetz 2 years ago
parent
commit
1814e3c15a
  1. 2
      NEWS
  2. 26
      SConscript
  3. 2
      SConstruct
  4. 196
      man/cgps.1
  5. 1
      man/gegps.1
  6. 1
      man/gps.1
  7. 148
      man/gps2udp.1
  8. 104
      man/gpscat.1
  9. 308
      man/gpscsv.1
  10. 183
      man/gpsctl.1
  11. 655
      man/gpsd.8
  12. 3677
      man/gpsd_json.5
  13. 73
      man/gpsdctl.8
  14. 132
      man/gpsdecode.1
  15. 310
      man/gpsfake.1
  16. 130
      man/gpsinit.8
  17. 271
      man/gpsmon.1
  18. 223
      man/gpspipe.1
  19. 159
      man/gpsplot.1
  20. 262
      man/gpsprof.1
  21. 363
      man/gpsrinex.1
  22. 166
      man/gpssubframe.1
  23. 153
      man/gpxlogger.1
  24. 1
      man/lcdgps.1
  25. 1
      man/libQgpsmm.3
  26. 305
      man/libgps.3
  27. 76
      man/libgpsmm.3
  28. 197
      man/ntpshmmon.1
  29. 83
      man/ppscheck.8
  30. 537
      man/ubxtool.1
  31. 219
      man/xgps.1
  32. 1
      man/xgpsspeed.1
  33. 363
      man/zerk.1
  34. 2
      packaging/gpsd-setup.py
  35. 2
      packaging/rpm/gpsd.spec

2
NEWS

@ -1,6 +1,6 @@
GPSD project news
3.21.1~dev: in progress
3.21.99~rc1: in progress
Added client/gpscsv to convert gpsd JSON to csv.
Added client/gpsplot to dynamically plot gpsd JSON.
Added client/gpssubframe to decode gpsd SUBFRAME JSON.

26
SConscript

@ -269,7 +269,7 @@ api_version_major = 3
api_version_minor = 14
# client library version
libgps_version_current = 27
libgps_version_current = 28
libgps_version_revision = 0
libgps_version_age = 0
libgps_version = "%d.%d.%d" % (libgps_version_current, libgps_version_age,
@ -812,7 +812,7 @@ docbook_html_uri = docbook_url_stem + 'html/docbook.xsl'
def CheckXsltproc(context):
context.Message('Checking that xsltproc can make man pages... ')
# ofp = open(env['SRCDIR'] + "/man/xmltest.xml", "w")
# open() happens in variantdir
ofp = open("xmltest.xml", "w")
ofp.write('''
<refentry id="foo.1">
@ -828,10 +828,12 @@ def CheckXsltproc(context):
</refentry>
''')
ofp.close()
probe = ("xsltproc --encoding UTF-8 --output man/foo.1 --nonet "
"--noout '%s' xmltest.xml" % (docbook_man_uri,))
probe = ("xsltproc --encoding UTF-8 --output %s/man/foo.1 --nonet "
"--noout '%s' %s/xmltest.xml" %
(variantdir, docbook_man_uri, variantdir))
(ret, out) = context.TryAction(probe)
# out should be empty, don't bother to test.
# next 3 lines happen in variantdir
os.remove("xmltest.xml")
if os.path.exists("man/foo.1"):
os.remove("man/foo.1")
@ -2438,10 +2440,18 @@ for glb in webpages_x_list:
webpages = htmlpages + asciidocs + wwwpage_targets + webpages_in + webpages_x
www = env.Alias('www', webpages)
# On the Mac (at least), some X11 programs launch the X11 server even when
# they're not actually using the display. Clearing DISPLAY in the
# environment avoids this. We leave the main environment untouched just in
# case it might be needed.
nox11_env = env['ENV'].copy()
nox11_env['DISPLAY'] = ''
# The diagram editor dia is required in order to edit the diagram masters
if have_dia:
Utility("www/cycle.svg", ["www/cycle.dia"],
["cd %s; dia -e www/cycle.svg www/cycle.dia" % variantdir])
env.Command("www/cycle.svg", ["www/cycle.dia"],
["cd %s; dia -e www/cycle.svg www/cycle.dia" % variantdir],
ENV=nox11_env)
packing = [
'packaging/deb/etc_default_gpsd',
@ -2556,8 +2566,6 @@ python_compilation_regress = Utility('python-compilation-regress',
# get version from each python prog
# this ensures they can run and gps_versions match
vchk = ''
verenv = env['ENV'].copy()
verenv['DISPLAY'] = '' # Avoid launching X11 in X11 progs
pp = []
for p in python_progs:
if not env['xgps_deps']:
@ -2569,7 +2577,7 @@ for p in python_progs:
tgt = Utility(
'version-%s' % p, p,
'cd %s; $PYTHON %s -V' % (variantdir, p),
ENV=verenv)
ENV=nox11_env)
pp.append(tgt)
python_versions = env.Alias('python-versions', pp)

2
SConstruct

@ -46,7 +46,7 @@ EnsureSConsVersion(2, 3, 0)
EnsurePythonVersion(2, 6)
# package version
gpsd_version = "3.21.1~dev"
gpsd_version = "3.21.99~rc1"
# name 'build' is already taken, put stuff in gpsd-$VERSION
# it makes tar simple
variantdir = 'gpsd-' + gpsd_version

196
man/cgps.1

@ -0,0 +1,196 @@
'\" t
.\" Title: gps
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 6 December 2020
.\" Manual: GPSD Documentation
.\" Source: The GPSD Project
.\" Language: English
.\"
.TH "GPS" "1" "6 December 2020" "The GPSD Project" "GPSD Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
cgps, gegps, gps, lcdgps \- simple clients for gpsd
.SH "SYNOPSIS"
.HP \w'\fBcgps\fR\ 'u
\fBcgps\fR [\-?] [\-\-debug\ \fILVL\fR] [\-\-help] [\-\-llfmt\ [[d]\ |\ [m]\ |\ [s]]] [\-\-magtrack] [\-\-silent] [\-\-units\ [[i]\ |\ [n]\ |\ [m]]] [\-\-version] [\-D\ \fILVL\fR] [\-h] [\-l\ [[d]\ |\ [m]\ |\ [s]]] [\-m] [\-s] [\-u\ [[i]\ |\ [n]\ |\ [m]]] [\-V] [\fIserver\fR [\fI:port\fR [\fI:device\fR]]]
.HP \w'\fBgegps\fR\ 'u
\fBgegps\fR [\-?] [\-\-debug\ \fILVL\fR] [\-\-device\ \fIDEVICE\fR] [\-\-help] [\-\-host\ \fIHOST\fR] [\-\-initialize] [\-\-kmldir\ \fIDIRECTORY\fR] [\-\-port\ \fIPORT\fR] [\-\-version] [\-D\ \fIDEBUG\fR] [\-d\ \fIDIRECTORY\fR] [\-h] [\-i] [\-V] [\fIserver\fR [\fI:port\fR [\fI:device\fR]]]
.HP \w'\fBlcdgps\fR\ 'u
\fBlcdgps\fR [\-?] [\-\-help] [\-\-sleep] [\-\-version] [\-h] [\-j] [\-l\ [[d]\ |\ [m]\ |\ [s]]] [\-s] [\-u\ [[i]\ |\ [n]\ |\ [m]]] [\-V] [\fIserver\fR [\fI:port\fR [\fI:device\fR]]]
.SH "DESCRIPTION"
.PP
These are some simple clients shipped with
gpsd\&. They have some common options:
.PP
\fB\-?\fR, \fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a summary of options and then exit\&.
.RE
.PP
\fB\-V\fR, \fB\-\-version\fR
.RS 4
Print the package version and exit\&.
.RE
.PP
By default, clients collect data from all compatible devices on localhost, using the default GPSD port 2947\&. An optional argument to any client may specify a server to get data from\&. A colon\-separated suffix is taken as a port number\&. If there is a second colon\-separated suffix, that is taken as a specific device name to be watched\&. However, if the server specification contains square brackets, the part inside them is taken as an IPv6 address and port/device suffixes are only parsed after the trailing bracket\&. Possible cases look like this:
.PP
localhost:/dev/ttyS1
.RS 4
Look at the default port of localhost, trying both IPv4 and IPv6 and watching output from serial device 1\&.
.RE
.PP
example\&.com:2317
.RS 4
Look at port 2317 on example\&.com, trying both IPv4 and IPv6\&.
.RE
.PP
71\&.162\&.241\&.5:2317:/dev/ttyS3
.RS 4
Look at port 2317 at the specified IPv4 address, collecting data from attached serial device 3\&.
.RE
.PP
[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:2317:/dev/ttyS5
.RS 4
Look at port 2317 at the specified IPv6 address, collecting data from attached serial device 5\&.
.RE
.SS "cgps"
.PP
cgps
is a client resembling
xgps, but without the pictorial satellite display and able to run on a serial terminal or terminal emulator\&.
.PP
\fB\-D LVL\fR, \fB\-\-debug LVL\fR
.RS 4
Sets the debug level; it is primarily for use by GPSD developers\&. It enables various progress messages to standard error\&.
.RE
.PP
\fB\-l FMT\fR, \fB\-\-llfmt FMT\fR
.RS 4
Sets the format of latitude and longitude reports\&. The value \*(Aqd\*(Aq produces decimal degrees and is the default\&. The value \*(Aqm\*(Aq produces degrees and decimal minutes\&. The value \*(Aqs\*(Aq produces degrees, minutes, and decimal seconds\&.
.RE
.PP
\fB\-s\fR, \fB\-\-silent\fR
.RS 4
Prevents
cgps
from displaying the data coming from the daemon\&. This display can also be toggled with the s command\&.
.RE
.PP
\fB\-m\fR, \fB\-\-magtrack\fR
.RS 4
Display your magnetic track (as opposed to your true track)\&. This is a calculated value, not a measured value\&. Magnetic variation is always potentially subject to large errors, but is usually better than two degrees\&.
.RE
.PP
\fB\-u UNITS\fR, \fB\-\-units UNITS\fR
.RS 4
Set the system units for display; follow the keyword with \*(Aqi\*(Aq for \*(Aqimperial\*(Aq for American units (International Feet in altitude and error estimates, miles per hour in speeds), \*(Aqn\*(Aq for \*(Aqnautical\*(Aq (feet in altitude and error estimates, knots in speed) or \*(Aqm\*(Aq for \*(Aqmetric\*(Aq (meters in altitude and error estimates, kilometers per hour in speeds)\&.
.sp
Note: The USA Survey Foot is not supported\&.
.RE
.PP
cgps
terminates when you send it a SIGHUP or SIGINT; given default terminal settings this will happen when you type Ctrl\-C at it\&. It will also terminate on \*(Aqq\*(Aq
.SS "gegps"
.PP
This program collects fixes from
gpsd
and feeds them to a running instance of Google Earth for live location tracking\&.
.PP
\fB\-d DIR\fR, \fB\-\-kmldir DIR\fR
.RS 4
Specify the location of the Google Earth installation directory\&. If not specified, it defaults to the current directory\&.
.RE
.PP
\fB\-D LVL\fR, \fB\-\-debug LVL\fR
.RS 4
Sets the debug level; it is primarily for use by GPSD developers\&. It enables various progress messages to standard error\&.
.RE
.PP
\fB\-\-device DEVICE\fR
.RS 4
Connect to device DEVICE on gpsd host\&.
.RE
.PP
\fB\-\-host HOST\fR
.RS 4
Connect to gpsd on host HOST\&.
.RE
.PP
\fB\-i\fR, \fB\-\-initialize\fR
.RS 4
If you have the free (non\-subscription) version, start by running with the
\fB\-i\fR
option to drop a clue in the Google Earth installation directory, as \*(AqOpen_in_Google_Earth_RT_GPS\&.kml\*(Aq, then open that file in Places (File > Open\&.\&.\&.)\&. Run
gegps
in the normal way after that\&.
.RE
.PP
\fB\-\-port PORT\fR
.RS 4
Connect to gpsd on port PORT\&.
.RE
.SS "lcdgps"
.PP
A client that passes
gpsd
data to
lcdproc, turning your car computer into a very expensive and nearly feature\-free GPS receiver\&. Currently assumes a 4x40 LCD and writes data formatted to fit that size screen\&. Also displays 4\- or 6\-character Maidenhead grid square output\&.
.PP
\fB\-s\fR, \fB\-\-sleep\fR
.RS 4
Sleep for 10 seconds before starting\&.
.RE
.SH "ENVIRONMENT"
.PP
The environment variable
\fBGPSD_UNITS\fR
is checked if no unit system is specified on the command line\&. It may be set to \*(Aqi\*(Aq\&. \*(Aqimperial\*(Aq, \*(Aqm\*(Aq, \*(Aqmetric\*(Aq, or \*(Aqn\*(Aq, \*(Aqnautical\*(Aq\&.
.PP
\fBLC_MEASUREMENT\fR
and then
\fBLANG\fR
are checked if no unit system has been specified on the command line, or in
\fBGPSD_UNITS\fR\&. If the value is \*(AqC\*(Aq, \*(AqPOSIX\*(Aq, or begins with \*(Aqen_US\*(Aq the unit system is set to imperial\&. The default if no system has been selected defaults to metric\&.
.SH "SEE ALSO"
.PP
\fBgpsd\fR(8),
\fBlibgps\fR(3),
\fBlibgpsmm\fR(3),
\fBgpsfake\fR(1),
\fBgpsctl\fR(1),
\fBgpscat\fR(1),
\fBgpsprof\fR(1)\&.
\fBgpspipe\fR(1)\&.
\fBgpsmon\fR(1)\&.
\fBgpxlogger\fR(1)\&.
\fBxgps\fR(1)\&.
\fBxgpsspeed\fR(1)\&.
.SH "AUTHORS"
.PP
Remco Treffcorn, Derrick Brashear, Russ Nelson & Eric S\&. Raymond, Jeff Francis (cgps), Chen Wei
<weichen302@aol\&.com>
(gegps & xgpsspeed), Robin Wittler
<real@the\-real\&.org>
(xgpsspeed)\&.
.PP
This manual page by Eric S\&. Raymond
<esr@thyrsus\&.com>

1
man/gegps.1

@ -0,0 +1 @@
.so man1/cgps.1

1
man/gps.1

@ -0,0 +1 @@
.so man1/cgps.1

148
man/gps2udp.1

@ -0,0 +1,148 @@
'\" t
.\" Title: gps2udp
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 6 December 2020
.\" Manual: GPSD Documentation
.\" Source: The GPSD Project
.\" Language: English
.\"
.TH "GPS2UDP" "1" "6 December 2020" "The GPSD Project" "GPSD Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
gps2udp \- feed the take from gpsd to one or more aggregation sites
.SH "SYNOPSIS"
.HP \w'\fBgps2udp\fR\ 'u
\fBgps2udp\fR [\-\-ais] [\-\-count\ \fICOUNT\fR] [\-\-daemonize] [\-\-debug\ \fILVL\fR] [\-\-help] [\-\-json] [\-\-nmea] [\-\-tpv] [\-\-udp\ \fIHOST:PORT\fR] [\-a] [\-c\ \fICOUNT\fR] [\-d\ \fILVL\fR] [\-h] [\-j] [\-n] [\-t] [\-u\ \fIHOST:PORT\fR] [\-V] [\-V] [\fIserver\fR [\fI:port\fR [\fI:device\fR]]]
.SH "DESCRIPTION"
.PP
gps2udp
is a tool to connect to
gpsd
and output the received sentences to one or many UDP host:port destinations\&. This makes the program useful for feeding AIS information from
gpsd
to aishub, marinetraffic, shipfinder,\&.\&.\&.
.PP
gps2udp
does not require root privileges, and can be run concurrently with other tools connecting to the local
gpsd
without causing problems\&.
.PP
The output will consist of one or both of NMEA (\fB\-n\fR
option) or JSON (\fB\-j\fR
option)
gpsd
sentences\&. The output is sent to one or many destinations host through a UDP network socket (\fB\-u HOST:PORT\fR
options) \&.
.PP
Optionally a server, TCP/IP port number and remote device can be given\&. If omitted,
gps2udp
connects to localhost on the default port (2947) and watches all devices opened by
gpsd\&.
.PP
gps2udp
may be run as a daemon (\fB\-b\fR
option)\&.
.PP
gps2udp
is designed to run smoothly in background; it reconnects automatically to
gpsd
whenever it is restarted\&. For debugging purporses, there is an option to exit gracefully after a given count of packets (\fB\-c\fR
option)\&.
.SH "OPTIONS"
.PP
\fB\-?\fR, \fB\-h\fR, \fB\-\-help\fR
.RS 4
\-Print a usage message and exit\&.
.RE
.PP
\fB\-a\fR, \fB\-\-ais\fR
.RS 4
Send only AIS messages\&.
.RE
.PP
\fB\-b\fR, \fB\-\-daemon\fR
.RS 4
Causes
gps2udp
to run as a daemon\&.
.RE
.PP
\fB\-c COUNT\fR, \fB\-\-count COUNT\fR
.RS 4
Exit after COUNT sentences are sent\&.
.RE
.PP
\fB\-d LVL\fR, \fB\-\-debug LVL\fR
.RS 4
Set debug level to LVL\&. LVL = 0 prints nothing\&. LVL =1 prints sent packet on stdout\&. LVL =2 prints ignored packets\&.
.RE
.PP
\fB\-j\fR, \fB\-\-json\fR
.RS 4
Causes JSON sentences to be output\&.
.RE
.PP
\fB\-n\fR, \fB\-\-nmea\fR
.RS 4
Causes NMEA sentences to be output\&.
.RE
.PP
\fB\-t\fR, \fB\-\-tpv\fR
.RS 4
Only output TPV sentences\&. Implies \-\-json\&.
.RE
.PP
\fB\-u HOST:PORT\fR, \fB\-\-udp HOST:PORT\fR
.RS 4
UDP destination for output sentenses (up to five destinations)\&.
.RE
.PP
\fB\-v\fR, \fB\-V\fR, \fB\-\-version\fR
.RS 4
Prints the program version, then exit\&. \-v is deprecated December 2020\&.
.RE
.SH "EXAMPLE"
.PP
With a running
gpsd
accessible on the network
.PP
\fBgps2udp \-d 1 \-n \-u data\&.aishub\&.net:2222 \fR
will collect data from localhost:gpsd display them on stdout and send a copy to test aishub in NMEA format\&.
.PP
\fBgps2udp \-a \-n \-b \-u data\&.aishub\&.net:2222 \-u 5\&.9\&.207\&.224:5321 \-u 109\&.200\&.19\&.151:4001 fridu\&.net:2947\fR
will collect data from a remote gpsd located on fridu\&.net host, will filter AIS messages and send them to 3 destination (aishub, marinetraffic, shipfinder) in NMEA format, command is running in background mode
.SH "SEE ALSO"
.PP
\fBgpsd\fR(8),
\fBgps\fR(1),
\fBlibgps\fR(3),
\fBlibgpsmm\fR(3),
\fBgpsprof\fR(1),
\fBgpsfake\fR(1),
\fBgpsctl\fR(1),
\fBgpscat\fR(1)\&.
\fBgpsmon\fR(1)\&.
.SH "AUTHOR"
.PP
Fulup Ar Foll
<fulup@sinagot\&.net>\&.

104
man/gpscat.1

@ -0,0 +1,104 @@
'\" t
.\" Title: gpscat
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 6 December 2020
.\" Manual: GPSD Documentation
.\" Source: The GPSD Project
.\" Language: English
.\"
.TH "GPSCAT" "1" "6 December 2020" "The GPSD Project" "GPSD Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
gpscat \- dump the output from a GPS
.SH "SYNOPSIS"
.HP \w'\fBgpscat\fR\ 'u
\fBgpscat\fR [\-?] [\-\-debug\ \fILVL\fR] [\-\-help] [\-\-packetizer] [\-\-speed\ \fISPEED\fR] [\-\-typeflag] [\-\-version] [\-D\ \fILVL\fR] [\-h] [\-p] [\-s\ \fISPEED\fR] [\-t] [\-V] \fIfile\-or\-serial\-port\fR
.SH "DESCRIPTION"
.PP
gpscat
is a simple program for logging and packetizing GPS data streams\&. It takes input from a specified file or serial device (presumed to have a GPS attached) and reports to standard output\&. The program runs until end of input or it is interrupted by ^C or other means\&. It does not terminate on a bad packet; this is intentional\&.
.PP
In raw mode (the default)
gpscat
simply dumps its input to standard output\&. Nonprintable characters other than ASCII whitespace are rendered as hexadecimal string escapes\&.
.PP
In packetizing mode,
gpscat
uses the same code as
\fBgpsd\fR(8)\*(Aqs packet sniffer to break the input into packets\&. Packets are reported one per line; line breaks in the packets themselves are escaped\&.
.PP
This program is useful as a sanity checker when examining a new device\&. It can be used as a primitive NMEA logger, but beware that (a) interrupting it likely to cut off output in mid\-sentence, and (b) to avoid displaying incomplete NMEA sentences right up next to shell prompts that often contain a $, raw mode always emits an extra final linefeed\&.
.PP
Also, be aware that packetizing mode will produce useless results \(em probably consuming the entirety of input and appearing to hang \(em if it is fed data that is not a sequence of packets of one of the known types\&.
.PP
The program accepts the following options:
.PP
\fB\-?\fR, \fB\-h\fR, \fB\-\-help\fR
.RS 4
Display program usage and exit\&.
.RE
.PP
\fB\-D LVL\fR, \fB\-\-debug LVL\fR
.RS 4
In packetizer mode, enable progress messages from the packet getter\&. Probably only of interest to developers testing packet getter changes\&. Higher arguments to
\fB\-D\fR
produce more output\&.
.RE
.PP
\fB\-p\fR, \fB\-\-packetizer\fR
.RS 4
Invoke packetizer mode\&.
.RE
.PP
\fB\-s SPEED\fR, \fB\-\-speed SPEED\fR
.RS 4
Set the port\*(Aqs baud rate (and optionally its parity and stop bits) to SPEED before reading\&. Argument should begin with one of the normal integer baud rates (300, 1200, 4800, 9600, 19200, 38400, etc\&.)\&. It may be followed by an optional suffix [NOE][12] to set parity (None, Odd, Even) and stop bits (1 or 2)\&.
.sp
Specifying
\fB\-s 4800N1\fR
is frequently helpful with unknown devices\&.
.RE
.PP
\fB\-t\fR, \fB\-\-typeflag\fR
.RS 4
Invoke packetizer mode, with the packet type and length (in parentheses) reported before a colon and space on each line\&.
.RE
.PP
\fB\-V\fR, \fB\-\-version\fR
.RS 4
Display program version and exit\&.
.RE
.SH "SEE ALSO"
.PP
\fBgpsd\fR(8),
\fBgps\fR(1),
\fBlibgps\fR(3),
\fBlibgpsmm\fR(3),
\fBgpsfake\fR(1)\&.
\fBgpsprof\fR(1),
\fBgpsctl\fR(1),
\fBgpsdctl\fR(8),
\fBgpsmon\fR(1)\&.
.SH "AUTHOR"
.PP
Eric S\&. Raymond
<esr@thyrsus\&.com>\&.

308
man/gpscsv.1

@ -0,0 +1,308 @@
'\" t
.\" Title: gpscsv
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 7 December 2020
.\" Manual: GPSD Documentation
.\" Source: The GPSD Project
.\" Language: English
.\"
.TH "GPSCSV" "1" "7 December 2020" "The GPSD Project" "GPSD Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
gpscsv \- dump the JSON output from gpsd as CSV
.SH "SYNOPSIS"
.HP \w'\fBgpscsv\fR\ 'u
\fBgpscsv\fR [\-?] [\-\-class\fI\ MCLASS\fR] [\-\-count\fI\ COUNT\fR] [\-\-cvt\-isotime] [\-\-debug\fI\ LVL\fR] [\-\-device\fI\ DEVICE\fR] [\-\-fields\fI\ FIELDS\fR] [\-\-file\ \fIFILE\fR] [\-\-header\fI\ HEADER\fR] [\-\-help] [\-\-host\fI\ HOST\fR] [\-\-port\fI\ PORT\fR] [\-\-seconds\fI\ FIELDS\fR] [\-\-separator\fI\ SEPARATOR\fR] [\-\-version] [\-c\fI\ MCLASS\fR] [\-D\ \fI\ LVL\fR] [\-f\ \fI\ FIELDS\fR] [\-h] [\-n\fI\ COUNT\fR] [\-V] [\-x\fI\ FIELDS\fR] \fI[host[:port[:device]]]\fR
.SH "DESCRIPTION"
.PP
gpscsv
is a simple Python program for reading a
gpsd
JSON data streams and outputting them in Comma Separated Values (CSV) format\&. It takes input from a specified
gpsd
and reports to standard output\&. The program runs until the
gpsd
dies, "\fB\-n COUNT\fR" messages are processed, "\fB\-x SECONDS\fR" have passed, or it is interrupted by ^C or other means\&.
.PP
One good use of
gpscsv
is to create CSV files for use with the
gnuplot
program\&.
.SH "OPTIONS"
.PP
The program accepts the following options:
.PP
\fB\-?\fR, \fB\-h\fR, \fB\-\-help\fR
.RS 4
Show help information and exit\&.
.RE
.PP
\fB\-c MCLASS\fR, \fB\-\-class MCLASS\fR
.RS 4
Select the JSON class messages of type MCLASS\&. Default is TPV\&. \&.
.RE
.PP
\fB\-\-cvt\-isotime\fR
.RS 4
Convert fields named "time" from ISO time to UNIX time\&.
.RE
.PP
\fB\-D LVL\fR, \fB\-\-debug LVL\fR
.RS 4
Set debug level to LVL\&. Default 0\&. Higher arguments than 0 produce more debug output\&.
.RE
.PP
\fB\-\-device DEVICE\fR
.RS 4
The DEVICE on the
gpsd
to connect to\&. Defaults to all\&.
.RE
.PP
\fB\-f FIELDS\fR, \fB\-fields FIELDS\fR
.RS 4
The FIELDS from the JSON message to dump to the output\&. Set FIELD to empty (\*(Aq\*(Aq) for all fields Default varies by CLASS\&.
.RE
.PP
\fB\-\-file FILE\fR
.RS 4
Read JSON from FILE instead of from gpsd\&.\&.
.RE
.PP
\fB\-\-header HEADER\fR
.RS 4
Set header style to HEADER\&. 0 for no header, 1 output fields as header, 2 send fields as a comment (\*(Aq#\*(Aq)\&. Defaults to 1\&.
.RE
.PP
\fB\-\-host HOST\fR
.RS 4
Connect to the
gpsd
on HOST\&. Defaults to localhost\&.
.RE
.PP
\fB\-n COUNT\fR, \fB\-\-count COUNT\fR
.RS 4
Exit after outputting COUNT records\&. Set COUNT to 0 to disable\&. Default is 0
.RE
.PP
\fB\-\-port PORT\fR
.RS 4
Use PORT to connect to
gpsd\&. Defaults to 2947\&.
.RE
.PP
\fB\-\-separator SEPARATOR\fR
.RS 4
Use SEPARATOR as the field separator\&. Default separator is a comma (\*(Aq,\*(Aq)\&.
.RE
.PP
\fB\-V\fR, \fB\-\-version\fR
.RS 4
Show
gpscsv
version, and exit\&.
.RE
.PP
\fB\-x SECONDS\fR, \fB\-\-seconds SECONDS\fR
.RS 4
Exit after SECONDS number of seconds have passed\&. Set SECONDS to 0 to disable\&. Default is 0
.RE
.SH "EXAMPLES"
.PP
Some basic examples, do them in exact order shown:
.PP
Grab 100 samples of time,lat,lon,altHAE:
.sp
.if n \{\
.RS 4
.\}
.nf
$ gpscsv \-n 100 \-\-cvt\-isotime > tpv\&.dat
.fi
.if n \{\
.RE
.\}
.PP
Grab 100 samples of time,epx,epy,epv,eph,sep
.sp
.if n \{\
.RS 4
.\}
.nf
$ gpscsv \-n 100 \-\-cvt\-isotime \-f time,epx,epy,epv,eph,sep > ep\&.dat
.fi
.if n \{\
.RE
.\}
.PP
Grab 100 samples of time,xdop,ydop,vdop,tdop,hdop,gdop,pdop
.sp
.if n \{\
.RS 4
.\}
.nf
$ gpscsv \-n 100 \-\-cvt\-isotime \-c SKY > sky\&.dat
.fi
.if n \{\
.RE
.\}
.PP
Grab 100 samples of time,nSat,uSat
.sp
.if n \{\
.RS 4
.\}
.nf
$ gpscsv \-n 100 \-\-cvt\-isotime \-c SKY \-f time,nSat,uSat > sat\&.dat
.fi
.if n \{\
.RE
.\}
.PP
start gnuplot in interactive mode:
.sp
.if n \{\
.RS 4
.\}
.nf
$ gnuplot
.fi
.if n \{\
.RE
.\}
.PP
Some gnuplot housekeeping:
.sp
.if n \{\
.RS 4
.\}
.nf
# this are csv files
gnuplot> set datafile separator \*(Aq,\*(Aq
# use the first line as title
gnuplot> set key autotitle columnhead
# X axis is UNIT time in seconds\&.
gnuplot> set xdata time
gnuplot> set timefmt "%s"
.fi
.if n \{\
.RE
.\}
.PP
Now to plot time vs latitude:
.sp
.if n \{\
.RS 4
.\}
.nf
gnuplot> plot \*(Aqtpv\&.dat\*(Aq using 1:2
.fi
.if n \{\
.RE
.\}
.PP
Then to plot longitude and altHAE, in separate plots:
.sp
.if n \{\
.RS 4
.\}
.nf
gnuplot> plot \*(Aqtpv\&.dat\*(Aq using 1:3
gnuplot> plot \*(Aqtpv\&.dat\*(Aq using 1:4
.fi
.if n \{\
.RE
.\}
.PP
Put both latitude and longitude on one plot:
.sp
.if n \{\
.RS 4
.\}
.nf
gnuplot> set y2tics
gnuplot> plot \*(Aqtpv\&.dat\*(Aq using 1:2, \*(Aq\*(Aq using 1:3 axes x1y2
.fi
.if n \{\
.RE
.\}
.PP
Plot epx, epy, epv, eph, and sep in one plot:
.sp
.if n \{\
.RS 4
.\}
.nf
gnuplot> plot \*(Aqep\&.dat\*(Aq using 1:2, \*(Aq\*(Aq using 1:3, \e
\*(Aq\*(Aq using 1:4, \*(Aq\*(Aq using 1:5, \*(Aq\*(Aq using 1:6
.fi
.if n \{\
.RE
.\}
.PP
Plot all the DOPs on one plot:
.sp
.if n \{\
.RS 4
.\}
.nf
gnuplot> plot \*(Aqsky\&.dat\*(Aq using 1:2, \*(Aq\*(Aq using 1:3, \*(Aq\*(Aq using 1:4, \e
\*(Aq\*(Aq using 1:5, \*(Aq\*(Aq using 1:6, \*(Aq\*(Aq using 1:7, \*(Aq\*(Aq using 1:8
.fi
.if n \{\
.RE
.\}
.PP
Plot nSat and uSat together:
.sp
.if n \{\
.RS 4
.\}
.nf
gnuplot> plot \*(Aqsat\&.dat\*(Aq using 1:2, \*(Aq\*(Aq using 1:3
.fi
.if n \{\
.RE
.\}
.PP
Lat/lon scatter plot:
.sp
.if n \{\
.RS 4
.\}
.nf
# x is no longer time
gnuplot> set xdata
gnuplot> plot \*(Aqtpv\&.dat\*(Aq using 3:2 title \*(Aqfix\*(Aq
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\fBgpsd\fR(8),
.SH "AUTHOR"
.PP
Gary E\&. Miller
<gem@rellim\&.com>\&.

183
man/gpsctl.1

@ -0,0 +1,183 @@
'\" t
.\" Title: gpsctl
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 6 December 2020
.\" Manual: GPSD Documentation
.\" Source: The GPSD Project
.\" Language: English
.\"
.TH "GPSCTL" "1" "6 December 2020" "The GPSD Project" "GPSD Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
gpsctl \- control the modes of a GPS
.SH "SYNOPSIS"
.HP \w'\fBgpsctl\fR\ 'u
\fBgpsctl\fR [\-? | \-\-binary | \-\-nmea | \-\-reset] [\-\-debug\ \fILVL\fR] [\-\-direct] [\-\-echo] [\-\-help] [\-\-list] [\-\-rate] [\-\-rmshm] [\-\-rate\ \fIrate\fR] [\-\-ship\ \fIcontrol\fR] [\-\-speed\ \fIspeed\fR] [\-\-timeout\ \fIdevicetype\fR] [\-\-version] [\-b | \-n | \-r] [\-D\ \fILVL\fR] [\-c\ \fIrate\fR] [\-e] [\-f] [\-h] [\-l] [\-R] [\-s\ \fIspeed\fR] [\-t\ \fIdevicetype\fR] [\-V] [\-x\ \fIcontrol\fR] [\fIserial\-port\fR]
.SH "DESCRIPTION"
.PP
gpsctl
can switch a dual\-mode GPS between NMEA and vendor\-binary modes\&. It can also be used to set the device baud rate\&. Note: Not all devices have these capabilities\&.
.PP
If you have only one GPS attached to your machine, and gpsd is running, it is not necessary to specify the device;
gpsctl
does its work through
gpsd, which will locate it for you\&.
.PP
When
gpsd
is not running, the device specification is required, and you will need to be running as root or be a member of the device\*(Aqs owning group in order to have write access to the device\&. On many Unix variants the owning group will be named \*(Aqdialout\*(Aq\&.
.PP
The program accepts the following options:
.PP
\fB\-?\fR, \fB\-h\fR, \fB\-\-help\fR
.RS 4
Display program usage and exit\&.
.RE
.PP
\fB\-b\fR, \fB\-\-binary\fR
.RS 4
Put the GPS into native (binary) mode\&.
.RE
.PP
\fB\-c RATE\fR, \fB\-\-rate RATE\fR
.RS 4
Change the GPS\*(Aqs cycle time\&. Units are seconds\&. Note, most GPSes have a fixed cycle time of 1 second\&.
.RE
.PP
\fB\-D LVL\fR, \fB\-\-debug LVL\fR
.RS 4
Set level of debug messages\&.
.RE
.PP
\fB\-e\fR, \fB\-\-echo\fR
.RS 4
Generate the packet from any other arguments specified and ship it to standard output instead of the device\&. This switch can be used with the
\fB\-t\fR
option without specifying a device\&. Note: the packet data for a binary prototype will be raw, not ASCII\-ized in any way\&.
.RE
.PP
\fB\-f\fR, \fB\-\-force\fR
.RS 4
Force low\-level access (not through the daemon)\&.
.RE
.PP
\fB\-l\fR, \fB\-\-list\fR
.RS 4
List a table showing which option switches can be applied to which device types, and exit\&.
.RE
.PP
\fB\-n\fR, \fB\-\-nmea\fR
.RS 4
Put GPS into NMEA mode\&.
.RE
.PP
\fB\-r\fR, \fB\-\-reset\fR
.RS 4
Reset the GPS\&. Device port and type must be specified\&.
.RE
.PP
\fB\-R\fR, \fB\-\-rmshm\fR
.RS 4
Remove the GPSD shared\-memory segment used for SHM export\&. This option will normally only be of interest to GPSD developers\&.
.RE
.PP
\fB\-s SPEED\fR, \fB\-\-speed SPEED\fR
.RS 4
Set the baud rate at which the GPS emits packets\&.
.sp
Use this option with caution\&. On USB and Bluetooth GPSes it is also possible for serial mode setting to fail either because the serial adaptor chip does not support non\-8N1 modes or because the device firmware does not properly synchronize the serial adaptor chip with the UART on the GPS chipset when the speed changes\&. These failures can hang your device, possibly requiring a GPS power cycle or (in extreme cases) physically disconnecting the NVRAM backup battery\&.
.RE
.PP
\fB\-t TYPE\fR, \fB\-\-type TYPE\fR
.RS 4
Force the device type\&.
.RE
.PP
\fB\-T TIMEOUT\fR, \fB\-\-timeout TIMEOUT\fR
.RS 4
Change the sampling timeout\&. Defaults to 8 seconds, which should always be sufficient to get an identifying packet from a device emitting at the normal rate of 1 per second\&.
.RE
.PP
\fB\-V\fR, \fB\-\-version\fR
.RS 4
Display program version and exit\&.
.RE
.PP
\fB\-x STR\fR, \fB\-\-ship STR\fR
.RS 4
Send a specified control string to the GPS;
gpsctl
will provide packet headers and trailers and checksum as appropriate for binary packet types, and whatever checksum and trailer is required for text packet types\&. (You must include the leading $ for NMEA packets\&.) When sending to a UBX device, the first two bytes of the string supplied will become the message class and type, and the remainder the payload\&. When sending to a Navcom NCT or Trimble TSIP device, the first byte is interpreted as the command ID and the rest as payload\&. When sending to a Zodiac device, the first two bytes are used as a message ID of type little\-endian short, and the remainder as payload in byte pairs interpreted as little\-endian short\&. For all other supported binary GPSes (notably including SiRF) the string is taken as the entire message payload and wrapped with appropriate header, trailer and checksum bytes\&. C\-style backslash escapes in the string, notably \exNN for hex, will be interpreted; additionally, \ee will be replaced with ESC\&. This switch implies
\fB\-f\fR\&.
.RE
.PP
The argument of the forcing option,
\fB\-t\fR, should be a string which is contained in exactly one of the known driver names; for a list, do
\fBgpsctl \-l\fR\&.
.PP
Forcing the device type behaves somewhat differently depending on whether this tool is going through the daemon or not\&. In high\-level mode, if the device that daemon selects for you doesn\*(Aqt match the driver you specified,
gpsctl
exits with a warning\&. (This may be useful in scripts\&.)
.PP
In low\-level mode, if the device identifies as a Generic NMEA, use the selected driver instead\&. This will be useful if you have a GPS device of known type that is in NMEA mode and not responding to probes\&. (This option was originally implemented for talking to SiRFStar I chips, which don\*(Aqt respond to the normal SiRF ID probe\&.)
.PP
If no options are given, the program will display a message identifying the GPS type of the selected device and exit\&.
.PP
Reset (\fB\-r\fR) operations must stand alone; others can be combined\&. Multiple options will be executed in this order: mode changes (\fB\-b\fR
and \-\fBn\fR) first, speed changes (\fB\-s\fR) second, and control\-string sends (\fB\-c\fR) last\&.
.SH "ENVIRONMENT VARIABLES"
.PP
By setting the environment variable
\fBGPSD_SHM_KEY\fR, you can control the key value used to designate the shared\-memory segment removed with the \-R option\&. This will be useful mainly when isolating test instances of
gpsd
from production ones\&.
.SH "EXAMPLES"
.PP
\fBgpsctl /dev/ttyUSB0\fR
.RS 4
Attempt to identify the device on USB serial device 0\&. Time out after the default number of seconds\&. Adding the
\fB\-f\fR
will force low\-level access and suppress the normal complaint when this tool can\*(Aqt find a GPSD to work through\&.
.RE
.PP
gpsctl \-f \-n \-s 9600 /dev/ttyUSB0
.RS 4
Use low\-level operations (not going through a gpsd instance) to switch a GPS to NMEA mode at 9600bps\&. The tool will identify the GPS type itself\&.
.RE
.SH "BUGS"
.PP
SiRF GPSes can only be identified by the success of an attempt to flip them into SiRF binary mode\&. Thus, the process of probing one of these running in NMEA will change its behavior\&.
.PP
Baud rate and mode changes work in direct mode but are not reliable in client mode\&. This will be fixed in a future release\&.
.SH "SEE ALSO"
.PP
\fBgpsd\fR(8),
\fBgpsdctl\fR(8),
\fBgps\fR(1),
\fBlibgps\fR(3),
\fBlibgpsmm\fR(3),
\fBgpsprof\fR(1),
\fBgpsfake\fR(1)\&.
.SH "AUTHOR"
.PP
Eric S\&. Raymond
<esr@thyrsus\&.com>\&.

655
man/gpsd.8

@ -0,0 +1,655 @@
'\" t
.\" Title: gpsd
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 6 December 2020
.\" Manual: GPSD Documentation
.\" Source: The GPSD Project
.\" Language: English
.\"
.TH "GPSD" "8" "6 December 2020" "The GPSD Project" "GPSD Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
gpsd \- interface daemon for GPS receivers
.SH "SYNOPSIS"
.HP \w'\fBgpsd\fR\ 'u
\fBgpsd\fR [\-?] [\-\-badtime] [\-\-debug\ \fILVL\fR] [\-\-drivers] [\-\-foreground] [\-\-framing\ \fIFRAMING\fR] [\-\-help] [\-\-listenany] [\-\-nowait] [\-\-pidfile\ \fIFILE\fR] [\-\-port\ \fIPORT\fR] [\-\-sockfile\ \fISOCK\fR] [\-\-speed\ \fISPEED\fR] [\-\-verbose] [\-b] [\-D\ \fIdebuglevel\fR] [\-F\ \fIcontrol\-socket\fR] [\-f\ \fIframing\fR] [\-G] [\-h] [\-l] [\-n] [\-N] [\-P\ \fIpidfile\fR] [\-r] [\-S\ \fIlistener\-port\fR] [\-s\ \fIspeed\fR] [\-V] [[\fIsource\-name\fR]...]
.SH "QUICK START"
.PP
If you have a GPS attached on the lowest\-numbered USB port of a Linux system, and want to read reports from it on TCP/IP port 2947, it will normally suffice to do this:
.sp
.if n \{\
.RS 4
.\}
.nf
gpsd /dev/ttyUSB0
.fi
.if n \{\
.RE
.\}
.PP
For the lowest\-numbered serial port:
.sp
.if n \{\
.RS 4
.\}
.nf
gpsd /dev/ttyS0
.fi
.if n \{\
.RE
.\}
.PP
Change the device number as appropriate if you need to use a different port\&. Command\-line flags enable verbose logging, a control port, and other optional extras but should not be needed for basic operation; the one exception, on very badly designed hardware, might be
\fB\-b\fR
(which see)\&.
.PP
On Linux systems supporting udev,
gpsd
is normally started automatically when a USB plugin event fires (if it is not already running) and is handed the name of the newly active device\&. In that case no invocation is required at all\&.
.PP
For your initial tests set your GPS hardware to speak NMEA, as
gpsd
is guaranteed to be able to process that\&. If your GPS has a native or binary mode with better performance that
gpsd
knows how to speak,
gpsd
will autoconfigure that mode\&.
.PP
You can verify correct operation by first starting
gpsd
and then
xgps, the X windows test client\&.
.PP
If you have problems, the GPSD project maintains a FAQ to assist troubleshooting\&.
.SH "DESCRIPTION"
.PP
gpsd
is a monitor daemon that collects information from GPSes, differential\-GPS radios, or AIS receivers attached to the host machine\&. Each GPS, DGPS radio, or AIS receiver is expected to be direct\-connected to the host via a USB or RS232C serial device\&. The serial device may be specified to
gpsd
at startup, or it may be set via a command shipped down a local control socket (e\&.g\&. by a USB hotplug script)\&. Given a GPS device by either means,
gpsd
discovers the correct port speed and protocol for it\&.
.PP
gpsd
should be able to query any GPS that speaks either the standard textual NMEA 0183 protocol, or the (differing) extended NMEA dialects used by MKT\-3301, iTrax, Motorola OnCore, Sony CXD2951, and Ashtech/Thales devices\&. It can also interpret the binary protocols used by EverMore, Garmin, Navcom, Rockwell/Zodiac, SiRF, Trimble, and u\-blox ANTARIS devices\&. Under Linux it can read NMEA2000 packets through the kernel CAN socket\&. It can read heading and attitude information from the Oceanserver 5000 or TNT Revolution digital compasses\&.
.PP
The GPS reporting formats supported by your instance of
gpsd
may differ depending on how it was compiled; general\-purpose versions support many, but it can be built with protocol subsets down to a singleton for use in constrained environments\&. For a list of the GPS protocols supported by your instance, see the output of
\fBgpsd \-l\fR
.PP
gpsd
effectively hides the differences among the GPS types it supports\&. It also knows about and uses commands that tune these GPSes for lower latency\&. By using
gpsd
as an intermediary, applications avoid contention for serial devices\&.
.PP
gpsd
can use differential\-GPS corrections from a DGPS radio or over the net, from a ground station running a DGPSIP server or a Ntrip broadcaster that reports RTCM\-104 data; this will shrink position errors by roughly a factor of four\&. When
gpsd
opens a serial device emitting RTCM\-104, it automatically recognizes this and uses the device as a correction source for all connected GPSes that accept RTCM corrections (this is dependent on the type of the GPS; not all GPSes have the firmware capability to accept RTCM correction packets)\&. See
the section called \(lqACCURACY\(rq
and
the section called \(lqFILES\(rq
for discussion\&.
.PP
Client applications will communicate with
gpsd
via a TCP/IP port, port 2947 by default\&. Both IPv4 and IPv6 connections are supported and a client may connect via either\&.
.PP
The program accepts the following options:
.PP
\fB\-?\fR, \fB\-h\fR, \fB\-\-\-help\fR
.RS 4
Display help message and terminate\&.
.RE
.PP
\fB\-b\fR, \fB\-\-readonly\fR
.RS 4
Broken\-device\-safety mode, otherwise known as read\-only mode\&. A few bluetooth and USB receivers lock up or become totally inaccessible when probed or reconfigured; see the hardware compatibility list on the GPSD project website for details\&. This switch prevents gpsd from writing to a receiver\&. This means that
gpsd
cannot configure the receiver for optimal performance, but it also means that
gpsd
cannot break the receiver\&. A better solution would be for Bluetooth to not be so fragile\&. A platform independent method to identify serial\-over\-Bluetooth devices would also be nice\&.
.RE
.PP
\fB\-D LVL\fR, \fB\-\-debug LVL\fR
.RS 4
Set debug level\&. Default is 0\&. At debug levels 2 and above,
gpsd
reports incoming sentence and actions to standard error if
gpsd
is in the foreground (\-N) or to syslog if in the background\&.
.RE
.PP
\fB\-F FILE\fR, \fB\-\-sockfile FILE\fR
.RS 4
Create a control socket for device addition and removal commands\&. Default is None\&. You must specify a valid pathname on your local filesystem; this will be created as a Unix\-domain socket to which you can write commands that edit the daemon\*(Aqs internal device list\&.
.RE
.PP
\fB\-f FRAME\fR, \fB\-\-framing FRAME\fR
.RS 4
Fix the framing to the GNSS device\&. The framing parameter is of the form: [78][ENO][012]\&. Most GNSS are 8N1\&. Some Trimble default to 8O1\&. The default is to search for the correct framing\&.
.RE
.PP
\fB\-G\fR, \fB\-\-listenany\fR
.RS 4
This flag causes
gpsd
to listen on all addresses (INADDR_ANY) rather than just the loop back (INADDR_LOOPBACK) address\&. For the sake of privacy and security, TPV information is now private to the local machine until the user makes an effort to expose this to the world\&.
.RE
.PP
\fB\-l\fR, \fB\-\-drivers\fR
.RS 4
List all drivers compiled into this
gpsd
instance\&. The letters to the left of each driver name are the
gpsd
control commands supported by that driver\&. Then exit
.RE
.PP
\fBn\fR, \fB\-\-nowait\fR
.RS 4
Don\*(Aqt wait for a client to connect before polling whatever GPS is associated with it\&. Some RS232 GPSes wait in a standby mode (drawing less power) when the host machine is not asserting DTR, and some cellphone and handheld embedded GPSes have similar behaviors\&. Accordingly, waiting for a watch request to open the device may save battery power\&. (This capability is rare in consumer\-grade devices)\&. You should use this option if you plan to use gpsd to provide reference clock information to ntpd through a memory\-shared segment\&.
.RE
.PP
\fB\-N\fR, \fB\-\-foreground\fR
.RS 4
Don\*(Aqt daemonize; run in foreground\&. This switch is mainly useful for debugging\&.
.RE
.PP
\fB\-p\fR, \fB\-\-passive\fR
.RS 4
Passive mode\&. Do not autoconfigure the receiver, but allow manual configuration changes\&.
.RE
.PP
\fB\-P FILE\fR, \fB\-\-pidfile FILE\fR
.RS 4
Specify the name and path to record the daemon\*(Aqs process ID\&.
.RE
.PP
\fB\-r\fR, \fB\-\-badtime\fR
.RS 4
Use GPS time even with no current fix\&. Some GPSs have battery powered Real Time Clocks (RTC\*(Aqs) built in, making them a valid time source even before a fix is acquired\&. This can be useful on a Raspberry Pi, or other device that has no battery powered RTC, and thus has no valid time at startup\&.
.RE
.PP
\fB\-\-port PORT\fR, \fB\-S PORT\fR
.RS 4
Set TCP/IP port on which to listen for GPSD clients (default is 2947)\&.
.RE
.PP
\fB\-s SPEED\fR, \fB\-\-speed SPEED\fR
.RS 4
Fix the serial port speed to the GNSS device\&. Allowed speeds are: 4800, 9600, 19200, 38400, 57600, 115200, 230400, and 460800\&. The default is to autobaud\&. Note that some devices with integrated USB ignore port speed\&.
.RE
.PP
\fB\-V\fR, \fB\-\-version\fR
.RS 4
Dump version and exit\&.
.RE
.PP
Arguments are interpreted as the names of data sources\&. Normally, a data source is the device pathname of a local device from which the daemon may expect GPS data\&. But there are three other special source types recognized, for a total of four:
.PP
Local serial or USB device
.RS 4
A normal Unix device name of a serial or USB device to which a sensor is attached\&. Example:
/dev/ttyUSB0\&.
.RE
.PP
Local PPS device
.RS 4
A normal Unix device name of a PPS device to which a PPS source is attached\&. The device name must start with "/dev/pps" and a local serial or USB GPS device must also be available\&. Example:
/dev/pps0\&.
.RE
.PP
TCP feed
.RS 4
A URI with the prefix "tcp://", followed by a hostname, a colon, and a port number\&. The daemon will open a socket to the indicated address and port and read data packets from it, which will be interpreted as though they had been issued by a serial device\&. Example:
tcp://data\&.aishub\&.net:4006\&.
.RE
.PP
UDP feed
.RS 4
A URI with the prefix "udp://", followed by a hostname, a colon, and a port number\&. The daemon will open a socket listening for UDP datagrams arriving in the indicated address and port, which will be interpreted as though they had been issued by a serial device\&. Example:
udp://127\&.0\&.0\&.1:5000\&.
.RE
.PP
Ntrip caster
.RS 4
A URI with the prefix "ntrip://" followed by the name of an Ntrip caster (Ntrip is a protocol for broadcasting differential\-GPS fixes over the net)\&. For Ntrip services that require authentication, a prefix of the form "username:password@" can be added before the name of the Ntrip broadcaster\&. For Ntrip service, you must specify which stream to use; the stream is given in the form "/streamname"\&. An example DGPSIP URI could be "dgpsip://dgpsip\&.example\&.com" and a Ntrip URI could be "ntrip://foo:bar@ntrip\&.example\&.com:80/example\-stream"\&. Corrections from the caster will be sent to each attached GPS with the capability to accept them\&.
.RE
.PP
DGPSIP server
.RS 4
A URI with the prefix "dgpsip://" followed by a hostname, a colon, and an optional colon\-separated port number (defaulting to 2101)\&. The daemon will handshake with the DGPSIP server and read RTCM2 correction data from it\&. Corrections from the server will be set to each attached GPS with the capability to accept them\&. Example:
dgpsip://dgps\&.wsrcc\&.com:2101\&.
.RE
.PP
Remote gpsd feed
.RS 4
A URI with the prefix "gpsd://", followed by a hostname and optionally a colon and a port number (if the port is absent the default
gpsd
port will be used)\&. Then followed optionally by a second colon and the remote device name The daemon will open a socket to the indicated address and port and emulate a
gpsd
client, collecting JSON reports from the remote
gpsd
instance that will be passed to local clients\&. Example:
gpsd://gpsd\&.io:2947:/dev/ttyAMA0\&.
.RE
.PP
NMEA2000 CAN data
.RS 4
A URI with the prefix "nmea2000://", followed by a CAN devicename\&. Only Linux socket CAN interfaces are supported\&. The interface must be configured to receive CAN messages before
gpsd
can be started\&. If there is more than one unit on the CAN bus that provides GPS data,
gpsd
chooses the unit from which a GPS message is first seen\&. Example:
nmea2000://can0\&.
.RE
.PP
(The "ais:://" source type supported in some older versions of the daemon has been retired in favor of the more general "tcp://"\&.)
.PP
Additionally, two serial device names have a side effect:
.PP
/dev/ttyAMA0
.RS 4
The UART device on a Raspberry Pi\&. Has the side effect of opening /dev/pps0 for RFC2783 1PPS data\&.
.RE
.PP
/dev/gpsd0
.RS 4
Generic GPS device 0\&. Has the side effect of opening /dev/pps0 for RFC2783 1PPS data\&.
.RE
.PP
Note, however, that if /dev/pps0 is the fake "ktimer" PPS, then /dev/pps1 will be used instead\&.
.PP
Internally, the daemon maintains a device pool holding the pathnames of devices and remote servers known to the daemon\&. Initially, this list is the list of device\-name arguments specified on the command line\&. That list may be empty, in which case the daemon will have no devices on its search list until they are added by a control\-socket command (see
the section called \(lqGPS DEVICE MANAGEMENT\(rq
for details on this)\&. Daemon startup will abort with an error if neither any devices nor a control socket are specified\&.
.PP
When a device is activated (i\&.e\&. a client requests data from it), gpsd attempts to execute a hook from
/etc/gpsd/device\-hook
with first command line argument set to the pathname of the device and the second to
\fBACTIVATE\fR\&. On deactivation, it does the same passing
\fBDEACTIVATE\fR
for the second argument\&.
.PP
gpsd
can export data to client applications in three ways: via a sockets interface, via a shared\-memory segment, and via D\-Bus\&. The next three major sections describe these interfaces\&.
.SH "THE SOCKET INTERFACE"
.PP
Clients may communicate with the daemon via textual request and responses over a socket\&. It is a bad idea for applications to speak the protocol directly: rather, they should use the
libgps
client library and take appropriate care to conditionalize their code on the major and minor protocol version symbols\&.
.PP
The request\-response protocol for the socket interface is fully documented in
\fBgpsd_json\fR(5)\&.
.SH "SHARED\-MEMORY AND DBUS INTERFACES"
.PP
gpsd
has two other (read\-only) interfaces\&.
.PP
Whenever the daemon recognizes a packet from any attached device, it writes the accumulated state from that device to a shared memory segment\&. The C and C++ client libraries shipped with GPSD can read this segment\&. Client methods, and various restrictions associated with the read\-only nature of this interface, are documented at
\fBlibgps\fR(3)\&. The shared\-memory interface is intended primarily for embedded deployments in which
gpsd
monitors a single device, and its principal advantage is that a daemon instance configured with shared memory but without the sockets interface loses a significant amount of runtime weight\&.
.PP
The daemon may be configured to emit a D\-Bus signal each time an attached device delivers a fix\&. The signal path is
path /org/gpsd, the signal interface is "org\&.gpsd", and the signal name is "fix"\&. The signal payload layout is as follows:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&1.\ \&Satellite object
.TS
allbox tab(:);
lB lB.
T{
Type
T}:T{
.PP
Description
T}
.T&
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l.
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Time (seconds since Unix epoch)
T}
T{
DBUS_TYPE_INT32
T}:T{
.PP
mode
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Time uncertainty (seconds)\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Latitude in degrees\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Longitude in degrees\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Horizontal uncertainty in meters, 95% confidence\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Altitude MSL in meters\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Altitude uncertainty in meters, 95% confidence\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Course in degrees from true north\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Course uncertainty in meters, 95% confidence\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Speed, meters per second\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Speed uncertainty in meters per second, 95% confidence\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Climb, meters per second\&.
T}
T{
DBUS_TYPE_DOUBLE
T}:T{
.PP
Climb uncertainty in meters per second, 95% confidence\&.
T}
T{
DBUS_TYPE_STRING
T}:T{
.PP
Device name
T}
.TE
.sp 1
.SH "GPS DEVICE MANAGEMENT"
.PP
gpsd
maintains an internal list of GPS devices (the "device pool")\&. If you specify devices on the command line, the list is initialized with those pathnames; otherwise the list starts empty\&. Commands to add and remove GPS device paths from the daemon\*(Aqs device list must be written to a local Unix\-domain socket which will be accessible only to programs running as root\&. This control socket will be located wherever the \-F option specifies it\&.
.PP
A device may will also be dropped from the pool if GPSD gets a zero length read from it\&. This end\-of\-file condition indicates that the device has been disconnected\&.
.PP
When
gpsd
is properly installed along with hotplug notifier scripts feeding it device\-add commands over the control socket,
gpsd
should require no configuration or user action to find devices\&.
.PP
Sending SIGHUP to a running
gpsd
forces it to close all GPSes and all client connections\&. It will then attempt to reconnect to any GPSes on its device list and resume listening for client connections\&. This may be useful if your GPS enters a wedged or confused state but can be soft\-reset by pulling down DTR\&.
.PP
When
gpsd
is called with no initial devices (thus, expecting devices to be passed to it by notifications to the control socket), and reaches a state where there are no devices connected and no subscribers
\fIafter\fR
after some devices have been seen, it shuts down gracefully\&. It is expected that future device hotplug events will reactivate it\&.
.PP
To point
gpsd
at a device that may be a GPS, write to the control socket a plus sign (\*(Aq+\*(Aq) followed by the device name followed by LF or CR\-LF\&. Thus, to point the daemon at
/dev/foo\&. send "+/dev/foo\en"\&. To tell the daemon that a device has been disconnected and is no longer available, send a minus sign (\*(Aq\-\*(Aq) followed by the device name followed by LF or CR\-LF\&. Thus, to remove
/dev/foo
from the search list, send "\-/dev/foo\en"\&.
.PP
To send a control string to a specified device, write to the control socket a \*(Aq!\*(Aq, followed by the device name, followed by \*(Aq=\*(Aq, followed by the control string\&.
.PP
To send a binary control string to a specified device, write to the control socket a \*(Aq&\*(Aq, followed by the device name, followed by \*(Aq=\*(Aq, followed by the control string in paired hex digits\&.
.PP
Your client may await a response, which will be a line beginning with either "OK" or "ERROR"\&. An ERROR response to an \*(Aqadd\*(Aq command means the device did not emit data recognizable as GPS packets; an ERROR response to a remove command means the specified device was not in
gpsd\*(Aqs device pool\&. An ERROR response to a \*(Aq!\*(Aq command means the daemon did not recognize the devicename specified\&.
.PP
The control socket is intended for use by hotplug scripts and other device\-discovery services\&. This control channel is separate from the public
gpsd
service port, and only locally accessible, in order to prevent remote denial\-of\-service and spoofing attacks\&.
.SH "ACCURACY"
.PP
The base User Estimated Range Error (UERE) of GPSes is 8 meters or less at 66% confidence, 15 meters or less at 95% confidence\&. Actual horizontal error will be UERE times a dilution factor dependent on current satellite position\&. Altitude determination is more sensitive to variability in ionospheric signal lag than latitude/longitude is, and is also subject to errors in the estimation of local mean sea level; base error is 12 meters at 66% confidence, 23 meters at 95% confidence\&. Again, this will be multiplied by a vertical dilution of precision (VDOP) dependent on satellite geometry, and VDOP is typically larger than HDOP\&. Users should
\fInot\fR
rely on GPS altitude for life\-critical tasks such as landing an airplane\&.
.PP
These errors are intrinsic to the design and physics of the GPS system\&.
gpsd
does its internal computations at sufficient accuracy that it will add no measurable position error of its own\&.
.PP
DGPS correction will reduce UERE by a factor of 4, provided you are within about 100 miles (160 km) of a DGPS ground station from which you are receiving corrections\&.
.PP
On a 4800bps connection, the time latency of fixes provided by
gpsd
will be one second or less 95% of the time\&. Most of this lag is due to the fact that GPSes normally emit fixes once per second, thus expected latency is 0\&.5sec\&. On the personal\-computer hardware available in 2005 and later, computation lag induced by
gpsd
will be negligible, on the order of a millisecond\&. Nevertheless, latency can introduce significant errors for vehicles in motion; at 50 km/h (31 mi/h) of speed over ground, 1 second of lag corresponds to 13\&.8 meters change in position between updates\&.
.PP
The time reporting of the GPS system itself has an intrinsic accuracy limit of 14 nanoseconds, but this can only be approximated by specialized receivers using that send the high\-accuracy PPS (Pulse\-Per\-Second) over RS232 to cue a clock crystal\&. Most GPS receivers only report time to a precision of 0\&.01s or 0\&.001s, and with no accuracy guarantees below 1sec\&.
.PP
If your GPS uses a SiRF chipset at firmware level 231, reported UTC time may be off by the difference between whatever default leap\-second offset has been compiled in and whatever leap\-second correction is currently applicable, from startup until complete subframe information is received\&. Firmware levels 232 and up don\*(Aqt have this problem\&. You may run
gpsd
at debug level 4 to see the chipset type and firmware revision level\&.
.PP
There are exactly two circumstances under which
gpsd
relies on the host\-system clock:
.PP
In the GPS broadcast signal, GPS time is represented using a week number that rolls over after 2^10 or 2^13 weeks (about 19\&.6 years, or 157 years), depending on the spacecraft\&. Receivers are required to disambiguate this to the correct date, but may have difficulty due to not knowing time to within half this interval, or may have bugs\&. Users have reported incorrect dates which appear to be due to this issue\&.
gpsd
uses the startup time of the daemon detect and compensate for rollovers while it is running, but otherwise reports the date as it is reported by the receiver without attempting to correct it\&.
.PP
If you are using an NMEA\-only GPS (that is, not using SiRF or Garmin or Zodiac binary mode),
gpsd
relies on the system clock to tell it the current century\&. If the system clock returns an invalid value near zero, and the GPS does not emit GPZDA at the start of its update cycle (which most consumer\-grade NMEA GPSes do not) then the century part of the dates
gpsd
delivers may be wrong\&. Additionally, near the century turnover, a range of dates as wide in seconds as the accuracy of your system clock may be referred to the wrong century\&.
.SH "USE WITH NTP"
.PP
gpsd can provide reference clock information to
ntpd, to keep the system clock synchronized to the time provided by the GPS receiver\&.
.PP
On Linux,
gpsd
includes support for interpreting the PPS pulses emitted at the start of every clock second on the carrier\-detect lines of some serial GPSes; this pulse can be used to update NTP at much higher accuracy than message time provides\&. You can determine whether your GPS emits this pulse by running at \-D 5 and watching for carrier\-detect state change messages in the logfile\&. In addition, if your kernel provides the RFC 2783 kernel PPS API then
gpsd
will use that for extra accuracy\&.
.PP
Detailed instructions for using GPSD to set up a high\-quality time service can be found among the documentation on the GPSD website\&.
.SH "USE WITH D\-BUS"
.PP
On operating systems that support D\-BUS,
gpsd
can be built to broadcast GPS fixes to D\-BUS\-aware applications\&. As D\-BUS is still at a pre\-1\&.0 stage, we will not attempt to document this interface here\&. Read the
gpsd
source code to learn more\&.
.SH "SECURITY AND PERMISSIONS ISSUES"
.PP
gpsd, if given the \-G flag, will listen for connections from any reachable host, and then disclose the current position\&. Before using the \-G flag, consider whether you consider your computer\*(Aqs location to be sensitive data to be kept private or something that you wish to publish\&.
.PP
gpsd
must start up as root in order to open the NTPD shared\-memory segment, open its logfile, and create its local control socket\&. Before doing any processing of GPS data, it tries to drop root privileges by setting its UID to "nobody" (or another configured userid) and its group ID to the group of the initial GPS passed on the command line \(em or, if that device doesn\*(Aqt exist, to the group of
/dev/ttyS0\&.
.PP
Privilege\-dropping is a hedge against the possibility that carefully crafted data, either presented from a client socket or from a subverted serial device posing as a GPS, could be used to induce misbehavior in the internals of
gpsd\&. It ensures that any such compromises cannot be used for privilege elevation to root\&.
.PP
The assumption behind
gpsd\*(Aqs particular behavior is that all the tty devices to which a GPS might be connected are owned by the same non\-root group and allow group read/write, though the group may vary because of distribution\-specific or local administrative practice\&. If this assumption is false,
gpsd
may not be able to open GPS devices in order to read them (such failures will be logged)\&.
.PP
In order to fend off inadvertent denial\-of\-service attacks by port scanners (not to mention deliberate ones),
gpsd
will time out inactive client connections\&. Before the client has issued a command that requests a channel assignment, a short timeout (60 seconds) applies\&. There is no timeout for clients in watcher or raw modes; rather,
gpsd
drops these clients if they fail to read data long enough for the outbound socket write buffer to fill\&. Clients with an assigned device in polling mode are subject to a longer timeout (15 minutes)\&.
.SH "LIMITATIONS"
.PP
If multiple NMEA talkers are feeding RMC, GLL, and GGA sentences to the same serial device (possible with an RS422 adapter hooked up to some marine\-navigation systems), a \*(AqTPV\*(Aq response may mix an altitude from one device\*(Aqs GGA with latitude/longitude from another\*(Aqs RMC/GLL after the second sentence has arrived\&.
.PP
gpsd
may change control settings on your GPS (such as the emission frequency of various sentences or packets) and not restore the original settings on exit\&. This is a result of inadequacies in NMEA and the vendor binary GPS protocols, which often do not give clients any way to query the values of control settings in order to be able to restore them later\&.
.PP
When using SiRF chips, the VDOP/TDOP/GDOP figures and associated error estimates are computed by
gpsd
rather than reported by the chip\&. The computation does not exactly match what SiRF chips do internally, which includes some satellite weighting using parameters
gpsd
cannot see\&.
.PP
Autobauding on the Trimble GPSes can take as long as 5 seconds if the device speed is not matched to the GPS speed\&.
.PP
Generation of position error estimates (eph, epv, epd, eps, epc) from the incomplete data handed back by GPS reporting protocols involves both a lot of mathematical black art and fragile device\-dependent assumptions\&. This code has been bug\-prone in the past and problems may still lurk there\&.
.PP
AIDVM decoding of types 16\-17, 22\-23, and 25\-26 is unverified\&.
.PP
GPSD presently fully recognizes only the 2\&.1 level of RTCM2 (message types 1, 3, 4, 5, 6, 7, 9, 16)\&. The 2\&.3 message types 13, 14, and 31 are recognized and reported\&. Message types 8, 10\-12, 15\-27, 28\-30 (undefined), 31\-37, 38\-58 (undefined), and 60\-63 are not yet supported\&.
.PP
The ISGPS used for RTCM2 and subframes decoder logic is sufficiently convoluted to confuse some compiler optimizers, notably in GCC 3\&.x at \-O2, into generating bad code\&.
.PP
Devices meant to use PPS for high\-precision timekeeping may fail if they are specified after startup by a control\-socket command, as opposed to on the daemon\*(Aqs original command line\&. Root privileges are dropped early, and some Unix variants require them in order to set the PPS line discipline\&. Under Linux the POSIX capability to set the line discipline is retained, but other platforms cannot use this code\&.
.PP
USB GPS devices often do not identify themselves through the USB subsystem; they typically present as the class 00h (undefined) or class FFh (vendor\-specific) of USB\-to\-serial adapters\&. Because of this, the Linux hotplug scripts must tell
gpsd
to sniff data from every USB\-to\-serial adapter that goes active and is known to be of a type used in GPSes\&. No such device is sent configuration strings until after it has been identified as a GPS, and
gpsd
never opens a device that is opened by another process\&. But there is a tiny window for non\-GPS devices not opened; if the application that wants them loses a race with GPSD its device open will fail and have to be retried after GPSD sniffs the device (normally less than a second later)\&.
.SH "FILES"
.PP
/dev/ttyS0
.RS 4
Prototype TTY device\&. After startup,
gpsd
sets its group ID to the owning group of this device if no GPS device was specified on the command line does not exist\&.
.RE
.PP
/etc/gpsd/device\-hook
.RS 4
Optional file containing the device activation/deactivation script\&. Note that while
/etc/gpsd
is the default system configuration directory, it is possible to build the GPSD source code with different assumptions\&. See above for further details on the device\-hook mechanism\&.
.RE
.SH "ENVIRONMENT VARIABLES"
.PP
By setting the environment variable
\fBGPSD_SHM_KEY\fR, you can control the key value used to create the shared\-memory segment used for communication with the client library\&. This will be useful mainly when isolating test instances of
gpsd
from production ones\&.
.SH "APPLICABLE STANDARDS"
.PP
The official NMEA protocol standards for NMEA0183 and NMEA2000 are available from the National Marine Electronics Association, but are proprietary and expensive; the maintainers of
gpsd
have made a point of not looking at them\&. The GPSD project website links to several documents that collect publicly disclosed information about the protocol\&.
.PP
gpsd
parses the following NMEA sentences: RMC, GGA, GLL, GSA, GSV, VTG, ZDA, GBS, HDT, DBT, GST\&. It recognizes these with either the normal GP talker\-ID prefix, or with the GN prefix used by GLONASS, or with the II prefix emitted by Seahawk Autohelm marine navigation systems, or with the IN prefix emitted by some Garmin units, or with the EC prefix emitted by ECDIS units, or with the SD prefix emitted by depth sounders, or with the HC and TI prefix emitted by some Airmar equipment\&. It recognizes some vendor extensions: the PGRME emitted by some Garmin GPS models, the OHPR emitted by Oceanserver digital compasses, the PTNTHTM emitted by True North digital compasses, the PMTK omitted by some San Jose Navigation GPSes, and the PASHR sentences emitted by some Ashtech GPSes\&.
.PP
Note that
gpsd
JSON returns pure decimal degrees, not the hybrid degree/minute format described in the NMEA standard\&.
.PP
Differential\-GPS corrections are conveyed by the RTCM protocols\&. The applicable standard for RTCM\-104 V2 is
RTCM Recommended Standards for Differential GNSS (Global Navigation Satellite) Service
RTCM Paper 136\-2001/SC 104\-STD\&. The applicable standard for RTCM\-104 V3 is
RTCM Standard 10403\&.1 for Differential GNSS Services \- Version 3
RTCM Paper 177\-2006\-SC104\-STD\&. Ordering instructions for the RTCM standards are accessible from the website of the Radio Technical Commission for Maritime Services under "Publications"\&.
.PP
AIS is defined by ITU Recommendation M\&.1371,
Technical Characteristics for a Universal Shipborne Automatic Identification System Using Time Division Multiple Access\&. The AIVDM/AIVDO format understood by this program is defined by IEC\-PAS 61162\-100,
Maritime navigation and radiocommunication equipment and systems\&. A more accessible description of both can be found at
AIVDM/AIVDO Protocol Decoding, on the references page of the GPSD project website\&.
.PP
Subframe data is defined by IS\-GPS\-200E,
GLOBAL POSITIONING SYSTEM WING (GPSW) SYSTEMS ENGINEERING & INTEGRATION, INTERFACE SPECIFICATION IS\-GPS\-200 Revision E\&. The format understood by this program is defined in Section 20 (Appendix II) of the IS\-GPS\-200E,
GPS NAVIGATION DATA STRUCTURE FOR DATA, D(t)
.PP
JSON is specified by RFC 7159,
The JavaScript Object Notation (JSON) Data Interchange Format\&.
.PP
The API for PPS time service is specified by RFC 2783,
Pulse\-Per\-Second API for UNIX\-like Operating Systems, Version 1\&.0
.SH "SEE ALSO"
.PP
\fBgpsdctl\fR(8),
\fBgps\fR(1),
\fBlibgps\fR(3),
\fBgpsd_json\fR(5),
\fBlibgpsmm\fR(3),
\fBgpsprof\fR(1),
\fBgpsfake\fR(1),
\fBgpsctl\fR(1),
\fBgpscat\fR(1),
.SH "AUTHORS"
.PP
Authors: Eric S\&. Raymond, Chris Kuethe, Gary Miller\&. Former authors whose bits have been plowed under by code turnover: Remco Treffcorn, Derrick Brashear, Russ Nelson\&. This manual page by Eric S\&. Raymond
<esr@thyrsus\&.com>\&.

3677
man/gpsd_json.5

File diff suppressed because it is too large

73
man/gpsdctl.8

@ -0,0 +1,73 @@
'\" t