protected override void ReceiveMessage(MagneticField message) { // The xyz components are reordered such that the directions in Unity correspond // with the NED orientation of the RM3100 measurements magneticFieldVector.Set( (float)message.magnetic_field.y, -(float)message.magnetic_field.z, (float)message.magnetic_field.x); magnetometer.Write(magneticFieldVector); }