1GPSFAKE(1) GPSFAKE(1)
2
3
4
6 gpsfake - test harness for gpsd, simulating a GPS
7
9 gpsfake [-1] [-h] [-b] [-c interval] [-i] [-D debuglevel] [-l]
10 [-m monitor] [-n] [-o options] [-p] [-r initcmd] [-s speed]
11 [-v] logfile
12
13
15 gpsfake is a test harness for gpsd and its clients. It opens a pty
16 (pseudo-TTY), launches a gpsd instance that thinks the slave side of
17 the pty is its GPS device, and repeatedly feeds the contents of a test
18 logfile through the master side to the GPS.
19
20
21 gpsfake does not require root privileges, and can be run concurrently
22 with a production gpsd instance without causing problems.
23
24
25 The logfile may be of NMEA, SiRF packets, TSIP packets, or Zodiac pack‐
26 ets. Leading lines beginning with # will be treated as comments and ig‐
27 nored.
28
29
30 The gpsd instance is run in foreground. The thread sending fake GPS da‐
31 ta to the daemon is run in background.
32
33
35 With the -1 option, the logfile is interpreted once only rather than
36 repeatedly. This option is intended to facilitate regression testing.
37
38
39 The -b option enables a twirling-baton progress indicator on standard
40 error. At termination, it reports elapsed time.
41
42
43 The -c option sets the delay between sentences in seconds. Fractional
44 values of seconds are legal. The default is zero (no delay).
45
46
47 The -l option makes the program dump a line or packet number just be‐
48 fore each sentence is fed to the daemon. If the sentence is textual
49 (e.g. NMEA), the text is dumped as well. If not, the packet will be
50 dumped in hexadecimal (except for RTCM packets, which aren't dumped at
51 all). This option is useful for checking that gpsfake is getting packet
52 boundaries right.
53
54
55 The -i option is for single-stepping through logfiles. It dumps the
56 line or packet number (and the sentence if the protocol is textual)
57 followed by "? ". Only when the user keys Enter is the line actually
58 fed to gpsd.
59
60
61 The -m option specifies a monitor program inside which the daemon
62 should be run. This option is intended to be used with valgrind(1),
63 gdb(1) and similar programs.
64
65
66 The -g option uses the monitor facility to run the gpsd instance within
67 gpsfake under control of gdb.
68
69
70 The -o option specifies options to pass to the daemon. The -n option
71 passes -n to start the daemon reading the GPS without waiting for a
72 client (equivalent to -o "-n"). The -D option passes a -D option to the
73 daemon: thus -D 4 is shorthand for -o "-D 4".
74
75
76 The -p option dumps the NMEA and GPSD notifications generated by the
77 log to standard output.
78
79
80 The -r option specifies an initialization comand to use. The default is
81 "w+r+"; "r=2" might be another interesting value.
82
83
84 The -s option sets the baud rate for the slave tty. The default is
85 4800.
86
87
88 The -v option enables verbose progress reports to stderr. It is mainly
89 useful for debugging gpsfake itself.
90
91
92 The -x option dumps packets as gpsfake gathers them. It is mainly use‐
93 ful for debugging gpsfake itself.
94
95
96 The -h option makes gpsfake print a usage message and exit.
97
98
99 The argument must be the name of a file containing the data to be cy‐
100 cled at the device. gpsfake will print a notification each time it cy‐
101 cles.
102
103
105 gpsfake is a trivial wrapper around a Python module, also named gps‐
106 fake, that can be used to fully script sessions involving a gpsd in‐
107 stance, any number of client sessions, and any number of fake GPSes
108 feeding the daemon instance with data from specified sentence logs.
109
110
111 Source and embedded documentation for this module is shipped with the
112 gpsd development tools. You can use it to torture-test either gpsd it‐
113 self or any gpsd-aware client application.
114
115
116 Logfiles for the use with gpsfake can be retrieved using gpspipe and
117 sirfmon from the gpsd distribution, or any other application which is
118 able to create a compatible output.
119
120
122 gpsd(8), gps(1), libgps(3), libgpsd(3), gpsctl(1), gpspipe(1), gp‐
123 sprof(1) sirfmon(1).
124
125
127 Eric S. Raymond <esr@thyrsus.com>. There is a project page for gpsd
128 here: http://gpsd.berlios.de/.
129
130
131
132
133 GPSFAKE(1)