Speed parameter not the same as cgps
jonathanwiesel opened this issue · comments
I've been testing the library and been monitoring the speed capture from both node-gpsd
and linux's cgps
. I noticed node-gpsd
captures the speed parameter like 3.5 parts less than cgps
.
For example, going around 50 Km/h, cgps
captures the speed pretty accurately; however node-gpsd
captures around 10-15. This number doesn't seem right, not even in miles per hour. Any ideas?
Hi. gpsd
captures the speed in MPS. As node-gpsd
is just a wrapper, all data received from gpsd
is passed to calling script. xgpsspeed
does convert the MPS value to KPS, MPH or KNOTS.
You might want to do the same in your program. To convert MPS to KPH multiply the speed value with 3.6 (which is around the same value you found).
Does this help?
Oh!, that makes a lot of sense now. Thanks a lot @eelcocramer