MovesenseSensor class

Provides access to Movesense sensor data using the mds_flutter package.

This class enables streaming of accelerometer, gyroscope, and magnetometer data from a Movesense device connected over Bluetooth. It acts as a singleton and implements the Sensor interface, allowing it to be used interchangeably with other sensor types (e.g., SmartphoneSensor) in the mobility package.

The class manages the connection, subscription, and clean-up for all Movesense sensor streams. All data is emitted as SensorEvent objects.

Supported Sampling Rates

The following discrete sampling rates are supported by Movesense sensors (in Hz):

  • 12.5
  • 26
  • 52
  • 104
  • 208
  • 416
  • 833
  • 1666
Implemented types

Constructors

MovesenseSensor.new()
factory

Properties

connectedSerial String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

disconnect() Future<void>
Disconnects from the Movesense device and cleans up all sensor subscriptions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startAccelerometer(double samplingRate) Future<Stream<SensorEvent>>
Starts streaming accelerometer data from the Movesense device at the given samplingRate (Hz). Returns a stream of SensorEvents.
override
startGyroscope(double samplingRate) Future<Stream<SensorEvent>>
Starts streaming gyroscope data from the Movesense device at the given samplingRate (Hz). Returns a stream of SensorEvents.
override
startMagnetometer(double samplingRate) Future<Stream<SensorEvent>>
Starts streaming magnetometer data from the Movesense device at the given samplingRate (Hz). Returns a stream of SensorEvents.
override
stopAccelerometer() Future<void>
Stops streaming accelerometer data from the Movesense device.
override
stopGyroscope() Future<void>
Stops streaming gyroscope data from the Movesense device.
override
stopMagnetometer() Future<void>
Stops streaming magnetometer data from the Movesense device.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited