Fold of running JSBSim until after the trimming routine.
This commit is contained in:
parent
123eb41819
commit
1cc0d9e97f
2 changed files with 5 additions and 3 deletions
|
@ -154,7 +154,7 @@ std::map<std::string,int> FGJSBsim::TURBULENCE_TYPE_NAMES;
|
||||||
static FGTurbulenceSeverityTable TurbulenceSeverityTable;
|
static FGTurbulenceSeverityTable TurbulenceSeverityTable;
|
||||||
|
|
||||||
FGJSBsim::FGJSBsim( double dt )
|
FGJSBsim::FGJSBsim( double dt )
|
||||||
: FGInterface(dt)
|
: FGInterface(dt), delta_t(dt)
|
||||||
{
|
{
|
||||||
bool result;
|
bool result;
|
||||||
if( TURBULENCE_TYPE_NAMES.empty() ) {
|
if( TURBULENCE_TYPE_NAMES.empty() ) {
|
||||||
|
@ -237,7 +237,7 @@ FGJSBsim::FGJSBsim( double dt )
|
||||||
|
|
||||||
terrain = fgGetNode("/sim/fdm/surface", true);
|
terrain = fgGetNode("/sim/fdm/surface", true);
|
||||||
|
|
||||||
fdmex->Setdt( dt );
|
// fdmex->Setdt( dt );
|
||||||
|
|
||||||
result = fdmex->LoadModel( aircraft_path, engine_path, systems_path,
|
result = fdmex->LoadModel( aircraft_path, engine_path, systems_path,
|
||||||
fgGetString("/sim/aero"), false );
|
fgGetString("/sim/aero"), false );
|
||||||
|
@ -433,7 +433,6 @@ void FGJSBsim::init()
|
||||||
common_init();
|
common_init();
|
||||||
|
|
||||||
copy_to_JSBsim();
|
copy_to_JSBsim();
|
||||||
fdmex->Resume();
|
|
||||||
fdmex->RunIC(); //loop JSBSim once w/o integrating
|
fdmex->RunIC(); //loop JSBSim once w/o integrating
|
||||||
if (fgGetBool("/sim/presets/running")) {
|
if (fgGetBool("/sim/presets/running")) {
|
||||||
Propulsion->InitRunning(-1);
|
Propulsion->InitRunning(-1);
|
||||||
|
@ -466,6 +465,8 @@ void FGJSBsim::init()
|
||||||
}
|
}
|
||||||
do_trim();
|
do_trim();
|
||||||
needTrim = false;
|
needTrim = false;
|
||||||
|
fdmex->Setdt( delta_t );
|
||||||
|
fdmex->Resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_from_JSBsim(); //update the bus
|
copy_from_JSBsim(); //update the bus
|
||||||
|
|
|
@ -302,6 +302,7 @@ private:
|
||||||
JSBSim::FGColumnVector3 hook_root_struct;
|
JSBSim::FGColumnVector3 hook_root_struct;
|
||||||
double hook_length;
|
double hook_length;
|
||||||
|
|
||||||
|
double delta_t;
|
||||||
bool crashed;
|
bool crashed;
|
||||||
|
|
||||||
AircraftMesh_ptr mesh;
|
AircraftMesh_ptr mesh;
|
||||||
|
|
Loading…
Add table
Reference in a new issue