-
Notifications
You must be signed in to change notification settings - Fork 118
Expose option to pass intermediate points for smooth location animation #166
Conversation
@LukasPaczos neat idea. do we have any metrics on the performance diff with this change? |
I don't have data, but there should be no perf difference. Normally, the framework would interpolate between A->B with an arbitrary amount of intermediate points (system determines that based on the framerate). While now, the system will still fill in some intermediate points, but we're also making it possible to define a fixed amount of them which the system will have to visit giving us a chance to better shape the path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…82f94024f3763797 to fix mapbox/mapbox-gl-native#16180 reproducible in the navigation sdk mapbox/mapbox-navigation-android#2452
9f81cbd
to
24ed3be
Compare
…gl-native-android#166) which includes fix for mapbox-gl-native mapbox/mapbox-gl-native#16180 crash
24ed3be updates |
Thanks @Guardiola31337 👍 |
…gl-native-android#166) which includes fix for mapbox-gl-native mapbox/mapbox-gl-native#16180 crash
…2452) * expose list of key points leading up to the enhanced location update * fix SimpleMapboxNavigation example * use env or project variables for bintray credentials * updated licenses * fix http client tests * bump mapboxMapSdk version to 9.0.0-20200207.215725-27 (mapbox/mapbox-gl-native-android#166) which includes fix for mapbox-gl-native mapbox/mapbox-gl-native#16180 crash * Follow up from #2452 (#2458) * make configure router http interface parameter nullable * add nn uncertain route state * expose nn cache last route api in mapbox navigator * remove lat long workaround not needed anymore as nn master-SNAPSHOT-0 includes the fix * bump mapbox-navigation-native version to ms-bearing-from-shape-on-interpolation-SNAPSHOT-2 * bumped maps sdk to the latest 9.1.0-SNAPSHOT * update MapboxTripSession tests * update SimpleMapboxNavigation example log level * remove explicit Bintray env variables declaration on CI Co-authored-by: Pablo Guardiola <guardiola31337@gmail.com>
This PR adds a
LocationComponent#forceLocation
overload, which allows passing a list of locations. The last location in the list is the desired target, while everything else makes up for the intermediate points in the otherwise linear location puck animation. This allows for better road geometry tracking and avoids "cutting" corners when 2 raw updates are on the opposite side of an intersection maneuver.This also exposes a
lookAheadUpdate
flag in the same method. If we have an ability to predict location updates, setting this flag totrue
will take the timestamp of the target location (last in the list) and calculate the animation duration equal toThis allows minimizing the visual lag that a smooth animation would introduce otherwise.
/cc @SiarheiFedartsou @mskurydin