altos: Add gyro-based orientation tracking
[fw/altos] / src / core / ao_sample.h
index a2dac9792a8bc2c13a5de441daa3fd50adb731b6..1d1bcc7c852ff5173f87a3db992002f98123b801 100644 (file)
@@ -64,8 +64,6 @@
  * for all further flight computations
  */
 
-#define GRAVITY 9.80665
-
 /*
  * Above this height, the baro sensor doesn't work
  */
@@ -118,6 +116,7 @@ extern __pdata accel_t      ao_ground_accel_through;
 extern __pdata gyro_t  ao_ground_pitch;
 extern __pdata gyro_t  ao_ground_yaw;
 extern __pdata gyro_t  ao_ground_roll;
+extern __pdata angle_t ao_orient;
 #endif
 
 void ao_sample_init(void);
@@ -136,8 +135,8 @@ uint8_t ao_sample(void);
 extern __pdata int16_t                 ao_height;      /* meters */
 extern __pdata int16_t                 ao_speed;       /* m/s * 16 */
 extern __pdata int16_t                 ao_accel;       /* m/s² * 16 */
-extern __pdata int16_t                 ao_max_height;  /* max of ao_height */
-extern __pdata int16_t                 ao_avg_height;  /* running average of height */
+extern __xdata int16_t                 ao_max_height;  /* max of ao_height */
+extern __xdata int16_t                 ao_avg_height;  /* running average of height */
 
 extern __pdata int16_t                 ao_error_h;
 extern __pdata int16_t                 ao_error_h_sq_avg;