#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
+#include <math.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
int idVendor;
};
-struct aostate {
+struct aodata {
char callsign[16];
int serial;
int rssi;
int flight_pres;
int ground_pres;
int nsat;
- int locked;
+ int gps_locked;
+ int gps_connected;
struct {
int hour;
int minute;
double hdop; /* unitless? */
int h_error; /* m */
int v_error; /* m */
+};
+
+struct aostate {
+ struct aodata data;
/* derived data */
+ struct aodata prev_data;
+
+ double report_time;
+
gboolean ascent; /* going up? */
int ground_altitude;
double temperature;
double main_sense;
double drogue_sense;
+ double baro_speed;
int max_height;
double max_acceleration;
double max_speed;
+ double lat;
+ double lon;
+ int gps_valid;
+
double pad_lat;
double pad_lon;
double pad_alt;
double pad_lon_total;
double pad_alt_total;
int npad;
+ int prev_npad;
double distance;
double bearing;
+ int gps_height;
+
+ int speak_tick;
+ int speak_altitude;
};
+extern struct aostate aostate;
+
/* GPS is 'stable' when we've seen at least this many samples */
#define MIN_PAD_SAMPLES 10
aoview_monitor_connect(char *tty);
gboolean
-aoview_monitor_parse(char *line);
+aoview_monitor_parse(const char *line);
+
+void
+aoview_monitor_reset(void);
struct aoview_serial *
aoview_serial_open(const char *tty);
aoview_usbdev_free(struct usbdev *usbdev);
void
-aoview_state_notify(struct aostate *state);
+aoview_state_notify(struct aodata *data);
void
aoview_state_new(void);
aoview_table_start(void);
void
-aoview_table_add_row(char *label, char *format, ...);
+aoview_table_add_row(int column, char *label, char *format, ...);
void
aoview_table_finish(void);
void
aoview_label_show(struct aostate *state);
+/* aoview_flite.c */
+
+FILE *
+aoview_flite_start(void);
+
+void
+aoview_flite_stop(void);
+
#endif /* _AOVIEW_H_ */