UWP Quaternions Only Outputs


I have a UWP app configured with a start and stop button for streaming quaternions. However, if I start streaming the quaternions, hit "Stop", and then hit "Start" again, the quaternions don't stream again and nothing happens.

When the start button is pressed, the following code is run:

mbl_mw_settings_set_connection_parameters(cppBoard, 7.5F, 7.5F, 0, 6000);
mbl_mw_sensor_fusion_set_mode(cppBoard, SensorFusion.Mode.NDOF);
mbl_mw_sensor_fusion_set_acc_range(cppBoard, SensorFusion.AccRange.AR_16G); ///AR_2G, 4, 8, 16
mbl_mw_sensor_fusion_set_gyro_range(cppBoard, SensorFusion.GyroRange.GR_2000DPS); ///GR_2000DPS, 1000, 500, 250


IntPtr fusionsDataSignal = mbl_mw_sensor_fusion_get_data_signal(cppBoard, SensorFusion.Data.QUATERION); //this line works

mbl_mw_datasignal_subscribe(fusionsDataSignal, fusionDataHandler);
mbl_mw_sensor_fusion_enable_data(cppBoard, SensorFusion.Data.QUATERION);

When the stop button is pressed, the following code is run:
 IntPtr quatSignal = mbl_mw_sensor_fusion_get_data_signal(cppBoard, SensorFusion.Data.QUATERION);


Do you have any idea what might be going on?



  • If you use the same start/stop setup with just raw accelerometer or gyro data, does the same behavior occur?  What about using other sensor fusion outputs?
  • Eric,

    I can log raw accelerometer, magnetometer, and gyroscope data just fine, starting and stopping as a I please. The issue only occurs with quaternions, and it happens with all of the sensor fusion outputs (Compass, NDOF, IMU_PLUS, M4G).

  • I should mention that I'm using a Metawear R sensor. I have reset the sensor using the Metawear iOS app and it has not helped.
  • One more piece of information to add -- as soon as the quaternions stop working, streaming all other types of data stops working as well. 
  • So, streaming euler angles or linear acceleration is completely fine?  What if you reduced the accelerometer range to 8g, down from 16g?
  • Hey Eric,

    I was incorrect in what I said. Any Sensor Fusion mode/setting has the same problem, including streaming euler angles or linear acceleration. Reducing the accelerometer range does not help the problem.

  • Does quaternion streaming work fine when using the MetaBase app?
This discussion has been closed.