MCPcopy Create free account
hub / github.com/JSBSim-Team/jsbsim / OpenScript

Method OpenScript

matlab/JSBSimInterface.cpp:124–140  ·  view source on GitHub ↗

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Source from the content-addressed store, hash-verified

122
123//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
124bool JSBSimInterface::OpenScript(const SGPath& script, double delta_t, const SGPath& initfile)
125{
126 try {
127 if (!fdmExec->SetAircraftPath (SGPath("aircraft"))) return false;
128 if (!fdmExec->SetEnginePath (SGPath("engine"))) return false;
129 if (!fdmExec->SetSystemsPath (SGPath("systems"))) return false;
130
131 if (!fdmExec->LoadScript(script, delta_t, initfile)) return false;
132
133 if (!fdmExec->RunIC()) return false;
134
135 return true;
136 } catch (const LogException& e) {
137 mexPrintf(e.what());
138 return false;
139 }
140}
141
142//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
143bool JSBSimInterface::LoadIC(SGPath ResetName)

Callers 1

mdlInitializeConditionsFunction · 0.80

Calls 3

RunICMethod · 0.80
LoadScriptMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected