 
 // 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);

//  compared to the gyro and accelerometer!
            if (mcount > 1000/MagRate) {  // this is a poor man's way of setting the magnetometer read rate (see below) 
            mpu.getMag  ( &m1, &m2, &m3 );
            mx = m1*10.0f*1229.0f/4096.0f + MAG_X_OFFSET; // milliGauss (1229 microTesla per 2^12 bits, 10 mG per microTesla)
            my = m2*10.0f*1229.0f/4096.0f + MAG_Y_OFFSET; // apply calibration offsets in mG that correspond to your environment and magnetometer
            mz = m3*10.0f*1229.0f/4096.0f + MAG_Z_OFFSET;
            mcount = 0;
            }           
         }

            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;
