X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Fao-view%2Faoview.h;h=633598929bff9e8ecf2069cba8e0423e55ba0cfc;hb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;hp=c582159c86001c9a016cd169b29b3685ce46476a;hpb=541da6f3bbf81be93dfe3c01f7c8cfd757b28a2b;p=fw%2Faltos diff --git a/ao-tools/ao-view/aoview.h b/ao-tools/ao-view/aoview.h index c582159c..63359892 100644 --- a/ao-tools/ao-view/aoview.h +++ b/ao-tools/ao-view/aoview.h @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -43,77 +44,12 @@ #include #include -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 */ -}; - -#define SIRF_SAT_STATE_ACQUIRED (1 << 0) -#define SIRF_SAT_STATE_CARRIER_PHASE_VALID (1 << 1) -#define SIRF_SAT_BIT_SYNC_COMPLETE (1 << 2) -#define SIRF_SAT_SUBFRAME_SYNC_COMPLETE (1 << 3) -#define SIRF_SAT_CARRIER_PULLIN_COMPLETE (1 << 4) -#define SIRF_SAT_CODE_LOCKED (1 << 5) -#define SIRF_SAT_ACQUISITION_FAILED (1 << 6) -#define SIRF_SAT_EPHEMERIS_AVAILABLE (1 << 7) - -struct aogps_sat { - int svid; - int state; - int c_n0; -}; - -struct aogps_tracking { - int channels; - struct aogps_sat sats[12]; -}; - -struct aodata { - char callsign[16]; - int serial; - int rssi; - char state[16]; - int tick; - int accel; - int pres; - int temp; - int batt; - int drogue; - int main; - int flight_accel; - int ground_accel; - int flight_vel; - int flight_pres; - int ground_pres; - struct aogps gps; - struct aogps_tracking gps_tracking; -}; - struct aostate { - struct aodata data; + struct cc_telem data; /* derived data */ - struct aodata prev_data; + struct cc_telem prev_data; double report_time; @@ -133,8 +69,8 @@ struct aostate { double max_acceleration; double max_speed; - struct aogps gps; - struct aogps_tracking gps_tracking; + struct cc_gps gps; + struct cc_gps_tracking gps_tracking; int gps_valid; double pad_lat; @@ -199,7 +135,7 @@ void aoview_dev_dialog_init(GladeXML *xml); void -aoview_state_notify(struct aodata *data); +aoview_state_notify(struct cc_telem *data); void aoview_state_new(void);