[Bug]: When simulation starts under `inTunnels` mode the `NavigationService` failed to send out notification
Mapbox Navigation SDK version
v2.1.1
Steps to reproduce
- Open
Example, set thenavigationViewController.navigationMapView?.userLocationStyle = .puck2D() - Set the location to a still customer location, build the app.
- Unselect the
simulationButton, to choose theinTunnelssimulation mode. - start navigation and wait till the simulation start
Expected behavior
The map puck will move because the NavigationService.simulate(intent:) is called to send out notification of simulation starts, and the NavigationViewController could set up simulated location provider for map puck.
Actual behavior
The map puck is stale because NavigationService.simulate(intent:) is not called.
Is this a one-time issue or a repeatable issue?
repeatable
Hi @1ec5 @Udumft , I noticed that there's an edge case. When the simulationMode is .inTunnels, and the poorGPS time elapsed is over the threshold, but the user location is not in tunnel, the NavigationService.simulate(intent:) is not called. And the NavNative starts simulation mode and sends Navigator the simulated location. And Router will still send the RouteProgress update to NavigationService and ignore the SimulatedLocationManager.
My questions is in this case, should we use our own SimulatedLocationManager in this case? If not, should we add the notification about the simulated location from Navigator and the RouteProgress? Otherwise, the result is that if the custom map puck would keep still while the route line and camera updated, they'll be out of synced.
Hey! Simulation does not kick in because inTunnels requires not only missing GPS data, but also user to be in a tunnel. There is currently an effort to unify simulation logic and move it from platforms to NN side, to avoid misleading and strange simulation behavior in some cases.
Yes, the simulation in our side shouldn't start, which is as expected. But the core Navigator receives the simulated location update from NavNative when the GPS is poor, and form the RouteProgress update. It's like in this case. But our UI side cannot identify it's the simulated one. So my question is, should we also stop the simulated location update from Nav Navigator? Or when it sends out the simulated location, our SDK should be notified.
Sorry, I might not understand the issue. Ticket description says that it is expected that simulation will kick in and puck will move when inTunnels simulation mode is selected. But I believe it should not because there are no conditions for poor GPS signal and tunnel road segment.
Yes. So right now the camera and route line is updated with the RouteProgress due to the simulation status provided by the NavNativeStatus. And this is not expected.
I see. I think this is related to planned NN's useIMU setting which interferes with simulation.
https://github.com/mapbox/mapbox-navigation-ios/issues/3881 is another case where the simulating will automatically start.