Skip to content

Vehicle Bearing Calibration

Vehicle bearing calibration

This tutorial shows how to calibrate vehicle bearing for mobile devices. When the TA SDK is used on a mobile device, the bearing may be inaccurate. To avoid the possible sudden change of the bearing, it's recommended to turn on bearing calibration.

Get started

Turn on bearing calibration at the creation of navigation service to enable it for the whole life cycle of the session.

1
2
3
4
5
6
7
// turn on bearing calibration
const auto settings = tn::foundation::Settings::Builder()
    .setString(tn::drive::api::SettingConstants::SETTING_POSITION_HEADING_CALIBRATION, "true")
    .build();

const auto navigationService = tn::drive::api::NavigationServiceFactory::createNavigationService(
    options, system, settings, mapContent, directionService);