1 // net_fdm_mini.hxx -- defines a simple subset I/O interface to the flight
2 // dynamics model variables
4 // Written by Curtis Olson - http://www.flightgear.org/~curt
5 // Started January 2002.
7 // This file is in the Public Domain, and comes with no warranty.
12 #ifndef _NET_FDM_MINI_HXX
13 #define _NET_FDM_MINI_HXX
17 # error This library requires C++
21 // NOTE: this file defines an external interface structure. Due to
22 // variability between platforms and architectures, we only used fixed
23 // length types here. Specifically, integer types can vary in length.
24 // I am not aware of any platforms that don't use 4 bytes for float
25 // and 8 bytes for double.
29 #elif defined( _MSC_VER ) || defined(__MINGW32__)
30 typedef signed char int8_t;
31 typedef signed short int16_t;
32 typedef signed int int32_t;
33 typedef signed __int64 int64_t;
34 typedef unsigned char uint8_t;
35 typedef unsigned short uint16_t;
36 typedef unsigned int uint32_t;
37 typedef unsigned __int64 uint64_t;
39 # error "Port me! Platforms that don't have <stdint.h> need to define int8_t, et. al."
43 const uint32_t FG_NET_FDM_MINI_VERSION = 2;
46 // Define a structure containing the top level flight dynamics model
59 uint32_t version; // increment when data values change
62 double longitude; // geodetic (radians)
63 double latitude; // geodetic (radians)
64 double altitude; // above sea level (meters)
65 double agl; // above ground level (meters)
66 double phi; // roll (radians)
67 double theta; // pitch (radians)
68 double psi; // yaw or true heading (radians)
72 double climb_rate; // feet per second
75 uint32_t num_tanks; // Max number of fuel tanks
76 double fuel_quantity[FG_MAX_TANKS];
79 uint32_t cur_time; // current unix time
80 int32_t warp; // offset in seconds to unix time
84 #endif // _NET_FDM_MINI_HXX