<div dir="ltr"><div style>Hi Niels and Kristof,</div>  You can just link QtPositioning, if you are using C++ you can use QGeoCoordinate::distanceTo(const QGeoCoordinate &), there is an equivalent for QML, check out:<div>
 <a href="http://qt-project.org/doc/qt-5/qml-coordinate.html#distanceto">http://qt-project.org/doc/qt-5/qml-coordinate.html#distanceto</a></div><div><br><div style>It's probably gonna be faster than whatever you can conjure in JS. ;)</div>
<div style><br></div><div><div style>   Regards Kris</div></div></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 July 2014 18:52, Niels Christian Ørgaard <span dir="ltr"><<a href="mailto:ncothang@gmail.com" target="_blank">ncothang@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Timur, <br><br>I was literally googling something similar earlier today (contemplating a quick health-app), and came across this:<br>
<a href="http://qt-project.org/forums/viewthread/19189" target="_blank">http://qt-project.org/forums/viewthread/19189</a><br>
<br></div>You should be able to just compare current and previous location, and calculate distance between these; if you do this at regular intervals (every few seconds?), and add up each short distance, you will get the total travelled distance.<br>

<br>There are various methods for calculating distance between 2 sets of longitude and latitude, though for precision you may want to include altitude as well.<br></div>Example: <a href="http://www.ridgesolutions.ie/index.php/2013/11/14/algorithm-to-calculate-speed-from-two-gps-latitude-and-longitude-points-and-time-difference/" target="_blank">http://www.ridgesolutions.ie/index.php/2013/11/14/algorithm-to-calculate-speed-from-two-gps-latitude-and-longitude-points-and-time-difference/</a><br>

<br></div>Cheers,<br>Nc.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-07 20:13 GMT+02:00 Timur Kristóf <span dir="ltr"><<a href="mailto:timur.kristof@gmail.com" target="_blank">timur.kristof@gmail.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi,<br><br>I'd like to ask a simple question: what is the simplest way to make a Sailfish app that measures the distance the user has walked. Preferably using QML only, but I'm not afraid of writing QML code either.<br>


<br>Thanks,<br>Timur<br></div></div>
<br></div></div>_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br></div>