Elle Anderson

posted this on April 12, 2012 02:33 PM

*How Strava measures and displays distance**General Discussion on Methods of Calculating Distance**Recording distance on a GPS device*

*Relevant articles: **How to Accurately Calibrate your GSC-10 Speed/Cadence Sensor for Garmin*

When a Garmin file is uploaded, Strava takes the distance data recorded in the file and parses it into a data stream to calculate total distance, average speed and max speed. Depending on which method for recording distance is used (see explanation below), that data will be reflected in the distance stream, and thus on Strava. Under normal conditions, differences should be minimal when comparing distance or speed metrics on Strava versus the Garmin device, but any small inconsistencies are likely due to number crunching on both ends - Strava proceses and analyzes the data in the file independently, whereas the Garmin tabulates these values on the device itself.

**Also during the upload process, the Strava uploader detects any outlier GPS data that may be present in your file - this includes inaccurate GPS points and data that is clearly inconsistent within the file. This bad data detection is an effort to improve the quality of uploaded data on Strava, and does solve many issues with GPS inconsistencies. If, and only if, outlier/bad GPS data is detected, the distance calculation will be reprocessed automatically based on your GPS coordinates (see "**

When mobile data is synced with our servers from the iPhone or Android App, Strava runs a GPS-based distance calculation on the GPS coordinates, as we do not currently gather data from a speed/cadence sensor from the Strava App.

**Where distance matters: **Distance is the most basic training statistic - therefore, being confident in your distance data is important. Unfortunately, there are a few ways to gather distance data on a bike (or run) and each method of gathering the data can and may introduce some inaccuracy.

On Strava, distance contributes to your overall distance totals, whether it is in your Training Calendar, the Bar Graph on the Profile page, or in your Overall and Yearly stats in the Profile sidebar. Additionally, distance readings contribute to your average speed, as average speed is calculated from distance over your total moving time. Distance does not, however, contribute to your segments or segment times. Segment times are based on when you cross the start and endpoints of a segment.

Therefore, distance is mostly a personal metric and statistic, except when Strava runs a distance-based Challenge, like the Base Mile Blast, and in that case distance would be competitive.

**How to gather distance data: **There are mainly two ways to calculate distance for most sports - Ground Speed Distance and GPS-calculated Distance. Ground speed will measure your speed along the surface you are traveling (counting the revolutions of a wheel), and GPS-calculated distance will "connect the dots" between your GPS points and triangulate the distance between the coordinates. GPS-based distance assumes a flat surface and cannot account for vertical speed, or the 3D velocity vector that would take into account the increase in distance with topography. However, the effect on topography for GPS-calculated distance is minimal - for a 10% grade, distance would only increase by 0.5%. For a 20% grade, distance would increase by 2%. This explains why GPS-calculated distance can sometimes be slightly shorter when compared with ground speed distance from a wheel sensor. The following discusses some of the common methods for calculating distance:

**1. GPS-based, Garmin device approach: ***A Garmin device will calculate your distance accumulated in "real time" while the device is recording based on the GPS data. *

**Pros: **Refined Garmin calculation to gather distance data that is built into the file in the distance stream, measured in meters.

**Cons: **The complicated nature of this "real time" calculation can lead to stuck points, where no additional distance is recorded from the previous point, which can cause some Strava calculations like Best Efforts for Run to fail. Since this is a GPS-calculated distance, a flat surface is assumed, and vertical speed from topography is not accounted for. Also, some accumulated distance may be lost as straight lines connect each GPS coordinate, instead of an arc. This method of calculation does not capture variations in route between GPS points, and may vary further when Garmin's "Smart Recording" does not record datapoints regularly.

**2. GPS-based, Strava post-upload approach: ***After GPS data is recorded, and uploaded to Strava, the data is parsed into streams of data and analyzed. At this time, a calculation can be run on the GPS coordinates to get distance. This is how Strava determines distance for all mobile data from our iPhone and Android Apps. *

**Pros: **Post-upload GPS-based distance can eliminate problems like stuck points (see above) and create smoother, more accurate distance data than the Garmin equivalent.

**Cons: **A flat surface is assumed, and vertical speed from topography is not accounted for. Similar to the above, straight lines connect the GPS datapoints.

**3. Speed/Cadence Sensor Garmin GSC-10 approach: **

**Pros: **A wheel sensor will capture vertical speed and the additional percentage of distance accumulated with changes in elevation. For Mountain Bikers who gain and lose a lot of elevation gain rapidly, this could become a slightly more significant factor.

**Cons: **Common problems with relying on a wheel sensor include: Wheel size is not documented accurately, device is moved to another bike with different wheel size and not adjusted, the Auto wheel size is calculated wrong either because of GPS inaccuracies or because the magnet did not count every wheel revolution. See this article for how to ensure you get the most accurate distance data and the correct wheel setting.

**Hierarchy of Garmin Device inputs when multiple Distance data sources exist:**

What happens if you have a power tap or a GSC-10 Speed/Cadence sensor or both? When the Edge has multiple sources for the same information it uses a predetermine selection process to go with what it considers will be the most accurate source.

- If you have a Power Tap hub connected to your Gamin, it will take speed readings from the Power Tap hub above all other inputs.
- If you have a GSC-10 Speed/Cadence sensor, the Garmin will take readings from this output over the GPS-calculated distance.
- If you have neither, the Garmin will calculate distance based on GPS.

The key is that the data from either of these sources are seamlessly incorporated into the recorded file, under the distance stream. In some cases, the speed in MPH is documented in the file also, as an extension. Regardless, each Garmin-produced file has a distance stream of data measured in accumulated meters that serves to measure total distance and speed (both max and average).

Topic is closed for comments