<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Edward,<br>
<br>
welcome :)<br>
<br>
I do notice some offset from road maps once in a while. So go ahead
optimizing gps2latlon(), maybe that's the offset source.<br>
<br>
The atof() function should be fixed regardless of the GPS
conversion, I'll take care of that.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 23.01.2017 um 08:12 schrieb Edward
Cheeseman:<br>
</div>
<blockquote
cite="mid:57EF47AA-0BDA-4050-93D4-D6A7792D9705@gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div class=""><font class="" face="Courier New">Hello,</font></div>
<div class=""><font class="" face="Courier New"><br class="">
</font></div>
<div class=""><font class="" face="Courier New">I am new to OVMS.
I have a Gen2 Leaf on Dexters server. Tom has helped me set it
up.</font></div>
<div class=""><font class="" face="Courier New"><br class="">
</font></div>
<div class=""><font class="" face="Courier New">I found my GPS
data was off up to two degrees. I’ve traced it to myatof() in
utils.c.</font></div>
<div class=""><font class="" face="Courier New">It adds the
fractional part with both positive and negative numbers, where
it should subtract for negative numbers.</font></div>
<div class=""><font class="" face="Courier New"><br class="">
</font></div>
<div class=""><font class="" face="Courier New">myatof() is used
in SIM808 lat and long conversions, and somewhere in Twizy
which I didn’t look into.</font></div>
<div class=""><font class="" face="Courier New">I suppose there
isn’t that many SIM808 based OVMSs in the Southern or Western
hemispheres?</font></div>
<div class=""><font class="" face="Courier New"><br class="">
</font></div>
<div class=""><font class="" face="Courier New">It is easy to fix,
but maybe going through float in the first place isn’t
necessary?</font></div>
<div class=""><font class="" face="Courier New">Looks like there
is 31bits of information coming out of the GPS where float
will drop this to 23bits.</font></div>
<div class=""><font class="" face="Courier New">I’ve started
rewriting gps2latlon() to use a long long (64bit) integer
multiply and divide.</font></div>
<div class=""><font class="" face="Courier New">I see reference to
SIM808 and 908 on an arduino shield, so I might have a look to
see what they have done.</font></div>
<div class=""><font class="" face="Courier New"><br class="">
</font></div>
<div class=""><font class="" face="Courier New"><br class="">
</font></div>
<div class="">
<font class="" face="Courier New"><span class="Apple-style-span"
style="border-collapse: separate; font-variant-ligatures:
normal; font-variant-position: normal; font-variant-numeric:
normal; font-variant-alternates: normal;
font-variant-east-asian: normal; line-height: normal;
border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class=""><span
class="Apple-style-span" style="border-collapse:
separate; color: rgb(0, 0, 0); font-style: normal;
font-variant-ligatures: normal; font-variant-position:
normal; font-variant-caps: normal; font-variant-numeric:
normal; font-variant-alternates: normal;
font-variant-east-asian: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; border-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-stroke-width: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode:
space; -webkit-line-break: after-white-space;"
class="">
<div class="">Edward</div>
</div>
</span></div>
</span>
</font></div>
<br class="">
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
</body>
</html>