Home > @magiclane/maps-sdk > MagneticField

MagneticField class

Magnetic field sensor data.

Reports raw magnetic field strength along three axes. Useful for environmental sensing or heading correction.

Sensor Data Source

Signature:

export declare class MagneticField extends GemAutoreleaseObject implements SenseData 

Extends: GemAutoreleaseObject

Implements: SenseData

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the MagneticField class.

Properties

Property

Modifiers

Type

Description

acquisitionTime

readonly

Date

Acquisition time

type

readonly

DataType

Get data type

x

readonly

number

The magnetic field strength along the X axis in microteslas.

y

readonly

number

The magnetic field strength along the Y axis in microteslas.

z

readonly

number

The magnetic field strength along the Z axis in microteslas.

Methods

Method

Modifiers

Description

toJson()

Serialize to JSON