Position = fdmex->GetPosition();
Auxiliary = fdmex->GetAuxiliary();
Aerodynamics = fdmex->GetAerodynamics();
-
+
+ Atmosphere->UseInternal();
+
fgic=new FGInitialCondition(fdmex);
needTrim=true;
engine_path.str(),
fgGetString("/sim/aircraft") );
+
+ if (result) {
+ SG_LOG( SG_FLIGHT, SG_INFO,
+ " loaded aircraft.");
+ } else {
+ SG_LOG( SG_FLIGHT, SG_INFO,
+ " aircraft does not exist (you may have mis-typed the name).");
+ throw(-1);
+ }
+
int Neng = Propulsion->GetNumEngines();
SG_LOG(SG_FLIGHT,SG_INFO, "Neng: " << Neng );
/******************************************************************************/
FGJSBsim::~FGJSBsim(void) {
- if(fdmex != NULL) {
- delete fdmex;
- delete fgic;
+ if (fdmex != NULL) {
+ delete fdmex; fdmex=NULL;
+ delete fgic; fgic=NULL;
}
}
// each subsequent iteration through the EOM
void FGJSBsim::init() {
- // Explicitly call the superclass's
- // init method first.
- FGInterface::init();
-
- bool result;
-
+
SG_LOG( SG_FLIGHT, SG_INFO, "Starting and initializing JSBsim" );
-
- Atmosphere->UseInternal();
+
+ // Explicitly call the superclass's
+ // init method first.
+ FGInterface::init();
SG_LOG( SG_FLIGHT, SG_INFO, " Initializing JSBSim with:" );