HorizonSnapshot
public struct HorizonSnapshot
Warning
This is an experimental API. It may be changed or removed at any time without notice. Use of this API is strongly discouraged.-
Positions are sorted by the most likely place the user is.
Declaration
Swift
public let positions: [HorizonPosition]
-
Get the most probable path from the alternatives.
Declaration
Swift
public func mainPath() throws -> HorizonPath
Return Value
The most probable path.
-
Get all the horizon elements that are untill a certain
distanceAhead
of the current position in the mainPathDeclaration
Swift
public func elementsAhead(inDistance distanceAhead: Measurement<UnitLength>) throws -> [HorizonElement]
Parameters
inDistance
The distance for which we want
HorizonElements
Return Value
List of found
HorizonElements
-
Calculates the tree distance to the given horizon element. Negative values indicate elements the vehicle has already passed. Positive values indicate elements ahead of the vehicle.
Declaration
Swift
public func distanceTo(element: HorizonElement) throws -> Measurement<UnitLength>
Parameters
element
The element to which we want to know the distance.
Return Value
The tree distance to the horizon element.