jacdac.magnetometer

Submodules

Package Contents

Classes

MagnetometerClient

A 3-axis magnetometer.

class jacdac.magnetometer.MagnetometerClient(bus: jacdac.bus.Bus, role: str, *, missing_forces_value: Tuple[int, int, int] | None = None)

Bases: jacdac.bus.SensorClient

A 3-axis magnetometer. Implements a client for the Magnetometer service.

property forces: Tuple[int, int, int] | None

Indicates the current magnetic field on magnetometer. For reference: 1 mgauss is 100 nT (and 1 gauss is 100 000 nT)., x: nT,y: nT,z: nT

property forces_error: int | None

(Optional) Absolute estimated error on the readings., _: nT

calibrate() None

Forces a calibration sequence where the user/device might have to rotate to be calibrated.