41 #include "FGFDMExec.h"
42 #include "input_output/FGPropertyManager.h"
43 #include "FGThruster.h"
44 #include "input_output/FGXMLElement.h"
62 SetTransformType(FGForce::tCustom);
73 element = thruster_element->
FindElement(
"location");
75 else cerr <<
fgred <<
" No thruster location found." <<
reset << endl;
77 SetLocation(location);
79 string property_name, base_property_name;
80 base_property_name = CreateIndexedPropertyName(
"propulsion/engine", EngineNum);
82 element = thruster_element->
FindElement(
"pointing");
89 mT(1,1) = pointing(1);
90 mT(2,1) = pointing(2);
91 mT(3,1) = pointing(3);
98 SetAnglesToBody(orientation);
99 property_name = base_property_name +
"/pitch-angle-rad";
100 PropertyManager->Tie( property_name.c_str(), (
FGForce *)
this, &FGForce::GetPitch, &FGForce::SetPitch);
101 property_name = base_property_name +
"/yaw-angle-rad";
102 PropertyManager->Tie( property_name.c_str(), (
FGForce *)
this, &FGForce::GetYaw, &FGForce::SetYaw);
107 property_name = base_property_name +
"/reverser-angle-rad";
108 PropertyManager->Tie( property_name.c_str(), (
FGThruster *)
this, &FGThruster::GetReverserAngle,
109 &FGThruster::SetReverserAngle);
128 void FGThruster::ResetToIC(
void)
137 string FGThruster::GetThrusterLabels(
int id,
const string& delimeter)
139 std::ostringstream buf;
141 buf << Name <<
" Thrust (engine " <<
id <<
" in lbs)";
148 string FGThruster::GetThrusterValues(
int id,
const string& delimeter)
150 std::ostringstream buf;
176 void FGThruster::Debug(
int from)
178 if (debug_lvl <= 0)
return;
185 if (debug_lvl & 2 ) {
186 if (from == 0) cout <<
"Instantiated: FGThruster" << endl;
187 if (from == 1) cout <<
"Destroyed: FGThruster" << endl;
189 if (debug_lvl & 4 ) {
191 if (debug_lvl & 8 ) {
193 if (debug_lvl & 16) {
195 if (debug_lvl & 64) {
Element * FindElement(const std::string &el="")
Searches for a specified element.
FGColumnVector3 FindElementTripletConvertTo(const std::string &target_units)
Composes a 3-element column vector for the supplied location or orientation.
std::string GetAttributeValue(const std::string &key)
Retrieves an attribute.
Element * GetParent(void)
Returns a pointer to the parent of an element.
const std::string & GetName(void) const
Retrieves the element name.
This class implements a 3 element column vector.
Encapsulates the JSBSim simulation executive.
std::shared_ptr< FGPropertyManager > GetPropertyManager(void) const
Returns a pointer to the property manager object.
Utility class that aids in the conversion of forces between coordinate systems and calculation of mom...
void SetActingLocation(double x, double y, double z)
Acting point of application.
static char fgred[6]
red text
static char reset[5]
resets text properties
void InitMatrix(void)
Initialize the matrix.
Base class for specific thrusting devices such as propellers, nozzles, etc.
virtual ~FGThruster()
Destructor.