FlightGear next
opengc_data.hxx
Go to the documentation of this file.
1// opengc_data.hxx -- Define structure of OpenGC/FG interface parameters
2//
3// Version by J. Wojnaroski for interface 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
37const int OGC_VERSION = 4;
38
39class ogcFGData {
40
41public:
42
43 // defines msg types and contents. The msg_content is used as a 'pointer' to
44 // a predefined set of msg strings
45
50
51 // position
52
53 double latitude;
54 double longitude;
55 double elevation;
56 double magvar;
57
58 // flight parameters
59
60 double pitch;
61 double bank;
62 double heading;
63 double altitude;
64 double altitude_agl; // this can also be the radar altimeter
65 double v_kcas;
67 double vvi;
68 double mach;
69 double v_keas; // equivalent airspeed in knots
70
71 // Data used by the FMC and autopilots
72
73 double phi_dot;
74 double theta_dot;
75 double psi_dot;
76
77 double alpha;
78 double alpha_dot;
79 double beta;
80 double beta_dot;
81
82 // Control surface positions
83
87 double elevator;
89 double rudder;
91 double flaps;
92 double flaps_cmd;
93
94 // gear positions 0 = up and 1 = down The 747 has 5 wheel bogey assemblies
95
96 double gear_nose;
97 double gear_left;
98 double gear_right;
102 bool wow_main; // logical and of main gear
103 bool wow_nose;
104 // engine data
105
106 double rpm[4]; // this is for pistons, jets see below
107 double n1_turbine[4];
108 double epr[4];
109 double egt[4];
110 double n2_turbine[4];
111 double fuel_flow[4];
112 double man_pressure[4];
113 double oil_pressure[4];
114 double oil_temp[4];
115 double oil_quantity[4];
116 double hyd_pressure[4];
117 double throttle[4];
118 double mixture[4];
119 double prop_advance[4];
120
121 // fuel system
123 double fuel_tank[9];
124
125 // Pressures and temperatures
126
132
133 // more environmental data
134 double wind;
135 double wind_dir;
137};
138
139#endif // _OPENGC_HXX
double dynamic_pressure
double rudder
double n1_turbine[4]
double static_pressure
double groundspeed
double bank
double total_pressure
double longitude
double oil_pressure[4]
double theta_dot
double fuel_flow[4]
double rpm[4]
double v_keas
double altitude_agl
double egt[4]
double left_aileron
double n2_turbine[4]
double altitude
double flaps_cmd
double v_kcas
double flaps
double oil_temp[4]
double epr[4]
double mixture[4]
double oil_quantity[4]
double phi_dot
double pitch
double wind_dir
double mach
double total_temperature
double sea_level_pressure
double gear_left
double beta
double right_aileron
double heading
double latitude
double gear_left_rear
double rudder_trim
double beta_dot
double elevator
double parking_brake
double psi_dot
double elevation
double magvar
double man_pressure[4]
double gear_nose
double static_temperature
double elevator_trim
double alpha
double hyd_pressure[4]
double gear_right
double fuel_tank[9]
double throttle[4]
double aileron_trim
double prop_advance[4]
double alpha_dot
double gear_right_rear
const int OGC_VERSION