Modularization

VERSION 0.3.34
PUBLIC PREVIEW

Navigation SDK for Android is only available upon request. Contact us to get started.

The architecture of the TomTom SDKs is modular, meaning that each navigation component is independent of the others. As a result, components can easily be replaced with ones from other sources or left out if they are not needed. That makes it easier to change the standard SDK to address a specific use case. These replaceable components are referred to as engines.

Orchestrator

The Navigation module depends on engines to orchestrate a pipeline after each location update. Different engines are used during different parts of the navigation flow, as shown below.

ss navigation flow

The orchestrator contains two main checks to determine if calculation should continue or stop for a given location update. After matching a location to the map and providing location context, the pipeline stops if navigation:

  • is in free driving mode (there is no route).
  • has detected a deviation from the route.

If none of the conditions is met, the flow proceeds with calculating route progress. A deviation event stops the rest of the pipeline from executing and switches navigation to free driving mode.

Engines

The orchestrator works with the following engines:

The LocationEngine is part of the Location module. All of the other engines are in the Navigation module.

Customized engines can be specified in two ways:

  • During creation of the NavigationConfiguration object.
  • Dynamically on an existing TomTomNavigation object.
    1tomTomNavigation.setLocationEngine(locationEngine)
    2tomTomNavigation.setMapMatchingEngine(mapMatchingEngine)
    3tomTomNavigation.setLocationContextProviderEngine(locationContextProviderEngine)
    4tomTomNavigation.setGuidanceEngine(guidanceEngine)
    5tomTomNavigation.setRouteProgressDetectionEngine(routeProgressCalculationEngine)
    6tomTomNavigation.setRouteTrackingEngine(routeTrackingEngine)
    7tomTomNavigation.setArrivalDetectionEngine(arrivalDetectionEngine)