]> git.mxchange.org Git - flightgear.git/blob - src/Network/opengc_data.hxx
Substantial rewrite of FGNewMat, the material class. Most of the
[flightgear.git] / src / Network / opengc_data.hxx
1 // opengc.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 // This file defines the class/structure of the UDP packet that sends
9 // the simulation data created by FlightGear to the glass displays. It
10 // is required to "sync" the data types contained in the packet
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License as
14 // published by the Free Software Foundation; either version 2 of the
15 // License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 // General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 //
26
27 #ifndef _OPENGC_DATA_HXX
28 #define _OPENGC_DATA_HXX
29
30 #ifndef __cplusplus
31 # error This library requires C++
32 #endif
33
34 #include <string>
35
36 class ogcFGData {
37
38 public:
39
40     // defines msg types and contents. typedefs & classes are TBS
41     unsigned int        version_id;
42     unsigned int        msg_id;
43     unsigned int        msg_content;
44     unsigned short      autopilot_mode;
45     unsigned short      afds_armed_mode;
46
47     // flight parameters
48         
49     double      pitch;
50     double      bank;
51     double      heading;
52     double      altitude;
53     double      altitude_agl;  // this can also be the radar altimeter
54     double      v_kcas;
55     double      groundspeed;
56     double      vvi;
57     double      mach;
58
59     // position
60
61     double      latitude;
62     double      longitude;
63     double      magvar;
64
65     // engine data
66
67     double      rpm[4];
68     double      epr[4];
69     double      egt[4];
70     double      fuel_flow[4];
71     double      oil_pressure[4];
72
73     double n1_turbine[4];
74     double n2_turbine[4];
75         
76     // navigation data
77     // This will require a lot of related work to build the nav
78     // database for the ND and some msg traffic both ways to display
79     // and configure nav aids, freqs, courses, etc etc.  OpenGC will
80     // most likely define an FMC to hold the database and do nav stuff
81     double      nav1_freq;
82     double      nav1_radial;
83     double      nav1_course_dev;
84     double      nav1_gs_dev;
85     double      nav1_dme;
86
87     double      nav2_freq;
88     double      nav2_radial;
89     double      nav2_course_dev;
90     double      nav2_gs_dev;
91     double      nav2_dme;
92
93     // some other locations serving as place holders for user defined
94     // variables reduces the need to update FG or OpenGC code
95  
96     double d_ogcdata[16];
97     float  f_ogcdata[16];
98     int    i_ogcdata[16];
99 };
100
101 #endif // _OPENGC_HXX