Hello,
I am new to OVMS.
I have a Gen2 Leaf on Dexters server. Tom has helped me set it
up.
I found my GPS
data was off up to two degrees. I’ve traced it to myatof() in
utils.c.
It adds the
fractional part with both positive and negative numbers, where
it should subtract for negative numbers.
myatof() is used
in SIM808 lat and long conversions, and somewhere in Twizy
which I didn’t look into.
I suppose there
isn’t that many SIM808 based OVMSs in the Southern or Western
hemispheres?
It is easy to fix,
but maybe going through float in the first place isn’t
necessary?
Looks like there
is 31bits of information coming out of the GPS where float
will drop this to 23bits.
I’ve started
rewriting gps2latlon() to use a long long (64bit) integer
multiply and divide.
I see reference to
SIM808 and 908 on an arduino shield, so I might have a look to
see what they have done.
_______________________________________________
OvmsDev mailing list
OvmsDev@lists.teslaclub.hk
http://lists.teslaclub.hk/mailman/listinfo/ovmsdev