[OSM-dev] LiveGPS plugin

Ted Mielczarek ted.mielczarek at gmail.com
Fri Nov 2 17:25:19 GMT 2007


On 11/2/07, Gervase Markham <gerv-gmane at gerv.net> wrote:
> > Are you sure that your gpsd
> > listens on localhost port 2947?
>
> I'm pretty sure, but I will check. It requires going outside :-)

If you have the patience to install a bunch of Perl modules, there's
Net::GPSD::Server::Fake
-http://search.cpan.org/~mrdvt/Net-GPSD-Server-Fake-0.16/ .  It can
simulate GPSD output.  You'll need to install a ton of prerequisite
Perl modules, and then get a TLE file from
http://celestrak.com/NORAD/elements/, and then you can write a tiny
perl script like so to generate fake output:
---------------------------
#!/usr/bin/perl -w
use Net::GPSD::Server::Fake;
use Net::GPSD::Server::Fake::Circle;
my $server=Net::GPSD::Server::Fake->new();
my $provider=Net::GPSD::Server::Fake::Circle->new(lat=>40.695952, #center
                                                  lon=>-75.496782,#center
                                                  speed=>25,      #constant
                                                  heading=>45.3,  #init
                                                  distance=>1000, #constant
                                                  tlefile=>"gps-ops.txt");
$server->start($provider);
---------------------------
That generates a circular path around my house.  :)  gps-ops.txt can
be downloaded from the site above at the "GPS Operational" link.
Pretty handy for testing out the LiveGPS stuff.

-Ted




More information about the dev mailing list