jacdac.compass

Submodules

Package Contents

Classes

CompassClient

A sensor that measures the heading.

class jacdac.compass.CompassClient(bus: jacdac.bus.Bus, role: str, *, missing_heading_value: Optional[float] = None)

Bases: jacdac.bus.SensorClient

A sensor that measures the heading. Implements a client for the Compass service.

property heading Optional[float]

The heading with respect to the magnetic north., _: °

property enabled Optional[bool]

Turn on or off the sensor. Turning on the sensor may start a calibration sequence.,

property heading_error Optional[float]

(Optional) Error on the heading reading, _: °

calibrate() None

Starts a calibration sequence for the compass.