]> git.mxchange.org Git - flightgear.git/blob - src/Network/net_gui.hxx
Moved random ground cover object management code (userdata.[ch]xx) over
[flightgear.git] / src / Network / net_gui.hxx
1 // net_gui.hxx -- defines a simple subset I/O interface to the flight
2 //                     dynamics model variables
3 //
4 // Written by Curtis Olson, started January 2002.
5 //
6 // Copyright (C) 2002  Curtis L. Olson  - curt@flightgear.com
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 //
22 // $Id$
23
24
25 #ifndef _NET_GUI_HXX
26 #define _NET_GUI_HXX
27
28
29 #ifndef __cplusplus                                                          
30 # error This library requires C++
31 #endif                                   
32
33
34 const int FG_NET_GUI_VERSION = 3;
35
36
37 // Define a structure containing the top level flight dynamics model
38 // parameters
39
40 class FGNetGUI {
41
42 public:
43
44     enum {
45         FG_MAX_ENGINES = 4,
46         FG_MAX_WHEELS = 3,
47         FG_MAX_TANKS = 4
48     };
49
50     int version;                // increment when data values change
51     int pad;                    // keep doubles 64-bit aligned for some
52                                 // hardware platforms, such as the Sun
53                                 // SPARC, which don't like misaligned
54                                 // data
55
56     // Positions
57     double longitude;           // geodetic (radians)
58     double latitude;            // geodetic (radians)
59     float altitude;             // above sea level (meters)
60     float agl;                  // above ground level (meters)
61     float phi;                  // roll (radians)
62     float theta;                // pitch (radians)
63     float psi;                  // yaw or true heading (radians)
64
65     // Velocities
66     float vcas;
67     float climb_rate;           // feet per second
68
69     // Consumables
70     int num_tanks;              // Max number of fuel tanks
71     float fuel_quantity[FG_MAX_TANKS];
72
73     // Environment
74     time_t cur_time;            // current unix time
75     long int warp;              // offset in seconds to unix time
76
77     // Approach
78     float tuned_freq;           // currently tuned frequency
79     float nav_radial;           // target nav radial
80     bool in_range;              // tuned navaid is in range?
81     float dist_nm;              // distance to tuned navaid in nautical miles
82     float course_deviation_deg; // degrees off target course
83     float gs_deviation_deg;     // degrees off target glide slope
84 };
85
86
87 #endif // _NET_GUI_HXX