]> git.mxchange.org Git - flightgear.git/blob - External/external.hxx
Initial revision.
[flightgear.git] / External / external.hxx
1 // external.hxx -- the "external" flight model (driven from other
2 //                 external input)
3 //
4 // Written by Curtis Olson, started December 1998.
5 //
6 // Copyright (C) 1998  Curtis L. Olson  - curt@flightgear.org
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 // (Log is kept at end of this file)
24
25
26 #ifndef _EXTERNAL_HXX
27 #define _EXTERNAL_HXX
28
29
30 #ifndef __cplusplus                                                          
31 # error This library requires C++
32 #endif                                   
33
34
35 #include <Time/fg_time.hxx>
36
37
38 class fgFDM_EXTERNAL {
39
40 public:
41
42     // Time Stamp
43
44     // The time at which these values are correct (for extrapolating
45     // later frames between position updates)
46     fgTIMESTAMP t;
47
48     // Positions
49
50     // placement in geodetic coordinates
51     double Latitude;
52     double Longitude;
53     double Altitude;
54
55     // orientation in euler angles relative to local frame (or ground
56     // position)
57     double Phi;       // roll
58     double Theta;     // pitch
59     double Psi;       // heading
60
61     // Velocities
62
63     // velocity relative to the local aircraft's coordinate system
64     double V_north;
65     double V_east;
66     double V_down;
67
68     // rotational rates relative to the coordinate system the body lives in
69     double P_body;
70     double Q_body;
71     double R_body;
72
73     // Accelerations
74     
75     // acceleration relative to the local aircraft's coordinate system
76     double V_dot_north;
77     double V_dot_east;
78     double V_dot_down;
79
80     // rotational acceleration relative to the coordinate system the
81     // body lives in
82     double P_dot_body;
83     double Q_dot_body;
84     double R_dot_body;
85 };
86
87
88 // reset flight params to a specific position 
89 void fgExternalInit(fgFLIGHT& f, double dt);
90
91 // update position based on inputs, positions, velocities, etc.
92 void fgExternalUpdate( fgFLIGHT& f, int multiloop );
93
94
95 #endif // _EXTERNAL_HXX
96
97
98 // $Log$
99 // Revision 1.1  1998/12/04 01:28:49  curt
100 // Initial revision.
101 //