41 #include "input_output/FGXMLElement.h" 48 IDENT(IdSrc,
"$Id: FGSummer.cpp,v 1.10 2014/01/13 10:46:10 ehofman Exp $");
49 IDENT(IdHdr,ID_SUMMER);
61 FGFCSComponent::bind();
81 for (idx=0; idx<InputNodes.size(); idx++) {
82 Output += InputNodes[idx]->getDoubleValue() * InputSigns[idx];
88 if (IsOutput) SetOutput();
112 void FGSummer::Debug(
int from)
114 if (debug_lvl <= 0)
return;
118 cout <<
" INPUTS: " << endl;
119 for (
unsigned i=0;i<InputNodes.size();i++) {
120 if (InputSigns[i] < 0)
121 cout <<
" -" << InputNames[i] << endl;
123 cout <<
" " << InputNames[i] << endl;
125 if (Bias != 0.0) cout <<
" Bias: " << Bias << endl;
127 for (
unsigned int i=0; i<OutputNodes.size(); i++)
128 cout <<
" OUTPUT: " << OutputNodes[i]->getName() << endl;
132 if (debug_lvl & 2 ) {
133 if (from == 0) cout <<
"Instantiated: FGSummer" << endl;
134 if (from == 1) cout <<
"Destroyed: FGSummer" << endl;
136 if (debug_lvl & 4 ) {
138 if (debug_lvl & 8 ) {
140 if (debug_lvl & 16) {
142 if (debug_lvl & 64) {
144 cout << IdSrc << endl;
145 cout << IdHdr << endl;
Element * FindElement(const std::string &el="")
Searches for a specified element.
double FindElementValueAsNumber(const std::string &el="")
Searches for the named element and returns the data belonging to it as a number.
bool Run(void)
The execution method for this FCS component.
Encapsulates the Flight Control System (FCS) functionality.
Base class for JSBSim Flight Control System Components.