#include "FGState.h"
#include "FGAtmosphere.h"
#include "FGFCS.h"
+#include "FGGroundCallback.h"
#include "FGPropulsion.h"
#include "FGMassBalance.h"
#include "FGGroundReactions.h"
Inertial = 0;
GroundReactions = 0;
Aircraft = 0;
+ GroundCallback = 0;
Propagate = 0;
Auxiliary = 0;
Output = 0;
Inertial = new FGInertial(this);
GroundReactions = new FGGroundReactions(this);
Aircraft = new FGAircraft(this);
+ GroundCallback = new FGGroundCallback();
Propagate = new FGPropagate(this);
Auxiliary = new FGAuxiliary(this);
Output = new FGOutput(this);
delete IC;
delete Trim;
+ delete GroundCallback;
+
FirstModel = 0L;
Error = 0;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+void FGFDMExec::SetGroundCallback(FGGroundCallback* p) {
+ if (GroundCallback)
+ delete GroundCallback;
+ GroundCallback = p;
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
vector <string> FGFDMExec::EnumerateFDMs(void)
{
vector <string> FDMList;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-bool FGFDMExec::LoadModel(string AircraftPath, string EnginePath, string model)
+bool FGFDMExec::LoadModel(string AircraftPath, string EnginePath, string model,
+ bool addModelToPath)
{
+
FGFDMExec::AircraftPath = AircraftPath;
FGFDMExec::EnginePath = EnginePath;
- return LoadModel(model);
+ return LoadModel(model, addModelToPath);
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-bool FGFDMExec::LoadModel(string model)
+
+bool FGFDMExec::LoadModel(string model, bool addModelToPath)
{
+
bool result = true;
string token;
string aircraftCfgFileName;
return false;
}
+ aircraftCfgFileName = AircraftPath;
# ifndef macintosh
- aircraftCfgFileName = AircraftPath + "/" + model + ".xml";
+ if (addModelToPath) aircraftCfgFileName += "/" + model;
+ aircraftCfgFileName += "/" + model + ".xml";
# else
- aircraftCfgFileName = AircraftPath + ";" + model + ".xml";
+ if (addModelToPath) aircraftCfgFileName += ";" + model;
+ aircraftCfgFileName += ";" + model + ".xml";
# endif
FGConfigFile AC_cfg(aircraftCfgFileName);
return false;
}
- if (Release == "ALPHA") {
+ if (Release == "ALPHA" && debug_lvl > 0) {
+#ifndef _MSC_VER
system("banner ALPHA");
+#endif
cout << endl << endl
<< highint << "This aircraft model is an " << fgred << Release
<< reset << highint << " release!!!" << endl << endl << reset
<< " will not fly as expected." << endl << endl
<< fgred << highint << "Use this model for development purposes ONLY!!!"
<< normint << reset << endl << endl;
- } else if (Release == "BETA") {
+ } else if (Release == "BETA" && debug_lvl > 0) {
+#ifndef _MSC_VER
system("banner BETA");
+#endif
cout << endl << endl
<< highint << "This aircraft model is a " << fgred << Release
<< reset << highint << " release!!!" << endl << endl << reset