gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] GPS speed and direction reporting


From: Yan Seiner
Subject: Re: [gpsd-users] GPS speed and direction reporting
Date: Sun, 16 Oct 2011 11:58:32 -0700
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)

Charles Curley wrote:
On Sun, 16 Oct 2011 10:57:14 -0700
Yan Seiner <address@hidden> wrote:

I'm playing with gpsd as a way to record the trips I take...
Basically I've hacked gpxlogger to monitor the gps, and every mile or
so run a webcam program to take a snapshot of the road.

That part works wonderfully.

The webcam program also writes the GPS coordinates, time as reported
by gpsd, and the direction and speed.

You wouldn't want to share, would you?

Sure. The quality of the code is not the best; it needs some work to remove cruft and to correctly prototype the functions I added, to make a lot of the options I hard-coded user configurable, and to correctly attribute the changes (and the bugs I added. ;-) ).

http://www.seiner.com/cz/gpxlogger.c

Roughly speaking, it initializes the gps, and then enters a loop. It takes a picture every minute or every mile, whichever comes first. If it fails to get a report from the gps for a while, it closes and reopens the gps connection (not sure why this is necessary, but it's running on a severely constrained access point using OpenWRT, so that could have something to do with it.)

Also, fswebcam has the following config file:

device /dev/video0
input 0
delay 1
skip 1
font "LiberationSans-Regular":10
jpeg 95
save /data/pictures/.tmp.jpg

And, if want to use it with OpenWRT, you have to build fswebcam with freetype support, and include libfreetype and the font you want to use.

it's the last two where that I'm having issues. gpsd seems to report about a 5 minute rolling average of speed and direction. I'm not
sure if this as artifact of gpsd or the gps puck I'm using.

Is there some way to get gpsd to report a, say, 10 second average? I know that the noise in the gps signal will make this more variable. Right now, gpsd reports a speed of 25MPH a full 6 minutes after I
parked the vehicle.....

You didn't identify your GPS receiver. I have a Globalsat BU-353.
http://www.usglobalsat.com/p-62-bu-353-w.aspx#images/product/large/62.jpg
I do not see a lag anything like this. I see a lag in the speed of two
or three seconds, but that's about it.

I believe all the data are generated by the receiver, and gpsd simply
reports the data the receiver sends it.
That's what I figured; I was hoping there was a setting I could use. I am using a generic Sirf III puck I got off of ebay about 5 years ago, so I guess I should consider myself lucky that it works at all. :-)

--Yan

--
Few people are capable of expressing with equanimity opinions which differ from 
the prejudices of their social environment. Most people are even incapable of 
forming such opinions.
   Albert Einstein




reply via email to

[Prev in Thread] Current Thread [Next in Thread]