1GPSPIPE(1) GPSD Documentation GPSPIPE(1)
2
3
4
6 gpspipe - tool to connect to gpsd and retrieve sentences
7
9 gpspipe [-2] [-d] [-D debug-level] [-h] [-l] [-n count] [-o filename]
10 [-p] [-r] [-R] [-S] [-s serial-device] [-t]
11 [-T timestamp-format] [-u] [-v] [-w] [-x] [server [:port
12 [:device]]]
13
15 gpspipe is a tool to connect to gpsd and output the received sentences
16 to stdout. This makes the program useful as a pipe from gpsd to another
17 program or file.
18
19 gpspipe does not require root privileges, and can be run concurrently
20 with other tools connecting to the local gpsd without causing problems.
21
22 The output will consist of one or both of the raw NMEA or native gpsd
23 sentences. Each line can be optionally time stamped. There is also an
24 option to exit gracefully after a given count of packets.
25
26 Optionally a server, TCP/IP port number and remote device can be given.
27 If omitted, gpspipe connects to localhost on the default port (2947)
28 and watches all devices opened by gpsd.
29
30 gpspipe may be run as a daemon, but requires the -o flag for writing
31 the output to a file.
32
34 -2 sets the split24 flag on AIS reports. Note: this option is
35 experimental and may be changed or removed in a future release.
36
37 -d causes gpspipe to run as a daemon.
38
39 -h makes gpspipe print a usage message and exit.
40
41 -l causes gpspipe to sleep for ten seconds before attempting to connect
42 to gpsd. This is very useful when running as a daemon, giving gpsd time
43 to start before attempting a connection.
44
45 -n [count] causes [count] sentences to be output. gpspipe will then
46 exit gracefully.
47
48 -o option causes the collected data to be written to the specified
49 file. Use of this option is mandatory if gpspipe is run as a daemon.
50
51 -p enables dumping of profiling information in JSON.
52
53 -P enables dumping of PPS drift JSON in NMEA and raw modes.
54
55 -r causes raw NMEA sentences to be output.
56
57 -R causes super-raw (gps binary) data to be output. This overrides NMEA
58 and gpsd output modes.
59
60 -s option causes the collected data to be written to the specified
61 serial device with settings 4800 8N1. Thus gpspipe can be used with -s
62 and -r options to emulate a serial port hardwired to a GPS that gpsd is
63 managing.
64
65 -S sets the scaled flag.
66
67 -t adds a timestamp to each sentence output.
68
69 -T sets the format of the timestamp. See strftime(3) for the available
70 placeholders. Setting this option implies -t. Default setting is "%F
71 %T"
72
73 -u usec resolution time stamp, implies -t. Use -uu to output sec.usec.
74
75 -v causes gpspipe to show a spinning activity indicator on stderr. This
76 is useful if stdout is redirected into a file or a pipe. By default the
77 spinner is advanced with every messages written; specifying -v more
78 than once will double the number of messages required to rotate the
79 spinner.
80
81 -V prints the version, then exits.
82
83 -w causes native gpsdsentences to be output.
84
85 -x [seconds] Exit after delay of [seconds].
86
87 At least one of -R, -r or -w must be specified.
88
90 When gpsd is running gpspipe -r -n 100 will send one hundred raw NMEA
91 sentences to standard output, then exit.
92
93 When gpsd is running gpspipe -x 5 -w|sed -n '/TPV/{p;q}' will wait at
94 most 5 seconds for a TPV message, print it to stdout, then exit.
95
97 gpsd(8), gps(1), libgps(3), libgpsmm(3), gpsprof(1), gpsfake(1),
98 gpsctl(1), gpscat(1). gpsmon(1).
99
101 Gary E. Miller <gem@rellim.com>.
102
103
104
105The GPSD Project 17 Jun 2018 GPSPIPE(1)