Dont smash aoview_monitor_parse input buffer
[fw/altos] / aoview / aoview.h
index 1ad9e160dd308cb478b3e5b27e8e535cbe7c974b..5c118a111d64d8f2a3eb59c4ce13c12d702ee565 100644 (file)
@@ -83,14 +83,52 @@ struct aostate {
        double  hdop;           /* unitless? */
        int     h_error;        /* m */
        int     v_error;        /* m */
+
+       /* derived data */
+
+       gboolean        ascent; /* going up? */
+
+       int     ground_altitude;
+       int     height;
+       double  speed;
+       double  acceleration;
+       double  battery;
+       double  temperature;
+       double  main_sense;
+       double  drogue_sense;
+
+       int     max_height;
+       double  max_acceleration;
+       double  max_speed;
+
+       double  pad_lat;
+       double  pad_lon;
+       double  pad_alt;
+       double  pad_lat_total;
+       double  pad_lon_total;
+       double  pad_alt_total;
+       int     npad;
+
+       double  distance;
+       double  bearing;
+       int     gps_height;
 };
 
+/* GPS is 'stable' when we've seen at least this many samples */
+#define MIN_PAD_SAMPLES        10
+
 void
 aoview_monitor_disconnect(void);
 
 gboolean
 aoview_monitor_connect(char *tty);
 
+gboolean
+aoview_monitor_parse(const char *line);
+
+void
+aoview_monitor_reset(void);
+
 struct aoview_serial *
 aoview_serial_open(const char *tty);
 
@@ -182,6 +220,8 @@ aoview_table_clear(void);
 
 struct aoview_file;
 
+extern char *aoview_file_dir;
+
 void
 aoview_file_finish(struct aoview_file *file);
 
@@ -227,4 +267,19 @@ void aoview_voice_close(void);
 
 void aoview_voice_speak(char *format, ...);
 
+/* aoview_label.c */
+
+void aoview_label_init(GladeXML *xml);
+
+void
+aoview_label_show(struct aostate *state);
+
+/* aoview_flite.c */
+
+FILE *
+aoview_flite_start(void);
+
+void
+aoview_flite_stop(void);
+
 #endif /* _AOVIEW_H_ */