[BUG]: Incorrect Avg speed. Exchanged values km/h mph #18

Closed
opened 2025-07-08 08:37:41 -04:00 by AtHeartEngineer · 0 comments

Originally created by @juanro49 on 6/26/2025

Checklist

  • I have searched existing issues to make sure this bug hasn't already been reported.
  • I have checked the documentation at https://docs.endurain.com and didn't find a solution.

Description

While reviewing activities imported from Strava, I noticed that the values shown in Avg speed are incorrect. When the units are set to metric units (km/h), it shows the unit correctly, but the value is the one corresponding to mph. The same happens the other way around, if I select imperial units, it shows mph as the unit, but the value is the one corresponding to km/h.

Steps to Reproduce

  1. Version: Docker image version dev_25062025

Expected Behavior

That when metric units are selected, the value corresponding to km/h is displayed and when imperial units are selected, the value corresponding to mph is displayed.

Screenshots, logs or files

Activity detail in metrics units

Image

Activity detail in imperial units

Image

Additional Context

Link to an example activity https://oraclearm.dynme.ovh/activity/304. For the linked activity, we can see that if we calculate the distance (26.62 km) divided by the time (89.25 minutes), and multiply it by 60 minutes, the average speed should be 19.89 km/h, but in the screenshot it shows 12 km/h.

If we do the calculation in imperial system, we see that it is 16.54 mi between 89.25 minutes by 60 minutes, it comes out an average of 11.12 mph, but the capture shows 19 mph.

Seeing what should be shown for each one according to the calculations, 19 km/h and 11 mph, and the values that appear in the screenshots sent, 12 km/h and 19 mph, it can be deduced that it seems that the problem is that when metric units are selected, the imperial value is being shown, and when imperial units are selected, the metric value is being shown.

*Originally created by @juanro49 on 6/26/2025* ## Checklist - [X] I have searched **existing issues** to make sure this bug hasn't already been reported. - [X] I have checked the **documentation** at [https://docs.endurain.com](https://docs.endurain.com) and didn't find a solution. ## Description While reviewing activities imported from Strava, I noticed that the values shown in Avg speed are incorrect. When the units are set to metric units (km/h), it shows the unit correctly, but the value is the one corresponding to mph. The same happens the other way around, if I select imperial units, it shows mph as the unit, but the value is the one corresponding to km/h. ## Steps to Reproduce 1. Version: Docker image version [dev_25062025](https://github.com/users/joaovitoriasilva/packages/container/endurain/446713261?tag=dev_25062025) ## Expected Behavior That when metric units are selected, the value corresponding to km/h is displayed and when imperial units are selected, the value corresponding to mph is displayed. ## Screenshots, logs or files Activity detail in metrics units ![Image](https://github.com/user-attachments/assets/ab25c487-4859-49b5-bdeb-e1c16bdbbb9e) Activity detail in imperial units ![Image](https://github.com/user-attachments/assets/7ccf6c55-f757-4c21-9443-52f21b18ba1c) ## Additional Context Link to an example activity https://oraclearm.dynme.ovh/activity/304. For the linked activity, we can see that if we calculate the distance (26.62 km) divided by the time (89.25 minutes), and multiply it by 60 minutes, the average speed should be 19.89 km/h, but in the screenshot it shows 12 km/h. If we do the calculation in imperial system, we see that it is 16.54 mi between 89.25 minutes by 60 minutes, it comes out an average of 11.12 mph, but the capture shows 19 mph. Seeing what should be shown for each one according to the calculations, 19 km/h and 11 mph, and the values that appear in the screenshots sent, 12 km/h and 19 mph, it can be deduced that it seems that the problem is that when metric units are selected, the imperial value is being shown, and when imperial units are selected, the metric value is being shown.
AtHeartEngineer added the bugbugbugbugbugbugbug labels 2025-07-08 08:37:43 -04:00
Sign in to join this conversation.
No Label bug bug bug bug bug bug bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/endurain#18