EHorizon
An Electronic Horizon is a probable path (or paths) of a vehicle within the road graph which is used to surface metadata about the underlying edges of the graph for a certain distance in front of the vehicle thus extending the user's perspective beyond the “visible” horizon.
Mapbox Electronic Horizon correlates the vehicle’s location to the road graph and broadcasts updates to the Electronic Horizon as the vehicle’s position and trajectory change.
In Active Guidance state, the user-selected route and its metadata are used as the path for the Electronic Horizon. In a Free Drive state there is no active route selected, Mapbox Electronic Horizon will determine the most probable path from the vehicle’s current location. For both states Active Guidance and Free Drive, the Electronic Horizon and its metadata are exposed via the same interface as described below.
We represent the road network ahead of us as a tree of edges. Each intersection has outbound edges and each edge has probability of transition to another edge as well as metadata which can be used to implement sophisticated features on top of it.
The EHorizon is a simple tree structure that can be navigated easily by traversing the Edges and their outgoing connections. This can be done by simply looping over the Edges or using a Visitor. For common cases, a number of utilities have been added which are described below.
NOTE: The Mapbox Electronic Horizon feature of the Mapbox Navigation SDK is in public beta and is subject to changes, including its pricing. Use of the feature is subject to the beta product restrictions in the Mapbox Terms of Service. Mapbox reserves the right to eliminate any free tier or free evaluation offers at any time and require customers to place an order to purchase the Mapbox Electronic Horizon feature, regardless of the level of use of the feature.
Parameters
Functions
Get the current edge given the position
Get the MPP starting at the first Edge in the EHorizon
Get the MPP starting at the current EHorizonPosition