1999-08-17 21:20:38 +00:00
|
|
|
/*******************************************************************************
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
Header: FGInitialCondition.h
|
|
|
|
Author: Tony Peden
|
|
|
|
Date started: 7/1/99
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
------------- Copyright (C) 1999 Anthony K. Peden (apeden@earthlink.net) -------------
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation; either version 2 of the License, or (at your option) any later
|
|
|
|
version.
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
details.
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
|
|
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
|
|
|
Place - Suite 330, Boston, MA 02111-1307, USA.
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
Further information about the GNU General Public License can also be found on
|
|
|
|
the world wide web at http://www.gnu.org.
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
HISTORY
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
7/1/99 TP Created
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
FUNCTIONAL DESCRIPTION
|
|
|
|
--------------------------------------------------------------------------------
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
The purpose of this class is to take a set of initial conditions and provide
|
|
|
|
a kinematically consistent set of body axis velocity components, euler
|
|
|
|
angles, and altitude. This class does not attempt to trim the model i.e.
|
|
|
|
the sim will most likely start in a very dynamic state (unless, of course,
|
|
|
|
you have chosen your IC's wisely) even after setting it up with this class.
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
********************************************************************************
|
|
|
|
SENTRY
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
#ifndef FGINITIALCONDITION_H
|
|
|
|
#define FGINITIALCONDITION_H
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
INCLUDES
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
#include "FGFDMExec.h"
|
|
|
|
#include "FGAtmosphere.h"
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
#include "FGMatrix.h"
|
1999-08-17 21:20:38 +00:00
|
|
|
|
2000-10-14 02:10:10 +00:00
|
|
|
#define ID_INITIALCONDITION "$Header"
|
|
|
|
|
1999-08-17 21:20:38 +00:00
|
|
|
/*******************************************************************************
|
|
|
|
CLASS DECLARATION
|
|
|
|
*******************************************************************************/
|
|
|
|
|
2000-07-24 17:26:05 +00:00
|
|
|
typedef enum { setvt, setvc, setve, setmach } speedset;
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
2000-10-02 23:07:30 +00:00
|
|
|
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
/* USAGE NOTES
|
|
|
|
With a valid object of FGFDMExec and an aircraft model loaded
|
|
|
|
FGInitialCondition fgic=new FGInitialCondition(FDMExec);
|
|
|
|
fgic->SetVcalibratedKtsIC()
|
|
|
|
fgic->SetAltitudeFtIC();
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.
|
|
|
|
//to directly into Run
|
|
|
|
FDMExec->GetState()->Initialize(fgic)
|
|
|
|
delete fgic;
|
|
|
|
FDMExec->Run()
|
|
|
|
|
|
|
|
//or to loop the sim w/o integrating
|
|
|
|
FDMExec->RunIC(fgic)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Speed:
|
|
|
|
Since vc, ve, vt, and mach all represent speed, the remaining
|
|
|
|
three are recalculated each time one of them is set (using the
|
|
|
|
current altitude). The most recent speed set is remembered so
|
|
|
|
that if and when altitude is reset, the last set speed is used
|
|
|
|
to recalculate the remaining three. Setting any of the body
|
|
|
|
components forces a recalculation of vt and vt then becomes the
|
|
|
|
most recent speed set.
|
|
|
|
|
|
|
|
Alpha,Gamma, and Theta:
|
|
|
|
This class assumes that it will be used to set up the sim for a
|
2000-10-09 21:16:21 +00:00
|
|
|
steady, zero pitch rate condition. Since any two of those angles
|
|
|
|
specifies the third gamma (flight path angle) is favored when setting
|
|
|
|
alpha and theta and alpha is favored when setting gamma. i.e.
|
|
|
|
set alpha : recalculate theta using gamma as currently set
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
set theta : recalculate alpha using gamma as currently set
|
|
|
|
set gamma : recalculate theta using alpha as currently set
|
|
|
|
|
|
|
|
The idea being that gamma is most interesting to pilots (since it
|
|
|
|
is indicative of climb rate).
|
|
|
|
|
|
|
|
Setting climb rate is, for the purpose of this discussion,
|
|
|
|
considered equivalent to setting gamma.
|
|
|
|
|
|
|
|
*/
|
2000-10-13 23:34:54 +00:00
|
|
|
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
class FGInitialCondition {
|
|
|
|
public:
|
|
|
|
|
|
|
|
FGInitialCondition(FGFDMExec *fdmex);
|
|
|
|
~FGInitialCondition(void);
|
|
|
|
|
|
|
|
void SetVcalibratedKtsIC(float tt);
|
|
|
|
void SetVequivalentKtsIC(float tt);
|
|
|
|
void SetVtrueKtsIC(float tt);
|
|
|
|
void SetMachIC(float tt);
|
|
|
|
|
|
|
|
void SetUBodyFpsIC(float tt);
|
|
|
|
void SetVBodyFpsIC(float tt);
|
|
|
|
void SetWBodyFpsIC(float tt);
|
2000-10-09 21:16:21 +00:00
|
|
|
|
|
|
|
void SetVnorthFpsIC(float tt);
|
|
|
|
void SetVeastFpsIC(float tt);
|
|
|
|
void SetVdownFpsIC(float tt);
|
|
|
|
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
void SetAltitudeFtIC(float tt);
|
2000-10-02 23:07:30 +00:00
|
|
|
void SetAltitudeAGLFtIC(float tt);
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
|
|
|
//"vertical" flight path, recalculate theta
|
2000-10-10 17:44:35 +00:00
|
|
|
inline void SetFlightPathAngleDegIC(float tt) { SetFlightPathAngleRadIC(tt*DEGTORAD); }
|
2000-10-02 23:07:30 +00:00
|
|
|
void SetFlightPathAngleRadIC(float tt);
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
//set speed first
|
|
|
|
void SetClimbRateFpmIC(float tt);
|
2000-10-09 21:16:21 +00:00
|
|
|
void SetClimbRateFpsIC(float tt);
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
//use currently stored gamma, recalcualte theta
|
2000-10-02 23:07:30 +00:00
|
|
|
inline void SetAlphaDegIC(float tt) { alpha=tt*DEGTORAD; getTheta(); }
|
|
|
|
inline void SetAlphaRadIC(float tt) { alpha=tt; getTheta(); }
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
//use currently stored gamma, recalcualte alpha
|
2000-10-02 23:07:30 +00:00
|
|
|
inline void SetPitchAngleDegIC(float tt) { theta=tt*DEGTORAD; getAlpha(); }
|
|
|
|
inline void SetPitchAngleRadIC(float tt) { theta=tt; getAlpha(); }
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
2000-10-02 23:07:30 +00:00
|
|
|
inline void SetBetaDegIC(float tt) { beta=tt*DEGTORAD; getTheta();}
|
|
|
|
inline void SetBetaRadIC(float tt) { beta=tt; getTheta(); }
|
2000-07-24 17:26:05 +00:00
|
|
|
|
2000-10-02 23:07:30 +00:00
|
|
|
inline void SetRollAngleDegIC(float tt) { phi=tt*DEGTORAD; getTheta(); }
|
|
|
|
inline void SetRollAngleRadIC(float tt) { phi=tt; getTheta(); }
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
|
|
|
inline void SetHeadingDegIC(float tt) { psi=tt*DEGTORAD; }
|
|
|
|
inline void SetHeadingRadIC(float tt) { psi=tt; }
|
|
|
|
|
|
|
|
inline void SetLatitudeDegIC(float tt) { latitude=tt*DEGTORAD; }
|
|
|
|
inline void SetLatitudeRadIC(float tt) { latitude=tt; }
|
|
|
|
|
|
|
|
inline void SetLongitudeDegIC(float tt) { longitude=tt*DEGTORAD; }
|
|
|
|
inline void SetLongitudeRadIC(float tt) { longitude=tt; }
|
|
|
|
|
|
|
|
inline float GetVcalibratedKtsIC(void) { return vc*FPSTOKTS; }
|
|
|
|
inline float GetVequivalentKtsIC(void) { return ve*FPSTOKTS; }
|
|
|
|
inline float GetVtrueKtsIC(void) { return vt*FPSTOKTS; }
|
2000-10-02 23:07:30 +00:00
|
|
|
inline float GetVtrueFpsIC(void) { return vt; }
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
inline float GetMachIC(void) { return mach; }
|
|
|
|
|
|
|
|
inline float GetAltitudeFtIC(void) { return altitude; }
|
|
|
|
|
|
|
|
inline float GetFlightPathAngleDegIC(void) { return gamma*RADTODEG; }
|
|
|
|
inline float GetFlightPathAngleRadIC(void) { return gamma; }
|
|
|
|
|
|
|
|
inline float GetClimbRateFpmIC(void) { return hdot*60; }
|
|
|
|
inline float GetClimbRateFpsIC(void) { return hdot; }
|
|
|
|
|
|
|
|
inline float GetAlphaDegIC(void) { return alpha*RADTODEG; }
|
|
|
|
inline float GetAlphaRadIC(void) { return alpha; }
|
|
|
|
|
|
|
|
inline float GetPitchAngleDegIC(void) { return theta*RADTODEG; }
|
|
|
|
inline float GetPitchAngleRadIC(void) { return theta; }
|
|
|
|
|
|
|
|
|
|
|
|
inline float GetBetaDegIC(void) { return beta*RADTODEG; }
|
|
|
|
inline float GetBetaRadIC(void) { return beta*RADTODEG; }
|
|
|
|
|
|
|
|
inline float GetRollAngleDegIC(void) { return phi*RADTODEG; }
|
|
|
|
inline float GetRollAngleRadIC(void) { return phi; }
|
|
|
|
|
|
|
|
inline float GetHeadingDegIC(void) { return psi*RADTODEG; }
|
|
|
|
inline float GetHeadingRadIC(void) { return psi; }
|
|
|
|
|
|
|
|
inline float GetLatitudeDegIC(void) { return latitude*RADTODEG; }
|
|
|
|
inline float GetLatitudeRadIC(void) { return latitude; }
|
|
|
|
|
|
|
|
inline float GetLongitudeDegIC(void) { return longitude*RADTODEG; }
|
|
|
|
inline float GetLongitudeRadIC(void) { return longitude; }
|
|
|
|
|
|
|
|
inline float GetUBodyFpsIC(void) { return vt*cos(alpha)*cos(beta); }
|
|
|
|
inline float GetVBodyFpsIC(void) { return vt*sin(beta); }
|
|
|
|
inline float GetWBodyFpsIC(void) { return vt*sin(alpha)*cos(beta); }
|
|
|
|
|
|
|
|
inline float GetThetaRadIC(void) { return theta; }
|
|
|
|
inline float GetPhiRadIC(void) { return phi; }
|
|
|
|
inline float GetPsiRadIC(void) { return psi; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
float vt,vc,ve;
|
|
|
|
float alpha,beta,gamma,theta,phi,psi;
|
|
|
|
float mach;
|
|
|
|
float altitude,hdot;
|
|
|
|
float latitude,longitude;
|
|
|
|
float u,v,w;
|
2000-10-09 21:16:21 +00:00
|
|
|
float vnorth,veast,vdown;
|
2000-10-02 23:07:30 +00:00
|
|
|
|
|
|
|
float xlo, xhi,xmin,xmax;
|
|
|
|
|
|
|
|
typedef float (FGInitialCondition::*fp)(float x);
|
|
|
|
fp sfunc;
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
|
|
|
|
speedset lastSpeedSet;
|
|
|
|
|
|
|
|
FGFDMExec *fdmex;
|
2000-10-02 23:07:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
bool getAlpha(void);
|
|
|
|
bool getTheta(void);
|
Updates from the Jon and Tony show.
Tony submitted:
JSBsim:
Added trimming routine, it is longitudinal & in-air only at this point
Added support for taking wind & weather data from external source
Added support for flaps.
Added independently settable pitch trim
Added alphamin and max to config file, stall modeling and warning to
follow
c172.cfg:
Flaps!
Adjusted Cmo, model should be speed stable now
FG:
Hooked up Christian's weather code, should be using it soon.
Hooked up the trimming routine. Note that the X-15 will not trim.
This is not a model or trimming routine deficiency, just the
nature of the X-15
The trimming routine sets the pitch trim and and throttle at startup.
The throttle is set using Norman's code for the autothrottle so the
autothrottle is on by default. --notrim will turn it off.
Added --vc, --mach, and --notrim switches
(vc is airspeed in knots)
uBody, vBody, and wBody are still supported, last one entered
on the command line counts, i.e. you can set vc or mach or u,v,
and w but any combination will be ignored.
2000-05-16 21:35:11 +00:00
|
|
|
bool getMachFromVcas(float *Mach,float vcas);
|
2000-10-02 23:07:30 +00:00
|
|
|
|
|
|
|
float GammaEqOfTheta(float Theta);
|
|
|
|
float GammaEqOfAlpha(float Alpha);
|
|
|
|
float calcVcas(float Mach);
|
2000-10-09 21:16:21 +00:00
|
|
|
void calcUVWfromNED(void);
|
2000-10-02 23:07:30 +00:00
|
|
|
|
|
|
|
bool findInterval(float x,float guess);
|
|
|
|
bool solve(float *y, float x);
|
1999-08-17 21:20:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|