INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <iostream>
#include <sstream>
#include "FGThruster.h"
+#include "input_output/FGXMLElement.h"
+
+using namespace std;
namespace JSBSim {
-static const char *IdSrc = "$Id$";
+static const char *IdSrc = "$Id: FGThruster.cpp,v 1.14 2011/03/10 01:35:25 dpculp Exp $";
static const char *IdHdr = ID_THRUSTER;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GearRatio = 1.0;
ReverserAngle = 0.0;
+ ClutchCtrlNorm = 1.0;
EngineNum = num;
PropertyManager = FDMExec->GetPropertyManager();
element = thruster_element->FindElement("location");
if (element) location = element->FindElementTripletConvertTo("IN");
- else cerr << "No thruster location found." << endl;
+ else cerr << fgred << " No thruster location found." << reset << endl;
element = thruster_element->FindElement("orient");
if (element) orientation = element->FindElementTripletConvertTo("RAD");
- else cerr << "No thruster orientation found." << endl;
+ else cerr << " No thruster orientation found." << endl;
SetLocation(location);
SetAnglesToBody(orientation);
&FGThruster::SetReverserAngle);
}
+ if (el->GetName() == "rotor") // At this time only a rotor can have a clutch.
+ {
+ property_name = base_property_name + "/clutch-ctrl-norm";
+ PropertyManager->Tie( property_name.c_str(), (FGThruster *)this, &FGThruster::GetClutchCtrl,
+ &FGThruster::SetClutchCtrl);
+ }
+
Debug(0);
}