]> git.mxchange.org Git - flightgear.git/blob - utils/GPSsmooth/UGear_opengc.hxx
Icons modifications
[flightgear.git] / utils / GPSsmooth / UGear_opengc.hxx
1 // opengc_data.hxx -- Define structure of OpenGC/FG uint32_terface parameters
2 //
3 //  Version by J. Wojnaroski for uint32_terface to Open Glass Displays
4 //
5 //  Modified 02/12/01 - Update engine structure for multi-engine models
6 //                        - Added data preamble to id msg types
7 //
8 //  Modified 01/23/02 - Converted portions of the Engine and Gear accesssors to properties
9 //                          - Removed data from navigation functions. OpenGC provides own
10 //
11 // This file defines the class/structure of the UDP packet that sends
12 // the simulation data created by FlightGear to the glass displays. It
13 // is required to "sync" the data types contained in the packet
14 //
15 // This program is free software; you can redistribute it and/or
16 // modify it under the terms of the GNU General Public License as
17 // published by the Free Software Foundation; either version 2 of the
18 // License, or (at your option) any later version.
19 //
20 // This program is distributed in the hope that it will be useful, but
21 // WITHOUT ANY WARRANTY; without even the implied warranty of
22 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23 // General Public License for more details.
24 //
25 // You should have received a copy of the GNU General Public License
26 // along with this program; if not, write to the Free Software
27 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
28 //
29
30 #ifndef _OPENGC_DATA_HXX
31 #define _OPENGC_DATA_HXX
32
33 #ifndef __cplusplus
34 # error This library requires C++
35 #endif
36
37 const uint32_t OGC_VERSION = 4;
38 typedef unsigned int  uint32_t;
39
40 class ogcFGData {
41
42 public:
43
44     // defines msg types and contents. The msg_content is used as a 'pouint32_ter' to
45     // a predefined set of msg strings
46  
47     uint32_t    version_id;
48     uint32_t    msg_type;
49     uint32_t    msg_content;
50     uint32_t  reserved;
51
52     // position
53
54     double      latitude;
55     double      longitude;
56     double      elevation;
57     double      magvar;
58
59     // flight parameters
60         
61     double      pitch;
62     double      bank;
63     double      heading;
64     double      altitude;
65     double      altitude_agl;  // this can also be the radar altimeter
66     double  v_kcas;
67     double      groundspeed;
68     double      vvi;
69     double  mach;
70     double      v_keas;  // equivalent airspeed in knots
71
72   // Data used by the FMC and autopilots
73
74     double      phi_dot;
75     double      theta_dot;
76     double      psi_dot;
77
78     double      alpha;
79     double      alpha_dot;
80     double      beta;
81     double      beta_dot;
82
83   // Control surface positions
84
85     double      left_aileron;
86     double  right_aileron;
87     double      aileron_trim;
88     double      elevator;
89     double      elevator_trim;
90     double      rudder;
91     double      rudder_trim;
92     double      flaps;
93     double  flaps_cmd;
94
95   // gear positions 0 = up and 1 = down  The 747 has 5 wheel bogey assemblies
96
97     double      gear_nose;
98     double      gear_left;
99     double      gear_right;
100     double  gear_left_rear;
101     double  gear_right_rear;
102     double      parking_brake;
103     uint32_t            wow_main;  // logical and of main gear
104                 uint32_t                wow_nose;       
105     // engine data
106
107     double      rpm[4];  // this is for pistons, jets see below
108     double      n1_turbine[4];
109     double      epr[4];
110     double      egt[4];
111     double  n2_turbine[4];
112     double      fuel_flow[4];
113     double  man_pressure[4];
114     double      oil_pressure[4];
115     double      oil_temp[4];
116     double      oil_quantity[4];
117     double      hyd_pressure[4];
118     double      throttle[4];
119     double      mixture[4];
120     double      prop_advance[4];
121     
122     // fuel system
123     uint32_t num_tanks;
124     double fuel_tank[9];
125      
126     // Pressures and temperatures
127
128     double      static_temperature;
129     double      total_temperature;
130     double      static_pressure;
131     double      total_pressure;
132     double      dynamic_pressure;
133     
134     // more environmental data
135                 double wind;
136                 double wind_dir;
137                 double sea_level_pressure;
138                 
139 };
140
141 #endif // _OPENGC_HXX