first cut at turnon scripts for EasyTimer v2
[fw/altos] / src / kernel / ao_tracker.h
index 1adf0f33ee5efff793732ecda85bd38af6e90f0a..27fa15a896dc7a266fa7a385de37274ec7080679 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
 #ifndef _AO_TRACKER_H_
 #define _AO_TRACKER_H_
 
-#define AO_CONFIG_DEFAULT_TRACKER_START_HORIZ  1000
-#define AO_CONFIG_DEFAULT_TRACKER_START_VERT   100
+/* Any motion more than this will result in a log entry */
 
-/* Speeds for the various modes, 2m/s seems reasonable for 'not moving' */
-#define AO_TRACKER_NOT_MOVING  200
+#define AO_TRACKER_MOTION_DEFAULT      10
+#define AO_TRACKER_INTERVAL_DEFAULT    1
 
-extern int32_t ao_tracker_start_latitude;
-extern int32_t ao_tracker_start_longitude;
-extern int16_t ao_tracker_start_altitude;
+#define AO_TRACKER_MOTION_COUNT                10
 
-#define AO_TRACKER_RING        8
-
-struct ao_tracker_data {
-       uint16_t                        tick;
-       uint8_t                         new;
-       uint8_t                         state;
-       struct ao_telemetry_location    gps_data;
-       struct ao_telemetry_satellite   gps_tracking_data;
-};
-
-extern struct ao_tracker_data  ao_tracker_data[AO_TRACKER_RING];
-extern uint8_t                 ao_tracker_head;
+void
+ao_tracker_init(void);
 
-#define ao_tracker_ring_next(n)        (((n) + 1) & (AO_TRACKER_RING-1))
-#define ao_tracker_ring_prev(n)        (((n) - 1) & (AO_TRACKER_RING-1))
+void
+ao_tracker_erase_start(int32_t flight);
 
 void
-ao_tracker_init(void);
+ao_tracker_erase_end(void);
 
 #endif /* _AO_TRACKER_H_ */