altos: De-bias height/speed data while on pad
[fw/altos] / src / kernel / ao_sample.h
index af6eca4e75d8a601e61078f8ec3b5e8584b91c06..475b3f6326ef8fc57301fcf1172c0310a14d262b 100644 (file)
@@ -133,16 +133,21 @@ extern accel_t    ao_ground_accel;        /* startup acceleration */
 extern accel_t         ao_accel_2g;            /* factory accel calibration */
 extern int32_t ao_accel_scale;         /* sensor to m/s² conversion */
 #endif
-#if HAS_GYRO
+#if HAS_IMU
 extern accel_t ao_ground_accel_along;
 extern accel_t ao_ground_accel_across;
 extern accel_t ao_ground_accel_through;
-extern int32_t ao_ground_pitch;        /* * 512 */
-extern int32_t ao_ground_yaw;          /* * 512 */
-extern int32_t ao_ground_roll;         /* * 512 */
 extern accel_t ao_sample_accel_along;
 extern accel_t ao_sample_accel_across;
 extern accel_t ao_sample_accel_through;
+#endif
+#if HAS_GYRO
+#ifndef HAS_IMU
+#define HAS_IMU        1
+#endif
+extern int32_t ao_ground_pitch;        /* * 512 */
+extern int32_t ao_ground_yaw;          /* * 512 */
+extern int32_t ao_ground_roll;         /* * 512 */
 extern gyro_t  ao_sample_roll;
 extern gyro_t  ao_sample_pitch;
 extern gyro_t  ao_sample_yaw;
@@ -154,7 +159,7 @@ extern uint8_t      ao_sample_orient_pos;
 
 void ao_sample_init(void);
 
-/* returns FALSE in preflight mode, TRUE in flight mode */
+/* returns false in preflight mode, true in flight mode */
 uint8_t ao_sample(void);
 
 /*
@@ -194,4 +199,8 @@ extern ao_v_t                       ao_error_a;
 
 void ao_kalman(void);
 
+#if !HAS_BARO
+void ao_kalman_reset_accumulate(void);
+#endif
+
 #endif /* _AO_SAMPLE_H_ */