Skip to content

Fix incorrect speed display: convert m/s to km/h in UI and helpers #1322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

framesfree
Copy link
Contributor

This resolves the issue where speeds appeared ~3.6x too low due to incorrect units.

Fixed `point_speed` in `application_helper.rb` to properly convert velocity from m/s to km/h, round to 1 decimal, and safely handle nil or zero values.
Updated `formatSpeed` in `helpers.js` to correctly assume incoming speed is in m/s and convert to km/h before formatting.
Patched `_point.html.erb` to use `point_speed(point.velocity)` for consistent and accurate speed display with units.
@Freika
Copy link
Owner

Freika commented Jun 9, 2025

The issue with this PR is that it will cause the same problem for those who don't experience wrong speed calculation. Have a look at https://github.com/Freika/dawarich/releases/tag/0.24.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants