X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=aoview%2Faoview.h;h=62d0640b9a182b42101263cea45ff3a1936729b6;hp=b4d1315968ba248284f57678501dd639c223bed8;hb=d7c2d358ed8a1afc9f0ba2bd830b10f6b56dc7b1;hpb=31d5670a9144b943ce9c8cb00deb5fb659af0b1c diff --git a/aoview/aoview.h b/aoview/aoview.h index b4d13159..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,22 +92,7 @@ struct aodata { int flight_vel; int flight_pres; int ground_pres; - int nsat; - int locked; - 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 { @@ -111,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; @@ -159,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, ...);