mapbox / mapbox/mapbox-navigation-android

Identifying exit numbers in roundabouts

Open
#4,855 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Android Auto improvement jira-sync-complete
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

**Mapbox Navigation SDK version:** 2.0.0-rc.2

https://hey.mapbox.com/directions-debug/#route=6.124388228364182,45.9055553186453;6.126108200540244,45.90652815414734&server=https://api.mapbox.com&profile=mapbox/driving-traffic&style=empty&queryparams=steps%3Dtrue%26overview%3Dfull%26geometries%3Dgeojson%26roundabout_exits%3Dtrue%26voice_units%3Dimperial%26voice_instructions%3Dtrue&token=pk.eyJ1Ijoic3ZjLW9rdGEtbWFwYm94LXN0YWZmLWFjY2VzcyIsImEiOiJja2d0bHMxbDcwNHI0MnRxbHBwNTBoeHN0In0.X5Gn0apaqXAXDkZ1sSDLfA

Directions API provides an exit number
```
"maneuver": {
"type": "roundabout",
"exit": 3,
"instruction": "Enter the roundabout and take the 3rd exit onto Avenue de Brogny/D 1201.",
"modifier": "slight right",
"bearing_after": 123,
"bearing_before": 94,
"location": [
6.125695,
45.90563
]
},
```

But I can't find this exit number from the navigation-ui Maneuver api. It seems like it should be near the ["degrees"](https://github.com/mapbox/mapbox-navigation-android/blob/bd097da71d4240b064af9a58614f3435cf803106/libnavui-maneuver/src/main/java/com/mapbox/navigation/ui/maneuver/model/PrimaryManeuver.kt#L33)

Here's the definition we're looking to satisfy for Android Auto from their `Manevuer.setRoundaboutExitNumber`
```
For example, if the driver is joining a counter-clockwise roundabout with 4 exits,
then the exit to the right would be exit #1, the one straight ahead would be exit #2,
the one to the left would be exit #3 and the one used by the driver to join the
roundabout would be exit #4.
```

cc: @cafesilencio @abhishek1508 @Guardiola31337

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the roundabout maneuver data from the Directions API and the PrimaryManeuver.kt definition linked in the issue. Trace how maneuver fields reach the navigation-ui Maneuver API, then expose the roundabout exit number using the Android Auto Maneuver.setRoundaboutExitNumber definition; done means the requested exit number is available for this route.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.