Calculating "travelled distance" of a GPS track without including "stops"

I have a set of GPS tracks from a cycling event and I want to correlate their distance along the route.

Problem is: when a rider stops, generally by entering a covered place, GPS keeps logging (low precision) points around its location, and by summing those noisy segments I get a false increase in travelled distance.

If I look at the plotted tracks, it's easy to "see" that actually the rider didn't move, but how could I create some cumulative distance algorithm that "doesn't count" some points because the rider is "obviously not moving" there?

One interesting thing I noticed: if I consider only one coordinate, for example, only latitude for a road heading straight north, the fuzzy points at a stop keep wandering back and forth around a definite latitude, the same applying for longitude (although in this case that would be the same longitude of every point of that road segment, because it is "vertical" on the map).

But if I use euclidean distance, then this random movement is converted always into "forward" movement and keeps increasing the distance.

If the stop were in the middle of a straight road, I could get the average direction and "normalize" and average the positions along the road direction, but oftentimes the stop point is at a sharp turn (a cross-road) or it is the turning back point of a route.

Is there any known method for this, or does anyone have a suggestion?