]> git.mxchange.org Git - flightgear.git/blob - src/Network/net_gui.hxx
Mathias Fröhölöiööhlich:
[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 - curt@flightgear.com, started January 2002.
5 //
6 // This file is in the Public Domain, and comes with no warranty.
7 //
8 // $Id$
9
10
11 #ifndef _NET_GUI_HXX
12 #define _NET_GUI_HXX
13
14 #include <simgear/compiler.h>
15
16 // NOTE: this file defines an external interface structure.  Due to
17 // variability between platforms and architectures, we only used fixed
18 // length types here.  Specifically, integer types can vary in length.
19 // I am not aware of any platforms that don't use 4 bytes for float
20 // and 8 bytes for double.
21
22 #ifdef HAVE_STDINT_H
23 # include <stdint.h>
24 #endif
25
26 const uint32_t FG_NET_GUI_VERSION = 7;
27
28
29 // Define a structure containing the top level flight dynamics model
30 // parameters
31
32 class FGNetGUI {
33
34 public:
35
36     enum {
37         FG_MAX_ENGINES = 4,
38         FG_MAX_WHEELS = 3,
39         FG_MAX_TANKS = 4
40     };
41
42     uint32_t version;           // increment when data values change
43
44     // Positions
45     double longitude;           // geodetic (radians)
46     double latitude;            // geodetic (radians)
47     float altitude;             // above sea level (meters)
48     float agl;                  // above ground level (meters)
49     float phi;                  // roll (radians)
50     float theta;                // pitch (radians)
51     float psi;                  // yaw or true heading (radians)
52
53     // Velocities
54     float vcas;
55     float climb_rate;           // feet per second
56
57     // Consumables
58     uint32_t num_tanks;         // Max number of fuel tanks
59     float fuel_quantity[FG_MAX_TANKS];
60
61     // Environment
62     uint32_t cur_time;          // current unix time
63                                 // FIXME: make this uint64_t before 2038
64     uint32_t warp;              // offset in seconds to unix time
65     float ground_elev;          // ground elev (meters)
66
67     // Approach
68     float tuned_freq;           // currently tuned frequency
69     float nav_radial;           // target nav radial
70     uint32_t in_range;           // tuned navaid is in range?
71     float dist_nm;              // distance to tuned navaid in nautical miles
72     float course_deviation_deg; // degrees off target course
73     float gs_deviation_deg;     // degrees off target glide slope
74 };
75
76
77 #endif // _NET_GUI_HXX