     sensors_vec_t sensorData = getOrientation();
     sensorError.pitch += (float)sensorData.pitch;
     sensorError.roll += (float)sensorData.roll;
+    sensorError.elevation += getAltitude();
     delay(20);
   }
   sensorError.pitch /= trials;
   sensorError.roll /= trials;
+  sensorError.elevation /= trials;
   calibrating = false;
   
   digitalWrite(armLED, HIGH);

  }
  orientation.heading = -orientation.heading;
  return orientation;
}

void setThrottleAll (int throttle) {

struct SensorError {
  float pitch;
  float roll;
  float elevation;
};
SensorError sensorError = {0, 0, 0};
boolean calibrating = true;

Adafruit_10DOF                dof   = Adafruit_10DOF();
