1999-02-13 01:12:03 +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-02-13 01:12:03 +00:00
|
|
|
Header: FGDefs.h
|
|
|
|
Author: Jon S. Berndt
|
|
|
|
Date started: 02/01/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-02-13 01:12:03 +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-02-13 01:12:03 +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-02-13 01:12:03 +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-02-13 01:12:03 +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-02-13 01:12:03 +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-02-13 01:12:03 +00:00
|
|
|
HISTORY
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
02/01/99 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-02-13 01:12:03 +00:00
|
|
|
********************************************************************************
|
|
|
|
SENTRY
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
#ifndef FGDEFS_H
|
|
|
|
#define FGDEFS_H
|
|
|
|
|
|
|
|
#define MAX_ENGINES 10
|
|
|
|
#define MAX_TANKS 30
|
|
|
|
#define GRAVITY 32.174
|
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
|
|
|
#define INVGRAVITY 0.031081
|
2000-05-27 05:48:14 +00:00
|
|
|
#define EARTHRAD 20925650.00 // feet, equatorial
|
1999-02-13 01:12:03 +00:00
|
|
|
#define OMEGAEARTH 7.2685E-3 // rad/sec
|
|
|
|
#define EARTHRADSQRD 437882827922500.0
|
|
|
|
#define ONESECOND 4.848136811E-6
|
|
|
|
#define ECCENT 0.996647186
|
|
|
|
#define ECCENTSQRD 0.99330561
|
|
|
|
#define INVECCENTSQRD 1.0067395
|
|
|
|
#define INVECCENTSQRDM1 0.0067395
|
|
|
|
#define EPS 0.081819221
|
2000-04-24 23:49:06 +00:00
|
|
|
#define Reng 1716 //Specific Gas Constant,ft^2/(sec^2*R)
|
|
|
|
#define SHRATIO 1.4 //Specific Heat Ratio
|
1999-08-17 21:18:11 +00:00
|
|
|
#define RADTODEG 57.29578
|
|
|
|
#define DEGTORAD 1.745329E-2
|
|
|
|
#define KTSTOFPS 1.68781
|
|
|
|
#define FPSTOKTS 0.592484
|
2000-07-24 17:26:05 +00:00
|
|
|
#define INCHTOFT 0.08333333
|
2000-08-04 03:20:09 +00:00
|
|
|
#define OMEGA_EARTH .00007272205217
|
2000-10-09 21:16:21 +00:00
|
|
|
#define NEEDED_CFG_VERSION "1.35"
|
1999-08-17 21:18:11 +00:00
|
|
|
|
1999-12-20 20:24:49 +00:00
|
|
|
#define HPTOFTLBSSEC 550
|
2000-01-10 21:07:00 +00:00
|
|
|
#define METERS_TO_FEET 3.2808
|
1999-02-13 01:12:03 +00:00
|
|
|
|
2000-10-02 23:07:30 +00:00
|
|
|
enum eParam {
|
2000-10-09 21:16:21 +00:00
|
|
|
FG_UNDEF = 0,
|
2000-10-02 23:07:30 +00:00
|
|
|
FG_QBAR,
|
|
|
|
FG_WINGAREA,
|
|
|
|
FG_WINGSPAN,
|
|
|
|
FG_CBAR,
|
|
|
|
FG_ALPHA,
|
|
|
|
FG_ALPHADOT,
|
|
|
|
FG_BETA,
|
|
|
|
FG_BETADOT,
|
|
|
|
FG_PITCHRATE,
|
|
|
|
FG_ROLLRATE,
|
|
|
|
FG_YAWRATE,
|
|
|
|
FG_MACH,
|
|
|
|
FG_ALTITUDE,
|
|
|
|
FG_BI2VEL,
|
|
|
|
FG_CI2VEL,
|
|
|
|
FG_ELEVATOR_POS,
|
|
|
|
FG_AILERON_POS,
|
|
|
|
FG_RUDDER_POS,
|
|
|
|
FG_SPDBRAKE_POS,
|
|
|
|
FG_SPOILERS_POS,
|
|
|
|
FG_FLAPS_POS,
|
|
|
|
FG_ELEVATOR_CMD,
|
|
|
|
FG_AILERON_CMD,
|
|
|
|
FG_RUDDER_CMD,
|
|
|
|
FG_SPDBRAKE_CMD,
|
|
|
|
FG_SPOILERS_CMD,
|
|
|
|
FG_FLAPS_CMD,
|
|
|
|
FG_THROTTLE_CMD,
|
|
|
|
FG_THROTTLE_POS,
|
|
|
|
FG_HOVERB,
|
|
|
|
FG_PITCH_TRIM_CMD
|
|
|
|
};
|
1999-02-13 01:12:03 +00:00
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
#endif
|
2000-04-24 23:49:06 +00:00
|
|
|
|