[SailfishDevel] Measuring distance with GPS
Caliste Damien
dcaliste at free.fr
Tue Jul 8 19:32:35 UTC 2014
Hello,
Le lundi 07 juillet 2014, Timur Kristóf a écrit :
> 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.
Answers have been already given on how to do this in C++ or in QML. I
just would like to add some remarks :
- if you sum up the distance between GPS fix at regular intervals (some
seconds), you may end up with a total distance that is greater than the
actual distance, especially because of some portions of your path that
are not very accurate and put you away from your actual path (think
about passing under a bridge, or your GPS is in your pocket, or you are
close to the start of the GPS fix so the accuracy is still low…)
- I don't know how Modrana is doing this, but I decided to keep for
actual distance measurements, only fixes with a reasonable
horizontal accuracy (e.g. lower that 30 meters), in my application (cf.
Maep-qt on github)
- It's quite interesting to save a series of fixes at 1 second interval
for instance from start of GPS to end of 30 minutes walking in
different conditions. When plotting h_acc(t), you can see that it's
improving by plateau and when the signal is correct (typically after
some minutes) the h_acc is below 30m for most of the fixes. Then, plot
deltaD(t) and h_acc(t) together (deltaD being the distance walked in 1
second), you'll see that for high h_acc values the deltaD values are
quite spurious for a walking person and thus should be ignored.
Thus, I would suggest to calculate the total distance by summing up
distances between fixes with a lower enough horizontal accuracy.
Regards,
Damien.
More information about the Devel
mailing list