HorizonSnapshot
public struct HorizonSnapshot
Snapshot of the horizon provided by the HorizonEngine based on a set of previously registered
horizon options. Subscription options define the extent of the paths on the horizon
as well as which map attributes are collected for those paths.
Important
This is a Public Preview API. It may be changed or removed at any time.-
The array of
HorizonPath, consisting of the main path and zero or more sub-paths. The main path is where the vehicle is located. A sub-path is any path in the horizon snapshot that is not the main path.Declaration
Swift
public let paths: [HorizonPath] -
The
HorizonSnapshotState.Declaration
Swift
public let state: HorizonSnapshotState -
Returns the main horizon path. The main path is the path on which the first on-road
HorizonPositionis located.Declaration
Swift
public func mainPath() -> HorizonPath?Return Value
Main
HorizonPath. Null if there is no on-road position. -
Calculates the tree distance to the given horizon element from set position. Negative values indicate elements the vehicle has already passed. Positive values indicate elements ahead of the vehicle.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public func distance( to element: HorizonElement, from position: HorizonPosition ) -> Measurement<UnitLength>?Return Value
The tree distance to the horizon element.
HorizonSnapshot Structure Reference