2 * Copyright © 2009 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
35 #include <sys/types.h>
40 #include <glade/glade.h>
41 #include <gconf/gconf-client.h>
77 double lat; /* degrees (+N -S) */
78 double lon; /* degrees (+E -W) */
80 double ground_speed; /* m/s */
81 int course; /* degrees */
82 double climb_rate; /* m/s */
83 double hdop; /* unitless? */
89 gboolean ascent; /* going up? */
101 double max_acceleration;
107 double pad_lat_total;
108 double pad_lon_total;
109 double pad_alt_total;
117 /* GPS is 'stable' when we've seen at least this many samples */
118 #define MIN_PAD_SAMPLES 10
121 aoview_monitor_disconnect(void);
124 aoview_monitor_connect(char *tty);
127 aoview_monitor_parse(char *line);
130 aoview_monitor_reset(void);
132 struct aoview_serial *
133 aoview_serial_open(const char *tty);
136 aoview_serial_close(struct aoview_serial *serial);
138 typedef void (*aoview_serial_callback)(gpointer user_data, struct aoview_serial *serial, gint revents);
141 aoview_serial_set_callback(struct aoview_serial *serial,
142 aoview_serial_callback func,
144 GDestroyNotify notify);
147 aoview_serial_printf(struct aoview_serial *serial, char *format, ...);
150 aoview_serial_read(struct aoview_serial *serial, char *buf, int len);
153 aoview_serial_getc(struct aoview_serial *serial);
156 aoview_dev_dialog_init(GladeXML *xml);
159 aoview_usb_scan(struct usbdev ***devs_ret);
162 aoview_usbdev_free(struct usbdev *usbdev);
165 aoview_state_notify(struct aostate *state);
168 aoview_state_new(void);
171 aoview_state_init(GladeXML *xml);
174 aoview_pres_to_altitude(int16_t pres);
177 aoview_altitude_to_pres(int16_t alt);
180 aoview_fullname (char *dir, char *file);
183 aoview_basename(char *file);
186 aoview_add_plain_text_column (GtkTreeView *view, const gchar *title, gint model_column, gint width);
189 aoview_mkdir(char *dir);
192 aoview_log_init(GladeXML *xml);
195 aoview_log_set_serial(int serial);
198 aoview_log_get_serial(void);
201 aoview_log_printf(char *format, ...);
204 aoview_log_new(void);
207 aoview_table_start(void);
210 aoview_table_add_row(char *label, char *format, ...);
213 aoview_table_finish(void);
216 aoview_table_init(GladeXML *xml);
219 aoview_table_clear(void);
223 extern char *aoview_file_dir;
226 aoview_file_finish(struct aoview_file *file);
229 aoview_file_start(struct aoview_file *file);
232 aoview_file_name(struct aoview_file *file);
235 aoview_file_set_serial(struct aoview_file *file, int serial);
238 aoview_file_get_serial(struct aoview_file *file);
241 aoview_file_printf(struct aoview_file *file, char *format, ...);
244 aoview_file_vprintf(struct aoview_file *file, char *format, va_list ap);
247 aoview_file_new(char *ext);
250 aoview_file_destroy(struct aoview_file *file);
253 aoview_file_init(GladeXML *xml);
255 /* aoview_eeprom.c */
258 aoview_eeprom_save(const char *device);
261 aoview_eeprom_init(GladeXML *xml);
264 void aoview_voice_open(void);
266 void aoview_voice_close(void);
268 void aoview_voice_speak(char *format, ...);
272 void aoview_label_init(GladeXML *xml);
275 aoview_label_show(struct aostate *state);
280 aoview_flite_start(void);
283 aoview_flite_stop(void);
285 #endif /* _AOVIEW_H_ */