HorizonSnapshot
public struct HorizonSnapshot
Snapshot of the horizon provided by the horizon engine, 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 horizon paths, 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 horizon snapshot state.
Declaration
Swift
public let state: HorizonSnapshotState -
The main path is the path on which the vehicle is located.
Declaration
Swift
public func mainPath() -> HorizonPath?Return Value
The main horizon path.
-
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