namespace JSBSim {
-static const char *IdSrc = "$Id: FGEngine.cpp,v 1.46 2011/08/17 23:56:01 jberndt Exp $";
+static const char *IdSrc = "$Id: FGEngine.cpp,v 1.50 2012/03/17 20:46:29 jentron Exp $";
static const char *IdHdr = ID_ENGINE;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
FGEngine::FGEngine(FGFDMExec* exec, Element* engine_element, int engine_number, struct Inputs& input)
- : EngineNumber(engine_number), in(input)
+ : in(input), EngineNumber(engine_number)
{
Element* local_element;
FGColumnVector3 location, orientation;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGEngine::SetPlacement(FGColumnVector3& location, FGColumnVector3& orientation)
+void FGEngine::SetPlacement(const FGColumnVector3& location,
+ const FGColumnVector3& orientation)
{
X = location(eX);
Y = location(eY);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- FGColumnVector3& FGEngine::GetBodyForces(void)
+const FGColumnVector3& FGEngine::GetBodyForces(void)
{
return Thruster->GetBodyForces();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-FGColumnVector3& FGEngine::GetMoments(void)
+const FGColumnVector3& FGEngine::GetMoments(void)
{
return Thruster->GetMoments();
}
thruster_filename = thruster_element->GetAttributeValue("file");
if ( !thruster_filename.empty()) {
- thruster_fullpathname = fullpath + thruster_filename + ".xml";
+ thruster_fullpathname = localpath + thruster_filename + ".xml";
thruster_file.open(thruster_fullpathname.c_str());
if ( !thruster_file.is_open()) {
- thruster_fullpathname = localpath + thruster_filename + ".xml";
+ thruster_fullpathname = fullpath + thruster_filename + ".xml";
thruster_file.open(thruster_fullpathname.c_str());
if ( !thruster_file.is_open()) {
cerr << "Could not open thruster file: " << thruster_filename << ".xml" << endl;