HERE iOS SDK Developer's Guide

NMAElectronicHorizon

Class Summary

class NMAElectronicHorizon

Derived from: NSObject

NMAEHElectronicHorizon uses the vehicle position, the ingested map topography and other related road attributes, to calculate the most probable, as well as alternative paths, structured as a NMAEHPathTree of roads bundling information on form of ways, roundabouts, carriageways, as well as interchange and service roads to efficiently prepare a driver.

Include: NMAKit.framework/headers/NMAElectronicHorizon.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAElectronicHorizon

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, weak] id< NMAElectronicHorizonDelegate delegate

Receives event callbacks containing information about the tree

[readable, strong] NMAEHMapAccessor mapAccessor

An instance of NMAEHMapAccessor, which can be used to access the information about any link

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(nonnull instancetype) init

-(nullable NSError *) setLookAheadDistancesInCentimeters:(nonnull NSArray< NSNumber * > *) distances

Sets look-ahead distances to limit the length of the predicted main path and its side paths

-(nullable NSError *) setRoute:(nonnull NMARoute *) route

Sets a route to follow

-(nullable NSError *) setTrailingDistanceInCentimeters:(NSInteger) distance

Sets trailing distance to remove links when they are fully beyond the threshold starting off from the vehicle's current position

-(nullable NSError *) update

Updates electronic horizon with a new position

Class Details

NMAEHElectronicHorizon uses the vehicle position, the ingested map topography and other related road attributes, to calculate the most probable, as well as alternative paths, structured as a NMAEHPathTree of roads bundling information on form of ways, roundabouts, carriageways, as well as interchange and service roads to efficiently prepare a driver.

While online and offline prediction is supported to provide a forecast for over several kilometers ahead, usage of pre-downloaded map data is highly recommended. Offline maps require the NMAMapDataGroupADAS and NMAMapDataGroupLinkGDBIdPVId data groups to be enabled.

Public Property Details

[readable, writable, weak] id< NMAElectronicHorizonDelegatedelegate

Receives event callbacks containing information about the tree.

See also:

NMAElectronicHorizonDelegate

[readable, strong] NMAEHMapAccessormapAccessor

An instance of NMAEHMapAccessor, which can be used to access the information about any link.

Instance Method Details

-(nonnull instancetype) init

Initialize a NMAElectronicHorizon instance

-(nullable NSError *) setLookAheadDistancesInCentimeters:(nonnull NSArray< NSNumber * > *) distances

Sets look-ahead distances to limit the length of the predicted main path and its side paths.

The first value defines the threshold for the main path. If nothing is set, the default look-ahead distance is 800'000 centimeters (8 kilometers).

The subsequent values define the threshold of the side paths (children). A child path starts to branch from a parent path, which is determined by the preceding value. A look-ahead distance always starts from the vehicle's current position to the beginning of the last link that exceeds the distance. Links beyond this threshold will not be used for building the path.

If n is the number of distances set, then electronic horizon will always try to provide n + 1 side paths. By default, the last paths are stubs and will contain only the first link of the related road segment.

Parameters:

  • distances

    An array of distances in centimeters from which the number of side paths is determined.

Returns:

error if the operation was not successful, otherwise nil.

-(nullable NSError *) setRoute:(nonnull NMARoute *) route

Sets a route to follow. Electronic horizon will take the route into account when building the most probable path.

Note:

Only the routes with transport mode NMATransportModeCar or NMATransportModeTruck are supported.

Parameters:

  • route

    Route to follow.

Returns:

error if the operation was not successful, otherwise nil.

-(nullable NSError *) setTrailingDistanceInCentimeters:(NSInteger) distance

Sets trailing distance to remove links when they are fully beyond the threshold starting off from the vehicle's current position.

Note:

The default trailing distance is 10'000 centimeters (100 meters).

Parameters:

  • distance

    The distance in centimeters.

Returns:

error if the operation was not successful, otherwise nil.

-(nullable NSError *) update

Updates electronic horizon with a new position. After calling update, the path tree might be changed in parts or as a whole.

Returns:

error if the operation was not successful, otherwise nil.