~ubuntu-branches/ubuntu/quantal/flightgear/quantal

« back to all changes in this revision

Viewing changes to src/Network/opengc_data.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Ove Kaaven
  • Date: 2002-03-27 21:50:15 UTC
  • Revision ID: james.westby@ubuntu.com-20020327215015-0rvi3o8iml0a8s93
Tags: upstream-0.7.9
ImportĀ upstreamĀ versionĀ 0.7.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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., 675 Mass Ave, Cambridge, MA 02139, 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
#include <string>
 
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
    unsigned int        version_id;
 
47
    unsigned int        msg_type;
 
48
    unsigned int        msg_content;
 
49
 
 
50
    // position
 
51
 
 
52
    double      latitude;
 
53
    double      longitude;
 
54
    double      magvar;
 
55
 
 
56
    // flight parameters
 
57
        
 
58
    double      pitch;
 
59
    double      bank;
 
60
    double      heading;
 
61
    double      altitude;
 
62
    double      altitude_agl;  // this can also be the radar altimeter
 
63
    double      v_kcas;
 
64
    double      groundspeed;
 
65
    double      vvi;
 
66
    double  mach;
 
67
    double      v_tas;  // true airspeed in knots
 
68
 
 
69
  // Data used by the FMC and autopilots
 
70
 
 
71
    double      phi_dot;
 
72
    double      theta_dot;
 
73
    double      psi_dot;
 
74
 
 
75
    double      alpha;
 
76
    double      alpha_dot;
 
77
    double      beta;
 
78
    double      beta_dot;
 
79
 
 
80
  // Control surface positions
 
81
 
 
82
    double      aileron;
 
83
    double      aileron_trim;
 
84
    double      elevator;
 
85
    double      elevator_trim;
 
86
    double      rudder;
 
87
    double      rudder_trim;
 
88
    double      flaps;
 
89
 
 
90
  // Gear positions 0 = UP and 1 = DOWN
 
91
 
 
92
    double      gear_nose;
 
93
    double      gear_left;
 
94
    double      gear_right;
 
95
 
 
96
    // engine data
 
97
 
 
98
    double      rpm[4];  // this is for pistons, jets see below
 
99
    double      n1_turbine[4];
 
100
    double      epr[4];
 
101
    double      egt[4];
 
102
    double      n2_turbine[4];
 
103
    double      fuel_flow[4];
 
104
    double  man_pressure[4];
 
105
    double      oil_pressure[4];
 
106
    double      throttle[4];
 
107
    double      mixture[4];
 
108
    double      prop_advance[4];
 
109
   
 
110
    // Pressures and temperatures
 
111
 
 
112
    double      static_temperature;
 
113
    double      total_temperature;
 
114
    double      static_pressure;
 
115
    double      total_pressure;
 
116
    double      dynamic_pressure;
 
117
        
 
118
};
 
119
 
 
120
#endif // _OPENGC_HXX