# Compute Distance using Speed Sensor

Marcel K shared this question ago

Is it possible to use the speed sensor of my bicycle to compute the cycled distance? As I see it, using the speed sensor gives more precise data since gps might be slightly inaccurate.

## Replies (5)

1

Hi Marcel,

whereas the speed is recorded from the external sensor, distance is always computed from GPS coordinates.

1

But makes no sense to take the worse data for the calculation.

1

Question: Is there a accurate compass at the bicycle sensor? Otherwise the distance accuracy will be "disturbed", too. Imagine you drive slalom, then dependent from the accuracy of the direction changes, the real distance will differ

;-) . Even pipelines under streets disturb compass. I think both ways of distance measuring have their pros and cons, none of them is better.

2

Hi all,

Locus Map is a tracking app that records georeferenced data - your GPS position in real time - in order to draw your movement as a line on map. Bike speed sensor doesn't record georeferenced data, just counts rounds of the bike wheel. As the app and the sensor output differs (slightly), we have to prioritize one of these outputs - the Locus. The question is if there is a method how to combine these two outputs into a reasonable final value.

1

The attached image shows the problem with using the GPS to compute the cycled distance compared to using the speed sensor. Especially in curves or near buildings or in the forest, the GPS is just too inaccurate. It makes sense to use the speed sensor to compute the distance, if a sensor is connected, since it measures the actual distance covered.

My idea would be to fill the attribute for the total distance for each trackpoint with the value from the speed sensor, if one is connected.

Also, I think the speed sensor should be used for stop detection as well, since the stop detection from GPS has similar issues. It is way more logical to define that the bikes is stopped if the wheel does not rotate

2

100 agree with Marcel's leaving the comments in the topic you suggest http://help.locusmap.eu/topic/improved-stop-detection-and-distance-calculation-with-a-speed-sensor