Skip to main content

MagnetometerReadingEvent

A sensor sample from a magnetometer.

Magnetometers measure the ambient magnetic field surrounding the sensor, returning values in microteslas μT for each three-dimensional axis.

Consider that these samples may bear effects of Earth's magnetic field as well as local factors such as the metal of the device itself or nearby magnets, though most devices compensate for these factors.

A compass is an example of a general utility for magnetometer data.

Inherits: Event

Properties

  • timestamp - Event timestamp.
  • x - Ambient magnetic field on the X axis, in microteslas (uT).
  • y - Ambient magnetic field on the Y axis, in uT.
  • z - Ambient magnetic field on the Z axis, in uT.

Properties

timestampinstance-attribute

timestamp: datetime

Event timestamp.

xinstance-attribute

x: float

Ambient magnetic field on the X axis, in microteslas (uT).

yinstance-attribute

y: float

Ambient magnetic field on the Y axis, in uT.

zinstance-attribute

z: float

Ambient magnetic field on the Z axis, in uT.