OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
navigation.android_magnetometer_adapter.AndroidMagnetometerAdapter Class Reference

Adapt Android device-frame magnetic field to the ORC vehicle frame. More...

Inheritance diagram for navigation.android_magnetometer_adapter.AndroidMagnetometerAdapter:
navigation.magnetometer_source_if.MagnetometerSourceIf

Public Member Functions

bool is_connected (self)
 Return whether the source is connected and ready.
 
None connect (self)
 Connect to the magnetometer source.
 
None disconnect (self)
 Disconnect from the magnetometer source.
 
MagnetometerSample read_magnetometer (self)
 Read magnetic field strength in microteslas along each device axis.
 

Detailed Description

Adapt Android device-frame magnetic field to the ORC vehicle frame.

The default phone mount is portrait and screen-up with the top of the phone pointing toward the vehicle front. Android +X points toward the phone's right edge, +Y toward its top, and +Z out of the screen. The ORC vehicle frame is right-handed with +X forward, +Y left, and +Z up.

Member Function Documentation

◆ is_connected()

bool navigation.android_magnetometer_adapter.AndroidMagnetometerAdapter.is_connected (   self)

Return whether the source is connected and ready.

Returns
True when the source is connected and ready for measurements.

Reimplemented from navigation.magnetometer_source_if.MagnetometerSourceIf.

◆ read_magnetometer()

MagnetometerSample navigation.android_magnetometer_adapter.AndroidMagnetometerAdapter.read_magnetometer (   self)

Read magnetic field strength in microteslas along each device axis.

Returns
Latest normalized magnetic-field sample.

Reimplemented from navigation.magnetometer_source_if.MagnetometerSourceIf.


The documentation for this class was generated from the following file: