mapbox / mapbox/mapbox-navigation-android

mapboxreplay jumping to specific location in virtual driving

Open
#7,799 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

Hi
While demonstrating the virtual drive using replay location, I sometimes need to skip to specific points, I do this by pushing the events as you can see in the below code then calling seek to function.
For unknown reasons sometimes it is not working and I got " [nav-native]: Location is not coherent with previous one. Filtering... , [nav-native]: Location at timestamp 37348087802165ns was filtered out." in the logs

`val events: ArrayList = arrayListOf()
var constTime = 1000
locations?.forEach { location->
val time = Date().time.toDouble() + constTime
Log.d("_currentTimeMillis_",time.toString())
val e = ReplayRouteMapper.mapToUpdateLocation(
time,
location
)
constTime += 1000
events.add(e)
}

//push the events

mapboxReplayer.pushEvents(events)
//to seek to event
val point = mapBoxViewModel.jumpingLocations.value?.get(step) ?: return
mapboxReplayer.stop()
// mapboxReplayer.pushEvents(events = listOf(event))
//mapboxReplayer.playFirstLocation()
mapboxReplayer.seekTo(event)
mapboxReplayer.play()
`

**Android API:** 34
**Mapbox Navigation SDK version:**2.5.3

### Steps to trigger behavior

1.push the events to mapboxplayer
2.at run time stop, seek to an event then play
3.sometimes it is not seek

### Expected behavior
Expected to seek to the point all the time
### Actual behavior
some times it is stay at the same position with the below logs :
[nav-native]: Location is not coherent with previous one. Filtering...
[nav-native]: Location at timestamp 37348087802165ns was filtered out.
[nav-native]: Got location timestamp from the past: 30773684685738ns <= 30773881864863ns. No status will be produced.

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

Reproduce the issue by calling ReplayRouteMapper.mapToUpdateLocation, then mapboxReplayer.pushEvents, stop, seekTo, and play as described. Inspect the event timestamps and the replay state around seekTo; done means seeking consistently reaches the requested location without nav-native filtering or out-of-order timestamp logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.