I have an established 16 mile mountain bike loop I've been riding for a long time. I recently purchased a Magellan Cyclo 315 bike computer which I load files to Strava Premium from. Everything works great except the distance data. The distance value on the computer is always very close to 16 miles, but when I upload the data to Strava (.gpx file) the distance is between 15.2 and 15.4 miles. Any suggestions on how to correct this problem?
It might have to do with how frequently the computer writes your GPS location to file. To optimize storage some write out a location to file once every few seconds, but carry out its own calculations on a higher resolution dataset in-memory before purging. If your route is quite twisty this can result in a shorter distance as Strava (and everyone else) assumes a straight line between locations in a .gpx file (this is really the only workable assumption).
Check your bike computer settings, some allow you to specify the recording resolution (e.g., once per second). The downside could be that your computer may not be able to store as many tracks as a lower resolution setting (e.g., once every 5 seconds).
If you have the 315hc model with the speed/cadence sensor then there can be a discrepancy if your wheel size is entered incorrectly. Strava
prefers wheel sensors over GPS because of GPS update frequency issues that the other answer notes has its own proprietary way of calculating distance (most likely also incorporating other people's data who have used the same route) that doesn't correspond to your wheel-distance or gps-distance as calculated by your GPS.
Strava has a proprietary secret algorithm for internally calculating distance, which involves smoothing the GPS data internally, although the original GPS data points are still stored in your history. If that Strava-calculated distance varies from the device distance more than a threshold, Strava replaces the device distance with the Strava distance. The Strava distance is not calculated by mapping your course to road and measuring the distance along a road. Strava distance also does not account for elevation change - while that is negligent for shallow slopes, you will be losing ~2% of your distance will climbing a 10% slope.
Strava's distance algorithm tends to lose distance over windy roads, perhaps because it is by design blind to the actual road traveled, so the windiness is removed as noise. It shouldn't be difficult to calibrate your distance sensor along a track of known distance. Then you can know the answer.
There is a combination of 2 things that might be going on here. 1- The GPS trail you have has a certain degree of uncertainty (+- 1 to 10m depending on signal quality). Depending on the sampling frequency it can make it look as though you are zig-zagging and add a bit of distance vs your actual path traveled. Some algorithms can smooth this out but it is not 100% accurate.
2- Your cycle computer's readout may based on the speed sensor which uses the rotation of your wheel & the diameter of that wheel. It multiplies the number of rotations by the tire circumference in order to obtain total distance traveled. There is a setting in your cycle computer to change the tire circumference and make it more accurate. The circumference depends on your wheel size, tire size, inflation and wear. If it is not accurate, it would give you a faulty distance measurement : https://www.cateye.com/data/resources/Tire_size_chart_ENG.pdf lists some of the circumferences for different wheel and tire sizes