-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Module: FGFDMExec.cpp
Author: Jon S. Berndt
--------------------------------------------------------------------------------
11/17/98 JSB Created
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifdef FGFS
# include <simgear/compiler.h>
-# ifdef FG_HAVE_STD_INCLUDES
+# ifdef SG_HAVE_STD_INCLUDES
# include <iostream>
# include <ctime>
# else
#include "FGAuxiliary.h"
#include "FGOutput.h"
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+static const char *IdSrc = "$Header$";
+static const char *IdHdr = "ID_FDMEXEC";
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
// Constructor
bool FGFDMExec::Allocate(void) {
- cout << "FGFDMExec::Allocate ... ";
bool result=true;
Atmosphere = new FGAtmosphere(this);
Schedule(Output, 1);
modelLoaded = false;
- cout << "done." << endl;
return result;
}
bool FGFDMExec::DeAllocate(void) {
- cout << "FGFDMExec::DeAllocate ... ";
if ( Atmosphere != 0 ) delete Atmosphere;
if ( FCS != 0 ) delete FCS;
modelLoaded = false;
- cout << "done" << endl;
}
bool FGFDMExec::LoadModel(string APath, string EPath, string model)
{
bool result=false;
- cout << "FGFDMExec::LoadModel ..." << endl;
if(modelLoaded) {
DeAllocate();
Allocate();
AircraftPath = APath;
EnginePath = EPath;
result = Aircraft->LoadAircraft(AircraftPath, EnginePath, model);
- if(result) {
- modelLoaded=true;
+
+ if (result) {
+ modelLoaded = true;
} else {
cerr << "FGFDMExec: Failed to load aircraft and/or engine model" << endl;
- }
- cout << "FGFDMExec::LoadModel complete." << endl;;
+ }
+
return result;
}