1 /*******************************************************************************
3 Header: FGInitialCondition.h
7 ------------- Copyright (C) 1999 Anthony K. Peden (apeden@earthlink.net) -------------
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
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
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.
23 Further information about the GNU General Public License can also be found on
24 the world wide web at http://www.gnu.org.
28 --------------------------------------------------------------------------------
32 FUNCTIONAL DESCRIPTION
33 --------------------------------------------------------------------------------
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.
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...
47 ********************************************************************************
49 *******************************************************************************/
51 #ifndef FGINITIALCONDITION_H
52 #define FGINITIALCONDITION_H
54 /*******************************************************************************
56 *******************************************************************************/
58 #include "FGFDMExec.h"
59 #include "FGAtmosphere.h"
61 /*******************************************************************************
63 *******************************************************************************/
65 class FGInitialCondition
69 FGInitialCondition(FGFDMExec *fdmex);
70 ~FGInitialCondition(void);
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);
86 float GetUBodyFpsIC(void);
87 float GetVBodyFpsIC(void);
88 float GetWBodyFpsIC(void);
90 float GetThetaRadIC(void);
91 float GetPhiRadIC(void);
92 float GetPsiRadIC(void);
94 float GetLatitudeRadIC(void);
95 float GetLongitudeRadIC(void);
97 float GetAltitudeFtIC(void);
101 float alpha,beta,gamma,theta,phi,psi;
105 float latitude,longitude;