[Ovmsdev] SIM808/SIM908 GPS accuracy
cheesemanedward at gmail.com
Mon Feb 6 17:50:21 HKT 2017
I have tried out the integer math approach for converting Lat and Long GPS values on my SIM808 unit.
It seems to be reasonable for the short drive I had today. Going by the iOS app (which I think uses Apple maps?) I was on the road, although maybe on the wrong side of it!
So, maybe within 5 meters?
I haven’t compared this to the floating point implementation since the negative fix, so can’t say whether it is an improvement in accuracy.
I’m reasonably certain it takes less cycles. It may take more program space with the constants used.
The SIM908 code hasn’t been tested on a live unit, but worked ok on mac gcc. I’ve transferred the changes I needed to make that ensure the C18 data types behave correctly.
Integer Promotion and char unsigned by default were interesting quirks. So was the “don’t make a line too complicated” piece of advice. (1<<8) just disappeared, where 256 worked?!
Anyway, this minor change is on Github:
Let me know if you want this as a pull request.
More information about the OvmsDev