[SailfishDevel] Measuring distance with GPS

Niels Christian Ørgaard ncothang at gmail.com
Mon Jul 7 18:52:17 UTC 2014


Hi Timur,

I was literally googling something similar earlier today (contemplating a
quick health-app), and came across this:
http://qt-project.org/forums/viewthread/19189

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.

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.
Example:
http://www.ridgesolutions.ie/index.php/2013/11/14/algorithm-to-calculate-speed-from-two-gps-latitude-and-longitude-points-and-time-difference/

Cheers,
Nc.


2014-07-07 20:13 GMT+02:00 Timur Kristóf <timur.kristof at gmail.com>:

> Hi,
>
> 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.
>
> Thanks,
> Timur
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140707/7bf6bdea/attachment.html>


More information about the Devel mailing list