1999-06-17 20:07:19 +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-06-17 20:07:19 +00:00
|
|
|
Header: FGAircraft.h
|
|
|
|
Author: Jon S. Berndt
|
|
|
|
Date started: 12/12/98
|
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-06-17 20:07:19 +00:00
|
|
|
------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.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-06-17 20:07:19 +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-06-17 20:07:19 +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-06-17 20:07:19 +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-06-17 20:07:19 +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-06-17 20:07:19 +00:00
|
|
|
HISTORY
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
12/12/98 JSB 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-06-17 20:07:19 +00:00
|
|
|
********************************************************************************
|
|
|
|
SENTRY
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
#ifndef FGAIRCRAFT_H
|
|
|
|
#define FGAIRCRAFT_H
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
COMMENTS, REFERENCES, and NOTES
|
|
|
|
*******************************************************************************/
|
1999-06-20 04:10:44 +00:00
|
|
|
/*
|
1999-06-17 20:07:19 +00:00
|
|
|
The aerodynamic coefficients used in this model typically are:
|
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-06-20 04:10:44 +00:00
|
|
|
Longitudinal
|
1999-06-17 20:07:19 +00:00
|
|
|
CL0 - Reference lift at zero alpha
|
|
|
|
CD0 - Reference drag at zero alpha
|
|
|
|
CDM - Drag due to Mach
|
|
|
|
CLa - Lift curve slope (w.r.t. alpha)
|
|
|
|
CDa - Drag curve slope (w.r.t. alpha)
|
|
|
|
CLq - Lift due to pitch rate
|
|
|
|
CLM - Lift due to Mach
|
|
|
|
CLadt - Lift due to alpha rate
|
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-06-17 20:07:19 +00:00
|
|
|
Cmadt - Pitching Moment due to alpha rate
|
|
|
|
Cm0 - Reference Pitching moment at zero alpha
|
|
|
|
Cma - Pitching moment slope (w.r.t. alpha)
|
|
|
|
Cmq - Pitch damping (pitch moment due to pitch rate)
|
|
|
|
CmM - Pitch Moment due to Mach
|
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-06-20 04:10:44 +00:00
|
|
|
Lateral
|
1999-06-17 20:07:19 +00:00
|
|
|
Cyb - Side force due to sideslip
|
|
|
|
Cyr - Side force due to yaw rate
|
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-06-17 20:07:19 +00:00
|
|
|
Clb - Dihedral effect (roll moment due to sideslip)
|
|
|
|
Clp - Roll damping (roll moment due to roll rate)
|
|
|
|
Clr - Roll moment due to yaw rate
|
|
|
|
Cnb - Weathercocking stability (yaw moment due to sideslip)
|
|
|
|
Cnp - Rudder adverse yaw (yaw moment due to roll rate)
|
|
|
|
Cnr - Yaw damping (yaw moment due to yaw rate)
|
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-06-20 04:10:44 +00:00
|
|
|
Control
|
1999-06-17 20:07:19 +00:00
|
|
|
CLDe - Lift due to elevator
|
|
|
|
CDDe - Drag due to elevator
|
|
|
|
CyDr - Side force due to rudder
|
|
|
|
CyDa - Side force due to aileron
|
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-06-17 20:07:19 +00:00
|
|
|
CmDe - Pitch moment due to elevator
|
|
|
|
ClDa - Roll moment due to aileron
|
|
|
|
ClDr - Roll moment due to rudder
|
|
|
|
CnDr - Yaw moment due to rudder
|
|
|
|
CnDa - Yaw moment due to aileron
|
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-06-20 04:10:44 +00:00
|
|
|
[1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
|
1999-06-17 20:07:19 +00:00
|
|
|
Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420 Naval Postgraduate
|
1999-06-20 04:10:44 +00:00
|
|
|
School, January 1994
|
|
|
|
[2] D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices",
|
|
|
|
JSC 12960, July 1977
|
|
|
|
[3] Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at
|
|
|
|
NASA-Ames", NASA CR-2497, January 1975
|
|
|
|
[4] Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics",
|
|
|
|
Wiley & Sons, 1979 ISBN 0-471-03032-5
|
|
|
|
[5] Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons,
|
|
|
|
1982 ISBN 0-471-08936-2
|
1999-06-17 20:07:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
INCLUDES
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
#ifdef FGFS
|
2000-02-15 03:30:01 +00:00
|
|
|
# include <simgear/compiler.h>
|
1999-06-17 20:07:19 +00:00
|
|
|
# ifdef FG_HAVE_STD_INCLUDES
|
1999-12-20 20:24:49 +00:00
|
|
|
# include <vector>
|
2000-04-24 23:49:06 +00:00
|
|
|
# include <map>
|
1999-06-17 20:07:19 +00:00
|
|
|
# else
|
1999-12-20 20:24:49 +00:00
|
|
|
# include <vector.h>
|
2000-04-24 23:49:06 +00:00
|
|
|
# include <map.h>
|
1999-06-17 20:07:19 +00:00
|
|
|
# endif
|
|
|
|
#else
|
1999-12-20 20:24:49 +00:00
|
|
|
# include <vector>
|
2000-04-24 23:49:06 +00:00
|
|
|
# include <map>
|
1999-06-17 20:07:19 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "FGModel.h"
|
|
|
|
#include "FGCoefficient.h"
|
|
|
|
#include "FGEngine.h"
|
|
|
|
#include "FGTank.h"
|
1999-12-20 20:24:49 +00:00
|
|
|
#include "FGLGear.h"
|
2000-04-24 23:49:06 +00:00
|
|
|
#include "FGConfigFile.h"
|
|
|
|
#include "FGMatrix.h"
|
1999-06-17 20:07:19 +00:00
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
DEFINITIONS
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
CLASS DECLARATION
|
|
|
|
*******************************************************************************/
|
|
|
|
|
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 FGAircraft : public FGModel {
|
2000-04-24 23:49:06 +00:00
|
|
|
enum {eL=1, eM, eN};
|
|
|
|
enum {eX=1, eY, eZ};
|
|
|
|
enum {eP=1, eQ, eR};
|
|
|
|
enum {ePhi=1, eTht, ePsi};
|
2000-05-02 18:25:30 +00:00
|
|
|
|
1999-06-17 20:07:19 +00:00
|
|
|
public:
|
1999-12-20 20:24:49 +00:00
|
|
|
FGAircraft(FGFDMExec*);
|
1999-06-17 20:07:19 +00:00
|
|
|
~FGAircraft(void);
|
|
|
|
|
|
|
|
bool Run(void);
|
1999-06-21 05:01:31 +00:00
|
|
|
bool LoadAircraft(string, string, string);
|
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 string GetAircraftName(void) { return AircraftName; }
|
|
|
|
inline void SetGearUp(bool tt) { GearUp = tt; }
|
|
|
|
inline bool GetGearUp(void) { return GearUp; }
|
|
|
|
inline float GetWingArea(void) { return WingArea; }
|
|
|
|
inline float GetWingSpan(void) { return WingSpan; }
|
|
|
|
inline float Getcbar(void) { return cbar; }
|
|
|
|
inline FGEngine* GetEngine(int tt) { return Engine[tt]; }
|
|
|
|
inline FGTank* GetTank(int tt) { return Tank[tt]; }
|
|
|
|
inline float GetWeight(void) { return Weight; }
|
|
|
|
inline float GetMass(void) { return Mass; }
|
|
|
|
inline FGColumnVector GetMoments(void) { return vMoments; }
|
|
|
|
inline FGColumnVector GetForces(void) { return vForces; }
|
|
|
|
inline FGColumnVector GetvFs(void) { return vFs; }
|
|
|
|
inline float GetIxx(void) { return Ixx; }
|
|
|
|
inline float GetIyy(void) { return Iyy; }
|
|
|
|
inline float GetIzz(void) { return Izz; }
|
|
|
|
inline float GetIxz(void) { return Ixz; }
|
|
|
|
inline int GetNumEngines(void) { return numEngines; }
|
|
|
|
inline FGColumnVector GetXYZcg(void) { return vXYZcg; }
|
|
|
|
inline float GetNlf(void) { return nlf; }
|
|
|
|
inline float GetAlphaCLMax(void) { return alphaclmax; }
|
|
|
|
inline float GetAlphaCLMin(void) { return alphaclmin; }
|
|
|
|
inline void SetAlphaCLMax(float tt) { alphaclmax=tt; }
|
|
|
|
inline void SetAlphaCLMin(float tt) { alphaclmin=tt; }
|
|
|
|
|
2000-05-02 18:25:30 +00:00
|
|
|
string GetCoefficientStrings(void);
|
|
|
|
string GetCoefficientValues(void);
|
|
|
|
|
|
|
|
enum { ssSimulation = 1,
|
|
|
|
ssAerosurfaces = 2,
|
|
|
|
ssRates = 4,
|
|
|
|
ssVelocities = 8,
|
|
|
|
ssForces = 16,
|
|
|
|
ssMoments = 32,
|
|
|
|
ssAtmosphere = 64,
|
|
|
|
ssMassProps = 128,
|
|
|
|
ssCoefficients = 256,
|
|
|
|
ssPosition = 512 } subsystems;
|
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-06-17 20:07:19 +00:00
|
|
|
private:
|
|
|
|
void GetState(void);
|
1999-12-20 20:24:49 +00:00
|
|
|
void FMAero(void);
|
|
|
|
void FMGear(void);
|
|
|
|
void FMMass(void);
|
|
|
|
void FMProp(void);
|
1999-06-17 20:07:19 +00:00
|
|
|
void MassChange(void);
|
2000-04-24 23:49:06 +00:00
|
|
|
FGColumnVector vMoments;
|
|
|
|
FGColumnVector vForces;
|
2000-05-02 18:25:30 +00:00
|
|
|
FGColumnVector vFs;
|
2000-04-24 23:49:06 +00:00
|
|
|
FGColumnVector vXYZrp;
|
|
|
|
FGColumnVector vbaseXYZcg;
|
|
|
|
FGColumnVector vXYZcg;
|
|
|
|
FGColumnVector vXYZep;
|
|
|
|
FGColumnVector vEuler;
|
1999-09-28 14:19:34 +00:00
|
|
|
float baseIxx, baseIyy, baseIzz, baseIxz, EmptyMass, Mass;
|
|
|
|
float Ixx, Iyy, Izz, Ixz;
|
1999-06-17 20:07:19 +00:00
|
|
|
float rho, qbar, Vt;
|
|
|
|
float alpha, beta;
|
|
|
|
float WingArea, WingSpan, cbar;
|
|
|
|
float Weight, EmptyWeight;
|
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
|
|
|
float nlf,alphaclmax,alphaclmin;
|
1999-06-17 20:07:19 +00:00
|
|
|
float dt;
|
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
|
|
|
string CFGVersion;
|
2000-04-24 23:49:06 +00:00
|
|
|
string AircraftName;
|
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-06-17 20:07:19 +00:00
|
|
|
int numTanks;
|
|
|
|
int numEngines;
|
|
|
|
int numSelectedOxiTanks;
|
|
|
|
int numSelectedFuelTanks;
|
|
|
|
FGTank* Tank[MAX_TANKS];
|
|
|
|
FGEngine *Engine[MAX_ENGINES];
|
|
|
|
|
2000-04-24 23:49:06 +00:00
|
|
|
typedef map<string,int> AxisIndex;
|
|
|
|
AxisIndex AxisIdx;
|
|
|
|
|
|
|
|
typedef vector<FGCoefficient> CoeffArray;
|
|
|
|
typedef vector<CoeffArray> CoeffVector;
|
|
|
|
|
|
|
|
CoeffVector Coeff;
|
|
|
|
|
|
|
|
void DisplayCoeffFactors(int multipliers);
|
1999-06-17 20:07:19 +00:00
|
|
|
|
|
|
|
bool GearUp;
|
|
|
|
|
|
|
|
string Axis[6];
|
1999-12-20 20:24:49 +00:00
|
|
|
vector <FGLGear*> lGear;
|
2000-04-24 23:49:06 +00:00
|
|
|
string AircraftPath;
|
|
|
|
string EnginePath;
|
|
|
|
void ReadMetrics(FGConfigFile*);
|
|
|
|
void ReadPropulsion(FGConfigFile*);
|
|
|
|
void ReadFlightControls(FGConfigFile*);
|
|
|
|
void ReadAerodynamics(FGConfigFile*);
|
|
|
|
void ReadUndercarriage(FGConfigFile*);
|
|
|
|
void ReadPrologue(FGConfigFile*);
|
2000-05-02 18:25:30 +00:00
|
|
|
void ReadOutput(FGConfigFile*);
|
1999-06-17 20:07:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
#endif
|