X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=aoview%2Faoview.h;h=62d0640b9a182b42101263cea45ff3a1936729b6;hp=800349ec09c68ed9b1f1ce054e40dcd3e434a9b7;hb=d7c2d358ed8a1afc9f0ba2bd830b10f6b56dc7b1;hpb=ddfa2308c0be4c002f982ae9da6032ee7854117d diff --git a/aoview/aoview.h b/aoview/aoview.h index 800349ec..62d0640b 100644 --- a/aoview/aoview.h +++ b/aoview/aoview.h @@ -51,6 +51,30 @@ struct usbdev { int idVendor; }; +struct aogps_time { + int hour; + int minute; + int second; +}; + +struct aogps { + int nsat; + int gps_locked; + int gps_connected; + struct aogps_time gps_time; + double lat; /* degrees (+N -S) */ + double lon; /* degrees (+E -W) */ + int alt; /* m */ + + int gps_extended; /* has extra data */ + double ground_speed; /* m/s */ + int course; /* degrees */ + double climb_rate; /* m/s */ + double hdop; /* unitless? */ + int h_error; /* m */ + int v_error; /* m */ +}; + struct aodata { char callsign[16]; int serial; @@ -68,23 +92,7 @@ struct aodata { int flight_vel; int flight_pres; int ground_pres; - int nsat; - int gps_locked; - int gps_connected; - struct { - int hour; - int minute; - int second; - } gps_time; - double lat; /* degrees (+N -S) */ - double lon; /* degrees (+E -W) */ - int alt; /* m */ - double ground_speed; /* m/s */ - int course; /* degrees */ - double climb_rate; /* m/s */ - double hdop; /* unitless? */ - int h_error; /* m */ - int v_error; /* m */ + struct aogps gps; }; struct aostate { @@ -112,10 +120,9 @@ struct aostate { double max_acceleration; double max_speed; - double lat; - double lon; - int gps_valid; + struct aogps gps; + int gps_valid; double pad_lat; double pad_lon; double pad_alt; @@ -160,9 +167,7 @@ typedef void (*aoview_serial_callback)(gpointer user_data, struct aoview_serial void aoview_serial_set_callback(struct aoview_serial *serial, - aoview_serial_callback func, - gpointer data, - GDestroyNotify notify); + aoview_serial_callback func); void aoview_serial_printf(struct aoview_serial *serial, char *format, ...);