1 // net_gui.hxx -- defines a simple subset I/O interface to the flight
2 // dynamics model variables
4 // Written by Curtis Olson - curt@flightgear.com, started January 2002.
6 // This file is in the Public Domain, and comes with no warranty.
15 // NOTE: this file defines an external interface structure. Due to
16 // variability between platforms and architectures, we only used fixed
17 // length types here. Specifically, integer types can vary in length.
18 // I am not aware of any platforms that don't use 4 bytes for float
19 // and 8 bytes for double.
23 #elif defined( _MSC_VER ) || defined(__MINGW32__)
24 typedef signed char int8_t;
25 typedef signed short int16_t;
26 typedef signed int int32_t;
27 typedef signed __int64 int64_t;
28 typedef unsigned char uint8_t;
29 typedef unsigned short uint16_t;
30 typedef unsigned int uint32_t;
31 typedef unsigned __int64 uint64_t;
33 # error "Port me! Platforms that don't have <stdint.h> need to define int8_t, et. al."
36 const uint32_t FG_NET_GUI_VERSION = 7;
39 // Define a structure containing the top level flight dynamics model
52 uint32_t version; // increment when data values change
55 double longitude; // geodetic (radians)
56 double latitude; // geodetic (radians)
57 float altitude; // above sea level (meters)
58 float agl; // above ground level (meters)
59 float phi; // roll (radians)
60 float theta; // pitch (radians)
61 float psi; // yaw or true heading (radians)
65 float climb_rate; // feet per second
68 uint32_t num_tanks; // Max number of fuel tanks
69 float fuel_quantity[FG_MAX_TANKS];
72 uint32_t cur_time; // current unix time
73 // FIXME: make this uint64_t before 2038
74 uint32_t warp; // offset in seconds to unix time
75 float ground_elev; // ground elev (meters)
78 float tuned_freq; // currently tuned frequency
79 float nav_radial; // target nav radial
80 uint32_t 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
87 #endif // _NET_GUI_HXX