You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 2, 2026. It is now read-only.
Currently when using turn-by-turn navigation the remaining time/distance displayed for the current segment is based on the percentage of nodes traveled. Since nodes in corners are far more dense than on straight lines, this is a very inaccurate approximation.
To improve the distance, we could in theory calculate the distance traveled in each node ourselves based on the distance between nodes. However the remaining travel time would still be incorrect since a single segment could have different speed limits.
One simple solution would be to keep the current approximation and just re-route every once in a while to update it, but it's probably a good idea to look at how other applications generally do this.
Currently when using turn-by-turn navigation the remaining time/distance displayed for the current segment is based on the percentage of nodes traveled. Since nodes in corners are far more dense than on straight lines, this is a very inaccurate approximation.
To improve the distance, we could in theory calculate the distance traveled in each node ourselves based on the distance between nodes. However the remaining travel time would still be incorrect since a single segment could have different speed limits.
One simple solution would be to keep the current approximation and just re-route every once in a while to update it, but it's probably a good idea to look at how other applications generally do this.