SafetyLocationElement
public struct SafetyLocationElement : HorizonElement
HorizonElement
that contains data about a safety location.
To receive such elements in the HorizonSnapshot
, specify HorizonElementType
.safetyLocationType
in the HorizonOptions
that you register with the HorizonEngine
:
let horizonOptions = HorizonOptions(
id: UUID(),
elementTypes: [.safetyLocationType],
...
)
Type of the element. Used to filter elements by type.
Declaration
Swift
public let elementType: HorizonElementType
End offset on the HorizonPath
. If a zone safety location stretches beyond the end of the horizon,
the SDK only provides data for the part of the zone within the horizon length.
As the horizon is extended ahead of the vehicle while the vehicle moves along the zone safety location,
the end offset of the safety location element is updated accordingly.
Declaration
Swift
public let endOffset: Measurement<UnitLength>
Identifier of this element.
Declaration
Swift
public let id: Int
Initializes instance of SafetyLocationElement
.
Declaration
Swift
public init(
id: Int,
pathID: Int,
startOffset: Measurement<UnitLength>,
endOffset: Measurement<UnitLength>,
safetyLocation: SafetyLocation
)
Identifier of the HorizonPath
to which this element belongs.
Declaration
Swift
public let pathID: Int
Safety location data.
Declaration
Swift
public let safetyLocation: SafetyLocation
Start offset on the HorizonPath
.
Declaration
Swift
public let startOffset: Measurement<UnitLength>