RunnerGuy98765 wrote:
Respectfully Sneakers.. You obviously didn't read the code and you don't seem to know the data Strava gives you when you download PJ's activity GPX or hit the streams API. I don't use speed data from Strava and speed is not in the GPX or the streams API json. The speed comes from my python code calculating distance between two sequential latitude longitude coordinates, from the GPX file. Look at the code, I used geopy.distance.geodesic() to get the distance and calculate speed from there. You can add smoothing if you want but I was just using this code to flag specific areas where it looks odd and then I look into those times/places more closely. Anyway I agree, I very well may be doing something wrong but I posted the code and so if I am.. y'all can just point out the bug and post a fix for it here.
You are a smart cookie. I skimmed your code but didn't really read it because I am lazy.
The problem you have is because you need noise reduction/smoothing on the GPS coordinates to minimize GPS position errors. Otherwise the speed calculation in your code looks right. You should try a Kalman filter on the coordinates with an accuracy of 50.