<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Example GPS log excerpt from the SIM908:<br>
    <br>
    <tt>2,142452,5118.427633,N,723.060952,E,1,4,2.862085,41.881016,M,47.558514,M,,0000</tt><tt><br>
    </tt><tt>64,79.84,T,,M,0.00,N,0.00,K,A</tt><tt><br>
    </tt><tt>2,142454,5118.427617,N,723.060236,E,1,4,2.863321,41.924519,M,47.558521,M,,0000</tt><tt><br>
    </tt><tt>64,28.72,T,,M,2.84,N,5.25,K,A</tt><tt><br>
    </tt><tt>2,142456,5118.428416,N,723.057457,E,1,4,2.864882,43.029949,M,47.558483,M,,0000</tt><tt><br>
    </tt><tt>64,289.11,T,,M,3.24,N,6.01,K,A</tt><tt><br>
    </tt><tt>2,142458,5118.423982,N,723.060985,E,1,5,1.995852,50.477901,M,47.558537,M,,0000</tt><tt><br>
    </tt><tt>64,289.11,T,,M,0.00,N,0.00,K,A</tt><tt><br>
    </tt><tt>2,142500,5118.421071,N,723.063434,E,1,5,1.996306,54.801235,M,47.558567,M,,0000</tt><tt><br>
    </tt><tt>64,289.11,T,,M,0.00,N,0.00,K,A</tt><tt><br>
    </tt><tt>2,142502,5118.421071,N,723.063434,E,1,5,1.995406,54.801235,M,47.558567,M,,0000</tt><tt><br>
    </tt><tt>64,289.11,T,,M,0.00,N,0.00,K,A</tt><tt><br>
    </tt><br>
    <br>
    Regarding testing without hardware, there is a PIC simulator built
    into the MPLAB X IDE, that also emulates some PIC18 CPUs. Haven't
    used it though, and I doubt it will be able to run the complete OVMS
    firmware, but it should be usable to test single functions.<br>
    <br>
    Regards,<br>
    Michael<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 02.02.2017 um 08:52 schrieb Edward
      Cheeseman:<br>
    </div>
    <blockquote
      cite="mid:6B9D95CE-754F-4A17-8D60-9D62489ECAA1@gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Oh, can someone send me a DIAG capture (or confirm) that the
      SIM908 lat/long outputs are (D)DDMM.MMMM format, rather than
      (D)DDMM.MMMMMM?
      <div class="">I’m error checking so either will work, just don’t
        want to leave data behind :)</div>
      <div class=""><br class="">
      </div>
      <div class="">Edward</div>
      <div class=""><br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On 2/02/2017, at 7:59 PM, Edward Cheeseman
              <<a moz-do-not-send="true"
                href="mailto:cheesemanedward@gmail.com" class="">cheesemanedward@gmail.com</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta http-equiv="Content-Type" content="text/html;
                charset=windows-1252" class="">
              <div style="word-wrap: break-word; -webkit-nbsp-mode:
                space; -webkit-line-break: after-white-space;" class="">Hi
                Mark,
                <div class=""><br class="">
                </div>
                <div class="">I only found this out because I read the
                  C18 user manual.</div>
                <div class="">Something it has that I haven't seen
                  before is a “long short” - a 24bit signed integer
                  type! (also an unsigned long short too)</div>
                <div class=""><br class="">
                </div>
                <div class="">I’ve made a spreadsheet which was the
                  basis for the math.</div>
                <div class="">I will try with Mac gcc. Part of the fun
                  is gcc (64bit) will have a vastly different idea of
                  what an int is compared to C18 (8bit)!</div>
                <div class="">I’ll have to change data types between the
                  two compilers.</div>
                <div class="">The “uint8_t” style declarations don’t
                  seem to work - I haven’t found a C18 stdint.h header.
                  I prefer these to remove this sort of ambiguity!</div>
                <div class=""><br class="">
                </div>
                <div class="">I’ll let you know how that step goes.</div>
                <div class=""><br class="">
                </div>
                <div class="">Edward</div>
                <div class=""><br class="">
                  <div class="">
                    <blockquote type="cite" class="">
                      <div class="">On 2/02/2017, at 7:23 PM, Mark
                        Webb-Johnson <<a moz-do-not-send="true"
                          href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>>
                        wrote:</div>
                      <br class="Apple-interchange-newline">
                      <div class="">
                        <meta http-equiv="Content-Type"
                          content="text/html; charset=windows-1252"
                          class="">
                        <div style="word-wrap: break-word;
                          -webkit-nbsp-mode: space; -webkit-line-break:
                          after-white-space;" class="">Edwards.
                          <div class=""><br class="">
                          </div>
                          <div class="">First I’ve heard of this, but it
                            doesn’t surprise me.</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">Testing this sort of stuff is
                            not particularly easy. What we have done in
                            the past is put in a DIAG mode command to
                            allow this function to be called with a
                            given string parameter, and then to print
                            the result. Then, we can script up something
                            to feed in a bunch of input and see what the
                            output is like. But, that does require
                            physical hardware.</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">Perhaps also the function could
                            just be run in a standalone C program on the
                            mac? So long as the type sizes are the same,
                            the results should be equivalent (perhaps
                            with some float rounding differences in the
                            original version).</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">Regards, Mark.</div>
                          <div class=""><br class="">
                            <div class="">
                              <blockquote type="cite" class="">
                                <div class="">On 2 Feb 2017, at 4:38 AM,
                                  Edward Cheeseman <<a
                                    moz-do-not-send="true"
                                    href="mailto:cheesemanedward@gmail.com"
                                    class="">cheesemanedward@gmail.com</a>>
                                  wrote:</div>
                                <br class="Apple-interchange-newline">
                                <div class="">
                                  <meta http-equiv="Content-Type"
                                    content="text/html;
                                    charset=windows-1252" class="">
                                  <div style="word-wrap: break-word;
                                    -webkit-nbsp-mode: space;
                                    -webkit-line-break:
                                    after-white-space;" class=""><br
                                      class="">
                                    <div class="">
                                      <blockquote type="cite" class="">
                                        <div class="">On 23/01/2017, at
                                          8:12 PM, Edward Cheeseman
                                          wrote:</div>
                                        <div class="">
                                          <div class=""
                                            style="font-family:
                                            Helvetica; font-size: 12px;
                                            font-style: normal;
                                            font-variant-caps: normal;
                                            font-weight: normal;
                                            letter-spacing: normal;
                                            orphans: auto; text-align:
                                            start; text-indent: 0px;
                                            text-transform: none;
                                            white-space: normal; widows:
                                            auto; word-spacing: 0px;
                                            -webkit-text-stroke-width:
                                            0px;"><font class=""
                                              face="Courier New">I’ve
                                              started
                                              rewriting gps2latlon() to
                                              use a long long (64bit)
                                              integer multiply and
                                              divide.</font></div>
                                          <div class=""
                                            style="font-family:
                                            Helvetica; font-size: 12px;
                                            font-style: normal;
                                            font-variant-caps: normal;
                                            font-weight: normal;
                                            letter-spacing: normal;
                                            orphans: auto; text-align:
                                            start; text-indent: 0px;
                                            text-transform: none;
                                            white-space: normal; widows:
                                            auto; word-spacing: 0px;
                                            -webkit-text-stroke-width:
                                            0px;"><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>
                                      </blockquote>
                                    </div>
                                    <br class="">
                                    <div class="">
                                      <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; orphans: 2;
                                        text-align: -webkit-auto;
                                        text-indent: 0px; widows: 2;
                                        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;
                                            font-variant-ligatures:
                                            normal;
                                            font-variant-position:
                                            normal;
                                            font-variant-numeric:
                                            normal;
                                            font-variant-alternates:
                                            normal;
                                            font-variant-east-asian:
                                            normal; line-height: normal;
                                            orphans: 2; text-align:
                                            -webkit-auto; text-indent:
                                            0px; widows: 2;
                                            border-spacing: 0px;">
                                            <div style="word-wrap:
                                              break-word;
                                              -webkit-nbsp-mode: space;
                                              -webkit-line-break:
                                              after-white-space;"
                                              class="">
                                              <div style="font-family:
                                                Helvetica; font-style:
                                                normal;
                                                font-variant-caps:
                                                normal; font-weight:
                                                normal; letter-spacing:
                                                normal; text-transform:
                                                none; white-space:
                                                normal; word-spacing:
                                                0px;
                                                -webkit-text-decorations-in-effect:
                                                none;
                                                -webkit-text-stroke-width:
                                                0px;" class="">I totally
                                                overestimated the pic18F
                                                capability.</div>
                                              <div style="font-family:
                                                Helvetica; font-style:
                                                normal;
                                                font-variant-caps:
                                                normal; font-weight:
                                                normal; letter-spacing:
                                                normal; text-transform:
                                                none; white-space:
                                                normal; word-spacing:
                                                0px;
                                                -webkit-text-decorations-in-effect:
                                                none;
                                                -webkit-text-stroke-width:
                                                0px;" class="">So it
                                                turns out the C18, and
                                                for that matter, the XC8
                                                compilers treat long
                                                long the same as long -
                                                32bit.</div>
                                            </div>
                                          </span></div>
                                      </span></div>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br class="">
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br class="">
        <div class="">
          <span class="Apple-style-span" style="border-collapse:
            separate; color: rgb(0, 0, 0); font-family: Helvetica;
            font-style: normal; font-variant: 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=""><span
                class="Apple-style-span" style="border-collapse:
                separate; color: rgb(0, 0, 0); font-family: Helvetica;
                font-style: normal; font-variant: 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 Cheeseman</div>
                  <div class="">Electrical Engineer</div>
                  <div class=""><a moz-do-not-send="true"
                      href="mailto:cheesemanedward@gmail.com" class="">cheesemanedward@gmail.com</a></div>
                </div>
              </span></div>
          </span>
        </div>
        <br class="">
      </div>
      <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>