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
37
const
int
OGC_VERSION
= 4;
38
39
class
ogcFGData
{
40
41
public
:
42
43
// defines msg types and contents. The msg_content is used as a 'pointer' to
44
// a predefined set of msg strings
45
46
int
version_id
;
47
int
msg_type
;
48
int
msg_content
;
49
int
reserved
;
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
;
66
double
groundspeed
;
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
84
double
left_aileron
;
85
double
right_aileron
;
86
double
aileron_trim
;
87
double
elevator
;
88
double
elevator_trim
;
89
double
rudder
;
90
double
rudder_trim
;
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
;
99
double
gear_left_rear
;
100
double
gear_right_rear
;
101
double
parking_brake
;
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
122
int
num_tanks
;
123
double
fuel_tank
[9];
124
125
// Pressures and temperatures
126
127
double
static_temperature
;
128
double
total_temperature
;
129
double
static_pressure
;
130
double
total_pressure
;
131
double
dynamic_pressure
;
132
133
// more environmental data
134
double
wind
;
135
double
wind_dir
;
136
double
sea_level_pressure
;
137
};
138
139
#endif
// _OPENGC_HXX
ogcFGData
Definition
opengc_data.hxx:39
ogcFGData::dynamic_pressure
double dynamic_pressure
Definition
opengc_data.hxx:131
ogcFGData::rudder
double rudder
Definition
opengc_data.hxx:89
ogcFGData::n1_turbine
double n1_turbine[4]
Definition
opengc_data.hxx:107
ogcFGData::version_id
int version_id
Definition
opengc_data.hxx:46
ogcFGData::static_pressure
double static_pressure
Definition
opengc_data.hxx:129
ogcFGData::groundspeed
double groundspeed
Definition
opengc_data.hxx:66
ogcFGData::bank
double bank
Definition
opengc_data.hxx:61
ogcFGData::total_pressure
double total_pressure
Definition
opengc_data.hxx:130
ogcFGData::longitude
double longitude
Definition
opengc_data.hxx:54
ogcFGData::oil_pressure
double oil_pressure[4]
Definition
opengc_data.hxx:113
ogcFGData::theta_dot
double theta_dot
Definition
opengc_data.hxx:74
ogcFGData::fuel_flow
double fuel_flow[4]
Definition
opengc_data.hxx:111
ogcFGData::rpm
double rpm[4]
Definition
opengc_data.hxx:106
ogcFGData::v_keas
double v_keas
Definition
opengc_data.hxx:69
ogcFGData::altitude_agl
double altitude_agl
Definition
opengc_data.hxx:64
ogcFGData::egt
double egt[4]
Definition
opengc_data.hxx:109
ogcFGData::left_aileron
double left_aileron
Definition
opengc_data.hxx:84
ogcFGData::n2_turbine
double n2_turbine[4]
Definition
opengc_data.hxx:110
ogcFGData::msg_content
int msg_content
Definition
opengc_data.hxx:48
ogcFGData::altitude
double altitude
Definition
opengc_data.hxx:63
ogcFGData::flaps_cmd
double flaps_cmd
Definition
opengc_data.hxx:92
ogcFGData::v_kcas
double v_kcas
Definition
opengc_data.hxx:65
ogcFGData::wow_main
bool wow_main
Definition
opengc_data.hxx:102
ogcFGData::flaps
double flaps
Definition
opengc_data.hxx:91
ogcFGData::oil_temp
double oil_temp[4]
Definition
opengc_data.hxx:114
ogcFGData::epr
double epr[4]
Definition
opengc_data.hxx:108
ogcFGData::wind
double wind
Definition
opengc_data.hxx:134
ogcFGData::mixture
double mixture[4]
Definition
opengc_data.hxx:118
ogcFGData::oil_quantity
double oil_quantity[4]
Definition
opengc_data.hxx:115
ogcFGData::phi_dot
double phi_dot
Definition
opengc_data.hxx:73
ogcFGData::pitch
double pitch
Definition
opengc_data.hxx:60
ogcFGData::wind_dir
double wind_dir
Definition
opengc_data.hxx:135
ogcFGData::mach
double mach
Definition
opengc_data.hxx:68
ogcFGData::total_temperature
double total_temperature
Definition
opengc_data.hxx:128
ogcFGData::sea_level_pressure
double sea_level_pressure
Definition
opengc_data.hxx:136
ogcFGData::gear_left
double gear_left
Definition
opengc_data.hxx:97
ogcFGData::beta
double beta
Definition
opengc_data.hxx:79
ogcFGData::right_aileron
double right_aileron
Definition
opengc_data.hxx:85
ogcFGData::heading
double heading
Definition
opengc_data.hxx:62
ogcFGData::latitude
double latitude
Definition
opengc_data.hxx:53
ogcFGData::gear_left_rear
double gear_left_rear
Definition
opengc_data.hxx:99
ogcFGData::reserved
int reserved
Definition
opengc_data.hxx:49
ogcFGData::rudder_trim
double rudder_trim
Definition
opengc_data.hxx:90
ogcFGData::beta_dot
double beta_dot
Definition
opengc_data.hxx:80
ogcFGData::vvi
double vvi
Definition
opengc_data.hxx:67
ogcFGData::msg_type
int msg_type
Definition
opengc_data.hxx:47
ogcFGData::elevator
double elevator
Definition
opengc_data.hxx:87
ogcFGData::parking_brake
double parking_brake
Definition
opengc_data.hxx:101
ogcFGData::psi_dot
double psi_dot
Definition
opengc_data.hxx:75
ogcFGData::elevation
double elevation
Definition
opengc_data.hxx:55
ogcFGData::magvar
double magvar
Definition
opengc_data.hxx:56
ogcFGData::man_pressure
double man_pressure[4]
Definition
opengc_data.hxx:112
ogcFGData::gear_nose
double gear_nose
Definition
opengc_data.hxx:96
ogcFGData::wow_nose
bool wow_nose
Definition
opengc_data.hxx:103
ogcFGData::static_temperature
double static_temperature
Definition
opengc_data.hxx:127
ogcFGData::elevator_trim
double elevator_trim
Definition
opengc_data.hxx:88
ogcFGData::alpha
double alpha
Definition
opengc_data.hxx:77
ogcFGData::hyd_pressure
double hyd_pressure[4]
Definition
opengc_data.hxx:116
ogcFGData::gear_right
double gear_right
Definition
opengc_data.hxx:98
ogcFGData::fuel_tank
double fuel_tank[9]
Definition
opengc_data.hxx:123
ogcFGData::throttle
double throttle[4]
Definition
opengc_data.hxx:117
ogcFGData::aileron_trim
double aileron_trim
Definition
opengc_data.hxx:86
ogcFGData::num_tanks
int num_tanks
Definition
opengc_data.hxx:122
ogcFGData::prop_advance
double prop_advance[4]
Definition
opengc_data.hxx:119
ogcFGData::alpha_dot
double alpha_dot
Definition
opengc_data.hxx:78
ogcFGData::gear_right_rear
double gear_right_rear
Definition
opengc_data.hxx:100
OGC_VERSION
const int OGC_VERSION
Definition
lfsglass_data.hxx:37
src
Network
opengc_data.hxx
Generated on Tue Jun 3 2025 12:58:41 for FlightGear by
1.13.2