1GPSPIPE(1) GPSD Documentation GPSPIPE(1)
2
3
4
6 gpspipe - tool to connect to gpsd and retrieve sentences
7
9 gpspipe [-?] [--count COUNT] [--daemonize] [--debug LVL] [--help]
10 [--json] [--nmae] [--output FILE] [--pps] [--profile] [--raw]
11 [--scaled] [--seconds SEC] [--serial DEV] [--sleep] [--spinner]
12 [--split24] [--timefmt FMT] [--timestamp] [--usec] [--version]
13 [--zulu] [-2] [-?] [-d] [-D LVL] [-h] [-l] [-n COUNT] [-o FILE]
14 [-p] [-P] [-r] [-R] [-S] [-s serial-device] [-t]
15 [-T timestamp-format] [-u] [-v] [-V] [-w] [-x seconds] [-Z]
16 [server [:port [:device]]]
17
19 gpspipe is a tool to connect to gpsd and output the received sentences
20 to stdout. This makes the program useful as a pipe from gpsd to another
21 program or file.
22
23 gpspipe does not require root privileges, and can be run concurrently
24 with other tools connecting to the local gpsd without causing problems.
25
26 The output will consist of one or both of the raw NMEA or native gpsd
27 sentences. Each line can be optionally time stamped. There is also an
28 option to exit gracefully after a given count of packets.
29
30 Optionally a server, TCP/IP port number and remote device can be given.
31 If omitted, gpspipe connects to localhost on the default port (2947)
32 and watches all devices opened by gpsd.
33
34 gpspipe may be run as a daemon, but requires the -o, --output flag for
35 writing the output to a file.
36
38 -?, -h, --help
39 Print a usage message and exit.
40
41 -2, --split24
42 -2 sets the split24 flag on AIS reports.
43
44 -d, --daemonize
45 Run as a daemon.
46
47 -d LVL, --debug LVL
48 Set debug level to LVL.
49
50 -l, --sleep
51 Sleep for ten seconds before attempting to connect to gpsd. This is
52 very useful when running as a daemon, giving gpsd time to start
53 before attempting a connection.
54
55 -n COUNT, --count COUNT
56 Exit after COUNT messages are output.
57
58 -o FILE, --output FILE
59 Cause the collected data to be written to the specified file. Use
60 of this option is mandatory if gpspipe is run as a daemon.
61
62 -p, --profile
63 Dump profiling information in JSON.
64
65 -P, --pps
66 Enables dumping of PPS drift JSON in NMEA and raw modes.
67
68 -r, --nmea
69 Cause NMEA sentences to be output. This may be NMEA, pseudo NMEA
70 built from binary data, or some combination of both.
71
72 -R, --raw
73 Causes super-raw (gps binary) data to be output. This will forward
74 exactly what the device sent.
75
76 -s DEV, --serial DEV
77 Cause the collected data to be written to the specified serial
78 device (DEV) with settings 4800 8N1. Thus gpspipe can be used with
79 -s, --serial and -r, --nmea options to emulate a serial port
80 hardwired to a GPS that gpsd is managing.
81
82 -S, --scaled
83 Set the scaled flag. This is for AIS and SUBFRAME data only. Scaled
84 data will be output in the JSON, instead of raw data in the JSON.
85
86 -t, --timestamp
87 Add a UTC timestamp to each sentence output.
88
89 -T FMT, --timefmt FMT
90 Set the format of the timestamp. See strftime(3) for the available
91 placeholders. Setting this option implies -t, --timestamp. Default
92 setting is "%F %T"
93
94 -u, --usec
95 Use usec resolution time stamp, implies -t, --timestamp. Use twice
96 (-uu) to output sec.usec.
97
98 -v, --spinner
99 Show a spinning activity indicator on stderr. This is useful if
100 stdout is redirected into a file or a pipe. By default the spinner
101 is advanced with every messages written; specifying -v, --spinner
102 more than once will double the number of messages required to
103 rotate the spinner.
104
105 -V, --version
106 Print the program version and exit.
107
108 -w, --json
109 Cause native gpsd JSON sentences to be output.
110
111 -x SEC, --seconds SEC
112 Exit after delay of SEC seconds.
113
114 -z, --zulu
115 Set the timestamp format iso8601: implies -t
116
117 At least one of -R, -r or -w must be specified.
118
119 You must use -o if you use -d.
120
122 When gpsd is running, gpspipe -r -n 100 will send one hundred raw NMEA
123 sentences to standard output, then exit.
124
125 When gpsd is running, gpspipe -x 5 -w|sed -n '/TPV/{p;q}' will wait at
126 most 5 seconds for a TPV message, print it to stdout, then exit.
127
129 gpsd(8), gps(1), libgps(3), libgpsmm(3), gpsprof(1), gpsfake(1),
130 gpsctl(1), gpscat(1). gpsmon(1).
131
133 Gary E. Miller <gem@rellim.com>.
134
135
136
137The GPSD Project 5 December 2020 GPSPIPE(1)