<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I am wondering how best to calculate velocity in a moby/phonegap/android application.</div><div>In general, would anyone have experience (or intuition) whether velocity might better be calculated from the acceleration values delivered by phonegap's Acceleration object, or directly be extracted from the Position object returned from Geolocation (it has a field 'velocity')?</div><div><br></div><div>Otherwise I'd plan to test and compare both ways, and for that, I'd have a technical question (most probably to Danny :-) ):</div><div>At the moment, the successCallback in the adapted phonegap.js receives the latitude and longitude only, whereas in the original (current) phonegap.js the complete Position object is returned. Is this intentional - I mean, does moby diverge from phonegap on purpose here (like experience showed the other fields are not reliable anyway, or not too much requested by users, or ...)? Or was this a modification to keep it simple at first, to be possibly extended later?</div><div>Also, what would be the way to adapt the racket side of it - &nbsp;given on-location-change's contract,</div><div><br></div><div><br></div><div><span class="Apple-style-span" style="font-family: serif; "><table cellspacing="0" class="boxed" style="width: 559px; background-color: rgb(232, 232, 255); "><tbody><tr><td style="padding-left: 0px; padding-right: 0px; "><span class="RktPn" style="font-family: monospace; color: rgb(132, 60, 36); ">(</span><a name="(dep._((planet._location..rkt._(dyoo._moby..plt._3._1)._phone)._on-location-change))"></a><a name="(def._((planet._location..rkt._(dyoo._moby..plt._3._1)._phone)._on-location-change))"></a><span title="Provided from: (planet dyoo/moby:3:1/phone/location)"><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); "><a href="http://planet.racket-lang.org/#(def._((planet._location..rkt._(dyoo._moby..plt._3._1)._phone)._on-location-change))" class="RktValLink" pltdoc="x" style="text-decoration: none; color: blue; ">on-location-change</a></span></span><span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktVar" style="font-family: monospace; color: rgb(38, 38, 128); font-style: italic; ">world-updater</span><span class="RktPn" style="font-family: monospace; color: rgb(132, 60, 36); ">)</span><span class="hspace" style="font-family: monospace; ">&nbsp;</span>→<span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); ">handler</span></td></tr><tr><td style="padding-left: 0px; padding-right: 0px; "><span class="hspace" style="font-family: monospace; ">&nbsp;&nbsp;</span><span class="RktVar" style="font-family: monospace; color: rgb(38, 38, 128); font-style: italic; ">world-updater</span><span class="hspace" style="font-family: monospace; ">&nbsp;</span>:<span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktPn" style="font-family: monospace; color: rgb(132, 60, 36); ">(</span><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); ">world</span><span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktPn" style="font-family: monospace; color: rgb(132, 60, 36); ">[</span><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); ">latitude</span><span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); ">number</span><span class="RktPn" style="font-family: monospace; color: rgb(132, 60, 36); ">]</span><span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktPn" style="font-family: monospace; color: rgb(132, 60, 36); ">[</span><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); ">longitude</span><span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); ">number</span><span class="RktPn" style="font-family: monospace; color: rgb(132, 60, 36); ">]</span><span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); ">-&gt;</span><span class="hspace" style="font-family: monospace; ">&nbsp;</span><span class="RktSym" style="font-family: monospace; color: rgb(38, 38, 128); ">world</span><span class="RktPn" style="font-family: monospace; color: rgb(132, 60, 36); ">)</span></td></tr></tbody></table></span><div><br></div></div><div><br></div><div>would you make world-updater a variable arity function, or use case-lambda or keyword arguments to obtain the desired flexibility, or rather create and pass a 'position' object analogous to the javascript-side Position object?</div><div><br></div><div>BTW I noticed that in phonegap's (current) phonegap.js, there are no observers for orientation and shake... I'm just curious, was this functionality added during moby implementation (i.e., it never existed in phonegap's own phonegap.js), or it was removed in a newer phonegap release?</div><div><br></div><div>Many thanks in advance,</div><div>Sigrid&nbsp;</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></body></html>