sparkfun / SparkFun_CAN-Bus_Arduino_Library

Other
154 stars 99 forks source link

lat and lon number are 10 times too large #5

Closed sunekaae closed 7 years ago

sunekaae commented 7 years ago

The lat and lon values returned seems to be 10 times too large.

I am based in Stockholm/Sweden and my correct lat/lon is 59.317 / 18.054. However using: f_get_position(&flat, &flon, &fix_age) I get: 593.17 / flon: 180.54

And using: get_position(&lat, &lon, &fix_age) I get: 59317041 / 18054290

I use: CAN-BUS Shield (DEV-13262) and GPS Receiver EM-506 (GPS-12751) ordered bis SK Pang Arduino Uno R3

sunekaae commented 7 years ago

I've hacked together this in the GPS example on my github repo here: https://github.com/sunekaae/SparkFun_CAN-Bus_Arduino_Library/tree/fix-wrong-lat-lon

sunekaae commented 7 years ago

This issue went after I downloaded the v13 (latest) of the tinygps code from github (https://github.com/mikalhart/TinyGPS). I'm not sure where I had the older version from.