/// <summary> /// xIMUserial QuaternionDataReceived event updates oscilloscope. /// </summary> private void xIMUserial_QuaternionDataReceived(object sender, x_IMU_API.QuaternionData e) { float[] euler = e.ConvertToEulerAngles(); eulerAnglesOscilloscope.Caption = "Euler Angles Data (˚)"; eulerAnglesOscilloscope.AddScopeData(euler[0], euler[1], euler[2]); form_3Dcuboid.RotationMatrix = e.ConvertToRotationMatrix(); }
/// <summary> /// Quaternion data received event to update rolling ball orientation data. /// </summary> static void xIMUserial_QuaternionDataReceived(object sender, x_IMU_API.QuaternionData e) { ballTracking.RotationMatrix = e.ConvertToRotationMatrix(); }