MetaWear C# SDK  1.2.0
C# API for MbientLab's sensor platform
Public Member Functions | Properties | List of all members
MbientLab.MetaWear.Core.ISensorFusionBosch Interface Reference

Bosch algorithm combining accelerometer, gyroscope, and magnetometer data for Bosch sensors.
More...

Inheritance diagram for MbientLab.MetaWear.Core.ISensorFusionBosch:
MbientLab.MetaWear.IModule

Public Member Functions

void Configure (Mode mode=Mode.Ndof, AccRange ar=AccRange._16g, GyroRange gr=GyroRange._2000dps, object[] accExtra=null, object[] gyroExtra=null)
 Configure the sensor fusion algorithm More...
 
void Start ()
 Start the algorithm More...
 
void Stop ()
 Stop the algorithm More...
 
Task PullConfigAsync ()
 Pulls the current sensor fusion configuration from the sensor More...
 
Task< ImuCalibrationStateReadCalibrationStateAsync ()
 Reads the current calibration state from the sensor fusion algorithm. This function cannot be called until the sensor fusion algorithm is running and is only available on firmware v1.4.1+ More...
 
Task< ImuCalibrationDataCalibrate (CancellationToken ct, int pollingPeriod=1000, Action< ImuCalibrationState > progress=null)
 Convenience method to poll the calibration state until the required IMUs are in a high accuracy state More...
 
void WriteCalibrationData (ImuCalibrationData data)
 Writes calibration data to the sensor fusion algorithm. Combine this with IMacro module to write thr data at boot time. More...
 

Properties

IAsyncDataProducer CorrectedAcceleration [get]
 Data producer representing corrected acceleration data More...
 
IAsyncDataProducer CorrectedAngularVelocity [get]
 Data producer representing corrected angular velocity data More...
 
IAsyncDataProducer CorrectedMagneticField [get]
 Data producer representing corrected magnetic field data More...
 
IAsyncDataProducer Quaternion [get]
 Data producer representing quaternion data More...
 
IAsyncDataProducer EulerAngles [get]
 Data producer representing Euler angles data More...
 
IAsyncDataProducer Gravity [get]
 Data producer representing gravity data More...
 
IAsyncDataProducer LinearAcceleration [get]
 Data producer representing linear acceleration data More...
 

Detailed Description

Bosch algorithm combining accelerometer, gyroscope, and magnetometer data for Bosch sensors.

When using sensor fusion, do not configure the accelerometer, gyro, and magnetometer with their respective interface; the algorithm will automatically configure those sensors based on the selected fusion mode.

Member Function Documentation

◆ Calibrate()

Task<ImuCalibrationData> MbientLab.MetaWear.Core.ISensorFusionBosch.Calibrate ( CancellationToken  ct,
int  pollingPeriod = 1000,
Action< ImuCalibrationState progress = null 
)

Convenience method to poll the calibration state until the required IMUs are in a high accuracy state

Parameters
ctThe cancellation token that will be checked before reading the calibration state
pollingPeriodHow frequently poll the calibration state in milliseconds, defaults to 1000ms
progressHandler for calibration state updates
Returns
IMU calibration data when task is completed, used with WriteCalibrationData(ImuCalibrationData)
Exceptions
InvalidOperationExceptionIf device is not running firmware v1.4.3+
TimeoutExceptionTimeout limit hit before task completed

◆ Configure()

void MbientLab.MetaWear.Core.ISensorFusionBosch.Configure ( Mode  mode = Mode.Ndof,
AccRange  ar = AccRange._16g,
GyroRange  gr = GyroRange._2000dps,
object []  accExtra = null,
object []  gyroExtra = null 
)

Configure the sensor fusion algorithm

Parameters
modeSensor fusion mode
arAccelerometer data range
grGyro data range
accExtraExtra configuration settings for the accelerometer
gyroExtraExtra configuration settings for the gyro

◆ PullConfigAsync()

Task MbientLab.MetaWear.Core.ISensorFusionBosch.PullConfigAsync ( )

Pulls the current sensor fusion configuration from the sensor

Returns
Task that is completed when the settings are received

◆ ReadCalibrationStateAsync()

Task<ImuCalibrationState> MbientLab.MetaWear.Core.ISensorFusionBosch.ReadCalibrationStateAsync ( )

Reads the current calibration state from the sensor fusion algorithm. This function cannot be called until the sensor fusion algorithm is running and is only available on firmware v1.4.1+

Returns
Current calibrartion state
Exceptions
InvalidOperationExceptionIf device is not using min required firmware

◆ Start()

void MbientLab.MetaWear.Core.ISensorFusionBosch.Start ( )

Start the algorithm

◆ Stop()

void MbientLab.MetaWear.Core.ISensorFusionBosch.Stop ( )

Stop the algorithm

◆ WriteCalibrationData()

void MbientLab.MetaWear.Core.ISensorFusionBosch.WriteCalibrationData ( ImuCalibrationData  data)

Writes calibration data to the sensor fusion algorithm. Combine this with IMacro module to write thr data at boot time.

Parameters
dataCalibration data returned from the Calibrate function

Property Documentation

◆ CorrectedAcceleration

IAsyncDataProducer MbientLab.MetaWear.Core.ISensorFusionBosch.CorrectedAcceleration
get

Data producer representing corrected acceleration data

◆ CorrectedAngularVelocity

IAsyncDataProducer MbientLab.MetaWear.Core.ISensorFusionBosch.CorrectedAngularVelocity
get

Data producer representing corrected angular velocity data

◆ CorrectedMagneticField

IAsyncDataProducer MbientLab.MetaWear.Core.ISensorFusionBosch.CorrectedMagneticField
get

Data producer representing corrected magnetic field data

◆ EulerAngles

IAsyncDataProducer MbientLab.MetaWear.Core.ISensorFusionBosch.EulerAngles
get

Data producer representing Euler angles data

◆ Gravity

IAsyncDataProducer MbientLab.MetaWear.Core.ISensorFusionBosch.Gravity
get

Data producer representing gravity data

◆ LinearAcceleration

IAsyncDataProducer MbientLab.MetaWear.Core.ISensorFusionBosch.LinearAcceleration
get

Data producer representing linear acceleration data

◆ Quaternion

IAsyncDataProducer MbientLab.MetaWear.Core.ISensorFusionBosch.Quaternion
get

Data producer representing quaternion data


The documentation for this interface was generated from the following file: