]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGInitialCondition.h
Initial revisions.
[flightgear.git] / src / FDM / JSBSim / FGInitialCondition.h
1 /*******************************************************************************
2
3  Header:       FGInitialCondition.h
4  Author:       Tony Peden
5  Date started: 7/1/99
6
7  ------------- Copyright (C) 1999  Anthony K. Peden (apeden@earthlink.net) -------------
8
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  details.
18
19  You should have received a copy of the GNU General Public License along with
20  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21  Place - Suite 330, Boston, MA  02111-1307, USA.
22
23  Further information about the GNU General Public License can also be found on
24  the world wide web at http://www.gnu.org.
25
26
27  HISTORY
28 --------------------------------------------------------------------------------
29 7/1/99   TP   Created
30
31
32 FUNCTIONAL DESCRIPTION
33 --------------------------------------------------------------------------------
34
35 The purpose of this class is to take a set of initial conditions and provide
36 a kinematically consistent set of body axis velocity components, euler
37 angles, and altitude.  This class does not attempt to trim the model i.e.
38 the sim will most likely start in a very dynamic state (unless, of course,
39 you have chosen your IC's wisely) even after setting it up with this class.
40
41 CAVEAT: This class makes use of alpha=theta-gamma. This means that setting
42         any of the three with this class is only valid for steady state
43         (all accels zero) and zero pitch rate.  One example where this
44         would produce invalid results is setting up for a trim in a pull-up
45         or pushover (both have nonzero pitch rate).  Maybe someday...
46
47 ********************************************************************************
48 SENTRY
49 *******************************************************************************/
50
51 #ifndef FGINITIALCONDITION_H
52 #define FGINITIALCONDITION_H
53
54 /*******************************************************************************
55 INCLUDES
56 *******************************************************************************/
57
58 #include "FGFDMExec.h"
59 #include "FGAtmosphere.h"
60
61 /*******************************************************************************
62 CLASS DECLARATION
63 *******************************************************************************/
64
65 class FGInitialCondition
66 {
67   public:
68
69     FGInitialCondition(FGFDMExec *fdmex);
70     ~FGInitialCondition(void);
71
72     void SetVcalibratedKtsIC(float tt);
73     void SetVtrueKtsIC(float tt);
74     void SetMachIC(float tt);
75     void SetAltitudeFtIC(float tt);
76     void SetFlightPathAngleDegIC(float tt);  //"vertical" flight path, solve for alpha using speed
77     //void SetClimbRateFpmIC(float tt);      //overwrite gamma
78     void SetAlphaDegIC(float tt);            //use currently stored gamma
79     void SetBetaDegIC(float tt);
80     void SetRollAngleDegIC(float tt);
81     void SetPitchAngleDegIC(float tt);       //use currently stored gamma
82     void SetHeadingDegIC(float tt);
83     void SetLatitudeDegIC(float tt);
84     void SetLongitudeDegIC(float tt);
85
86     float GetUBodyFpsIC(void);
87     float GetVBodyFpsIC(void);
88     float GetWBodyFpsIC(void);
89
90     float GetThetaRadIC(void);
91     float GetPhiRadIC(void);
92     float GetPsiRadIC(void);
93
94     float GetLatitudeRadIC(void);
95     float GetLongitudeRadIC(void);
96
97     float GetAltitudeFtIC(void);
98
99   private:
100     float vt,vc;
101     float alpha,beta,gamma,theta,phi,psi;
102     float mach;
103     float altitude,hdot;
104     float u,v,w;
105     float latitude,longitude;
106
107     FGAtmosphere *atm;
108 };
109
110 #endif