public void ReceiveSensorData(AsyncSensorData asyncData) { if ((asyncData.Attitude != null && _onAttitudeUpdatedEvent != null)) { _onAttitudeUpdatedEvent.Invoke(this, asyncData.Attitude); } if ((asyncData.Accelorometer != null && _onAccelerometerUpdatedEvent != null)) { _onAccelerometerUpdatedEvent.Invoke(this, asyncData.Accelorometer); } if ((asyncData.Gyrometer != null && _onGyrometerUpdatedEvent != null)) { _onGyrometerUpdatedEvent.Invoke(this, asyncData.Gyrometer); } if ((asyncData.Quaternion != null && _onQuaternionUpdatedEvent != null)) { _onQuaternionUpdatedEvent.Invoke(this, asyncData.Quaternion); } if ((asyncData.Location != null && _onLocationUpdatedEvent != null)) { _onLocationUpdatedEvent.Invoke(this, asyncData.Location); } if ((asyncData.Velocity != null && _onVelocityUpdatedEvent != null)) { _onVelocityUpdatedEvent.Invoke(this, asyncData.Velocity); } }