Kismet Wireless

Kismet Forums

 

Posted by:fisted
Subject:GPS Speed=0.0000 problem maybe solved.
Date:23:02:52 09/04/2010

(related: https://www.kismetwireless.net/Forum/General/Messages/1245512230.096612)

I have/had the problem that kismet does not report my vehicles velocity while driving, (although the gps coordinates were okay).

Since my GPS reports valid RMC sentences, i did some quick research in the kismet source code, and tracked the problem down to a probably simply missing assignment.
my configuration must be rather uncommon, since almost nobody else seems to run into this. if the code snippet where it occures would be executed by most machines, this bug would have been fixed ages ago (its a candidate for the easy-to-find-and-easier-to-fix awards.)

consider this file:
trunk/gpsdclient.cc
svn revision: 3016
function: GPSDClient::ParseData()
line 446: if (sscanf(pollvec[3].c_str(), "V=%f", &in_spd) != 1)
line 486:if (sscanf(ggavec[9].c_str(), "%f", &in_spd) != 1)

in one of these lines, kismet extracts the velocity provided by gpsd into the variable named "in_spd"

and this, line 631ff:
if (use_spd) {
if (si_units == 0)
in_spd *= 0.514; /* Speed in meters/sec from knots */
}

if the last position where the local variable in_spd is accessed in this function, so its value is basically lost. as well, there is no assignment to the more global (protected?) variable "spd".

so i suggest adding a line like this:
if (use_spd) {
if (si_units == 0)
in_spd *= 0.514; /* Speed in meters/sec from knots */
spd=in_spd; //maybe someone has forgotten me?
}

this seems to have fixed the problem, kismet is now reporting speed, incorrect speed (in a unit i dont know), but at least it reports something different than 0.0000. and, the value it reports, grows linear with the actual speed, so the remainder of the problem is just a constant factor.

i measured with my car:

~20 km/h: kismet says 2.7 m/h (is m miles or meters?)
~50 km/h: kismet says 7.2 m/h (is m miles or meters?)
~80 km/h: kismet says 11.0 m/h (is m miles or meters?)
~100 km/h: kismet says 13.7 m/h (is m miles or meters?)
~120 km/h: kismet says 16.3 m/h (is m miles or meters?)

i cant figure out which unit this is, maybe u can.

if you need further information, please let me know which.
my gps device is configured to emit GSV GSA GGA and RMC

in love (with kismet) :)

fisted


Reply to this message