1f1b2bab50
it's now possible to choose the LaRCsim model at runtime, as in fgfs --aircraft=c172 or fgfs --aircraft=uiuc --aircraft-dir=Aircraft-uiuc/Boeing747 I did this so that I could play with the UIUC stuff without losing Tony's C172 with its flaps, etc. I did my best to respect the design of the LaRCsim code by staying in C, making only minimal changes, and not introducing any dependencies on the rest of FlightGear. The modified files are attached.
83 lines
1.8 KiB
C
83 lines
1.8 KiB
C
/***************************************************************************
|
|
|
|
TITLE: navion_init.c
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
FUNCTION: Initializes navion math model
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
MODULE STATUS: developmental
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
GENEALOGY: Renamed navion_init.c originally created on 930111 by Bruce Jackson
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
DESIGNED BY: EBJ
|
|
|
|
CODED BY: EBJ
|
|
|
|
MAINTAINED BY: EBJ
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
MODIFICATION HISTORY:
|
|
|
|
DATE PURPOSE BY
|
|
|
|
950314 Removed initialization of state variables, since this is
|
|
now done (version 1.4b1) in ls_init. EBJ
|
|
950406 Removed #include of "shmdefs.h"; shmdefs.h is a duplicate
|
|
of "navion.h". EBJ
|
|
|
|
CURRENT RCS HEADER:
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
REFERENCES:
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
CALLED BY:
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
CALLS TO:
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
INPUTS:
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
OUTPUTS:
|
|
|
|
--------------------------------------------------------------------------*/
|
|
#include "ls_types.h"
|
|
#include "ls_generic.h"
|
|
#include "ls_cockpit.h"
|
|
#include "ls_constants.h"
|
|
#include "c172_aero.h"
|
|
|
|
void c172_init( void ) {
|
|
|
|
Throttle[3] = 0.2;
|
|
|
|
Dx_pilot = 0; Dy_pilot = 0; Dz_pilot = 0;
|
|
Mass=2300*INVG;
|
|
I_xx=948;
|
|
I_yy=1346;
|
|
I_zz=1967;
|
|
I_xz=0;
|
|
|
|
|
|
Flap_Position=Flap_handle;
|
|
Flaps_In_Transit=0;
|
|
|
|
|
|
|
|
|
|
}
|