mapbox / mapbox-navigation-ios

Turn-by-turn navigation logic and UI in Swift on iOS
https://docs.mapbox.com/ios/navigation/
Other
861 stars 314 forks source link

User puck should not begin turning while stopped at a red light #1078

Closed bsudekum closed 4 years ago

bsudekum commented 6 years ago

Sometimes while stopped at a red light an the maneuver is to take a 90 degree left/right turn, I notice the calculated course is somewhere between the current and upcoming step.

             90°
^----------------->
|
|
| 0°
|
|
|
+

In the case above, the user puck would directly in the middle of the intersection, and the calculated course would be 45°.

One definite answer to why this is occurring is because we allow the calculated course to derive from both the current and upcoming maneuver:

https://github.com/mapbox/mapbox-navigation-ios/blob/39c88ce32e0e4f8cf2df72c6974b2caebc12dc9f/MapboxCoreNavigation/RouteController.swift#L335

Unsure how this would effect things, but one option is to allow the snapped location to be calculated by nearByCoordinates and allow the snapped course to be calculated with the current step coordinates only.

/cc @mapbox/navigation-ios

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

Stale.