]> git.mxchange.org Git - flightgear.git/blob - src/Network/raw_ctrls.hxx
Added support for sending:
[flightgear.git] / src / Network / raw_ctrls.hxx
1 // raw_ctrls.hxx -- defines a common raw I/O interface to the flight
2 //                  sim controls
3 //
4 // Written by Curtis Olson, started July 2001.
5 //
6 // Copyright (C) 2001  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 _RAW_CTRLS_HXX
26 #define _RAW_CTRLS_HXX
27
28
29 #ifndef __cplusplus                                                          
30 # error This library requires C++
31 #endif                                   
32
33 const int FG_RAW_CTRLS_VERSION = 5;
34
35
36 // Define a structure containing the control parameters
37
38 class FGRawCtrls {
39
40 public:
41
42     int version;                         // increment when data values change
43
44     static const int FG_MAX_ENGINES = 4;
45     static const int FG_MAX_WHEELS = 3;
46
47     // Aero controls
48     double aileron;                      // -1 ... 1
49     double elevator;                     // -1 ... 1
50     double elevator_trim;                // -1 ... 1
51     double rudder;                       // -1 ... 1
52     double flaps;                        //  0 ... 1
53
54     // Engine controls
55     int num_engines;                     // number of valid engines
56     int magnetos[FG_MAX_ENGINES];
57     bool starter[FG_MAX_ENGINES];        // true = starter engauged
58     double throttle[FG_MAX_ENGINES];     //  0 ... 1
59     double mixture[FG_MAX_ENGINES];      //  0 ... 1
60     double prop_advance[FG_MAX_ENGINES]; //  0 ... 1
61
62     // Brake controls
63     int num_wheels;                      // number of valid wheels
64     double brake[FG_MAX_WHEELS];         //  0 ... 1
65
66     // Other values of use to a remote FDM
67     double hground;                      // ground elevation (meters)
68     double magvar;                       // local magnetic variation in degrees.
69     int speedup;                         // integer speedup multiplier
70 };
71
72
73 #endif // _RAW_CTRLS_HXX
74
75