 
 // Define corrections/offsets for magnetometer
 #define LOCAL_DECLINATION_DEG -3 //at Nantes, France is around 3 degrees in 2014
-#define MAG_X_OFFSET 18.0f
-#define MAG_Y_OFFSET 70.0f
-#define MAG_Z_OFFSET 270.0f
+#define MAG_X_OFFSET 0.0f
+#define MAG_Y_OFFSET 0.0f
+#define MAG_Z_OFFSET 0.0f
+#define ACC_X_OFFSET 0.0f
+#define ACC_Y_OFFSET 0.0f
+#define ACC_Z_OFFSET 0.0f
+#define GYRO_X_OFFSET 0.0f
+#define GYRO_Y_OFFSET 0.0f
+#define GYRO_Z_OFFSET 0.0f
 
 // Declare device MPU6050 class
 MPU6050 mpu(0x69);

      len = mavlink_msg_to_send_buffer(buf, &msg);
      Serial.write(buf, len);
      
      /*
      //static inline uint16_t mavlink_msg_highres_imu_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
      //						       uint64_t time_usec, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, uint16_t fields_updated)
      mavlink_msg_highres_imu_pack(system_id, component_id, &msg, (uint64_t)time_boot_us, ax_g*9.81, ay_g*9.81, az_g*9.81, gx_degps*PI/180.0f, gy_degps*PI/180.0f, gz_degps*PI/180.0f, my, mx, mz, press, press, altitude, temperature, a1);
      len = mavlink_msg_to_send_buffer(buf, &msg);
      Serial.write(buf, len);
      
      //mavlink_msg_scaled_imu_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
      // uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
      mavlink_msg_raw_imu_pack(system_id, component_id, &msg, time_boot_ms, a1, a2, a3, g1, g2, g3, m1, m2, m3);

            mcount++;
           // read the raw sensor data
            mpu.getAcceleration  ( &a1, &a2, &a3  );
            a2 = -a2;// Invert y to get NED classical convention
            a1 = a1 + ACC_X_OFFSET;
            a2 = a2 + ACC_Y_OFFSET;
            a3 = a3 + ACC_Z_OFFSET;
            ax_g = a1*2.0f/32768.0f; // 2 g full range for accelerometer
            ay_g = a2*2.0f/32768.0f; 
            az_g = a3*2.0f/32768.0f;

            mpu.getRotation  ( &g1, &g2, &g3  );
            g1 = -g1;
            g3 = -g3;
            g1 = g1 + GYRO_X_OFFSET;
            g2 = g2 + GYRO_Y_OFFSET;
            g3 = g3 + GYRO_Z_OFFSET;
            gx_degps = g1*250.0f/32768.0f; // 250 deg/s full range for gyroscope
            gy_degps = g2*250.0f/32768.0f;
            gz_degps = g3*250.0f/32768.0f;
