|
From: <a_r...@gm...> - 2007-09-20 18:05:03
|
Hi!
Don't know if it's correct, but I guess with several props or rotors, the
p's for each prop or rotor have to be added up for the engine?
So:
=============
// Gew<FC>nschte Drehzahl und gew<FC>nschtes Moment
double M_P = xml->getDouble("battery.shaft.propeller.automagic.M_P");
double n_P = xml->getDouble("battery.shaft.propeller.automagic.n_P");
// Mit dem Wirkungsgrad des Getriebes ergibt sich die aufzubringende
// mechanische Leistung
double P_mech = M_P * 2 * M_PI * n_P / eta;
=============
should become something like:
=============
// Sum up all the propellers and rotors
double P_mech = 0;
SimpleXMLTransfer* shaft = xml->getChild("battery.shaft");
int nChilds = shaft->getChildCount();
for( int currentChildIndex = 0; currentChildIndex < nChilds; currentChildIndex++) {
SimpleXMLTransfer* currentChild = shaft->getChildAt( currentChildIndex);
std::string childName = currentChild->getName();
if( childName.compare( "propeller") == 0 || childName.compare( "rotor") == 0)
{
double M_P = currentChild->getDouble("automagic.M_P");
double n_P = currentChild->getDouble("automagic.n_P");
P_mech += M_P * 2 * M_PI * n_P / eta;
}
}
=============
The code above won't really work yet, because there's only one gearing for
the automagic props. Am I right, that we should add one gearing for each
prop and rotor?
Ciao,
Andreas
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
|