]> git.mxchange.org Git - flightgear.git/blob - src/Network/net_fdm_mini.hxx
Clean up a couple bugs in the multiengine handling of the net_fdm.hxx
[flightgear.git] / src / Network / net_fdm_mini.hxx
1 // net_fdm_mini.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_FDM_MINI_HXX
12 #define _NET_FDM_MINI_HXX
13
14
15 #ifndef __cplusplus                                                          
16 # error This library requires C++
17 #endif                                   
18
19
20 const int FG_NET_FDM_MINI_VERSION = 1;
21
22
23 // Define a structure containing the top level flight dynamics model
24 // parameters
25
26 class FGNetMiniFDM {
27
28 public:
29
30     enum {
31         FG_MAX_ENGINES = 4,
32         FG_MAX_WHEELS = 3,
33         FG_MAX_TANKS = 4
34     };
35
36     int version;                // increment when data values change
37     int pad;                    // keep doubles 64-bit aligned for some
38                                 // hardware platforms, such as the Sun
39                                 // SPARC, which don't like misaligned
40                                 // data
41
42     // Positions
43     double longitude;           // geodetic (radians)
44     double latitude;            // geodetic (radians)
45     double altitude;            // above sea level (meters)
46     double agl;                 // above ground level (meters)
47     double phi;                 // roll (radians)
48     double theta;               // pitch (radians)
49     double psi;                 // yaw or true heading (radians)
50
51     // Velocities
52     double vcas;
53     double climb_rate;          // feet per second
54
55     // Consumables
56     int num_tanks;              // Max number of fuel tanks
57     double fuel_quantity[FG_MAX_TANKS];
58
59     // Environment
60     time_t cur_time;            // current unix time
61     long int warp;              // offset in seconds to unix time
62 };
63
64
65 #endif // _NET_FDM_MINI_HXX