Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gpspipe(1) [debian man page]

GPSPIPE(1)							GPSD Documentation							GPSPIPE(1)

gpspipe - tool to connect to gpsd and retrieve sentences SYNOPSIS
gpspipe [-h] [-d] [-l] [-o filename] [-n count] [-r] [-R] [-s serial-device] [-t] [-T timestamp-format] [-p] [-w] [-v] [-D debug-level] [server [:port [:device]]] DESCRIPTION
gpspipe is a tool to connect to gpsd and output the received sentences to stdout. This makes the program useful as a pipe from gpsd to another program or file. gpspipe does not require root privileges, and can be run concurrently with other tools connecting to the local gpsd without causing problems. The output will consist of one or both of the raw NMEA or native gpsd sentences. Each line can be optionally time stamped. There is also an option to exit gracefully after a given count of packets. Optionally a server, TCP/IP port number and remote device can be given. If omitted, gpspipe connects to localhost on the default port (2947) and watches all devices opened by gpsd. gpspipe may be run as a daemon, but requires the -o flag for writing the output to a file. OPTIONS
-h makes gpspipe print a usage message and exit. -d causes gpspipe to run as a daemon. -l causes gpspipe to sleep for ten seconds before attempting to connect to gpsd. This is very useful when running as a daemon, giving gpsd time to start before attempting a connection. -r causes raw NMEA sentences to be output. -R causes super-raw (gps binary) data to be output. This overrides NMEA and gpsd output modes. -s option causes the collected data to be written to the specified serial device with settings 4800 8N1. Thus gpspipe can be used with -s and -r options to emulate a serial port hardwired to a GPS that gpsd is managing. -o option causes the collected data to be written to the specified file. Use of this option is mandatory if gpspipe is run as a daemon. -w causes native gpsdsentences to be output. -t adds a timestamp to each sentence output. -T sets the format of the timestamp. See strftime(3) for the available placeholders. Setting this option implies -t. -p enables dumping of profiling information in JSON. -n [count] causes [count] sentences to be output. gpspipe will then exit gracefully. -v causes gpspipe to show a spinning activity indicator on stderr. This is useful if stdout is redirected into a file or a pipe. By default the spinner is advanced with every messages written; specifying -v more than once will double the number of messages required to rotate the spinner. -V prints the version, then exits. At least one of -R, -r or -w must be specified. EXAMPLE
When gpsd is running gpspipe -r -n 100 will send one hundred raw NMEA sentences to standard output, then exit. SEE ALSO
gpsd(8), gps(1), libgps(3), libgpsd(3), gpsprof(1), gpsfake(1), gpsctl(1), gpscat(1). gpsmon(1). AUTHOR
Gary E. Miller The GPSD Project 03 Aug 2005 GPSPIPE(1)

Check Out this Related Man Page

Net::GPSD3(3pm) 					User Contributed Perl Documentation					   Net::GPSD3(3pm)

Net::GPSD3 - Interface to the gpsd server daemon protocol versions 3 (JSON). SYNOPSIS
Watch Interface use Net::GPSD3; my $gpsd=Net::GPSD3->new; $gpsd->watch; One Liner perl -MNet::GPSD3 -e 'Net::GPSD3->new->watch' Poll Interface use Net::GPSD3; use Data::Dumper qw{Dumper}; my $gpsd=Net::GPSD3->new; my $poll=$gpsd->poll; print Dumper($poll); One Liner perl -MNet::GPSD3 -e 'printf "Protocol: %s ", Net::GPSD3->new->poll->parent->cache->VERSION->protocol;' Protocol: 3.4 POE Interface See Net::GPSD3::POE DESCRIPTION
Net::GPSD3 provides an object client interface to the gpsd server daemon utilizing the version 3 protocol. gpsd is an open source GPS daemon from Support for Version 3 of the protocol (JSON) was added to the daemon in version 2.90. If your daemon is before 2.90 (protocol 2.X), please use the Net::GPSD package. CONSTRUCTOR
new Returns a new Net::GPSD3 object. my $gpsd=Net::GPSD3->new; my $gpsd=Net::GPSD3->new(host=>"", port=>2947); #defaults METHODS
host Sets or returns the current gpsd host. my $host=$obj->host; port Sets or returns the current gpsd TCP port. my $port=$obj->port; poll Sends a Poll request to the gpsd server and returns a Net::GPSD3::Return::POLL object. The method also populates the cache object with the Net::GPSD3::Return::VERISON and Net::GPSD3::Return::DEVICES objects. my $poll=$gpsd->poll; #isa Net::GPSD3::Return::POLL object Note: In order to use the poll method consistently you should run the GPSD daemon as a service. You may also need to run the daemon with the "-n" option. watch Calls all handlers that are registered in the handler method. $gpsd->watch; #will not return unless something goes wrong. addHandler Adds handlers to the handler list. $gpsd->addHandler(&myHandler); $gpsd->addHandler(&myHandler1, &myHandler2); A handler is a sub reference where the first argument is a Net::GPSD3::Return::* object. handlers List of handlers that are called in order to process objects from the gpsd wathcer stream. my @handler=$gpsd->handlers; #() my $handler=$gpsd->handlers; #[] cache Returns the Net::GPSD3::Cache caching object. METHODS Internal default_handler socket Returns the cached IO::Socket::INET6 object my $socket=$gpsd->socket; #try to reconnect on failure json Returns the cached JSON::XS object decode Returns a perl data structure given a JSON formated string. my %data=$gpsd->decode($string); #() my $data=$gpsd->decode($string); #{} encode Returns a JSON string from a perl data structure constructor Constructs a class object by lazy loading the classes. my $obj=$gpsd->constructor(%$data); my $obj=$gpsd->constructor(class=>"DEVICE", string=>'{...}', ...); Returns and object in the Net::GPSD3::Return::* namespace. BUGS
Log on RT and Send to gpsd-dev email list There are no two GPS devices that are alike. Each GPS device has a different GPSD signature as well. If your GPS device does not work out of the box with this package, please send me a log of your devices JSON sentences. echo '?POLL;' | nc 2947 echo '?WATCH={"enable":true,"json":true};' | socat -t10 stdin stdout | nc 2947 SUPPORT supports all Perl applications including this package. Try gpsd-dev email list AUTHOR
Michael R. Davis CPAN ID: MRDVT STOP, LLC domain=>michaelrdavis,tld=>com,account=>perl COPYRIGHT
This program is free software licensed under the... The BSD License The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
Net::GPSD, Net::GPSD3::POE, GPS::Point, JSON::XS, IO::Socket::INET6, DateTime perl v5.14.2 2011-12-27 Net::GPSD3(3pm)
Man Page

Featured Tech Videos