1
0
Fork 0

Set the RPM from the property tree with each iteration. This allows a

YASim prop model to start with the prop spinning.
This commit is contained in:
david 2003-10-18 20:07:46 +00:00
parent 202e79b4ad
commit d4b9ca371c

View file

@ -308,6 +308,8 @@ void FGFDM::startElement(const char* name, const XMLAttributes &atts)
void FGFDM::getExternalInput(float dt)
{
char buf[256];
// The control axes
ControlMap* cm = _airplane.getControlMap();
cm->reset();
@ -324,6 +326,17 @@ void FGFDM::getExternalInput(float dt)
WeightRec* wr = (WeightRec*)_weights.get(i);
_airplane.setWeight(wr->handle, LBS2KG * fgGetFloat(wr->prop));
}
for(i=0; i<_thrusters.size(); i++) {
EngRec* er = (EngRec*)_thrusters.get(i);
Thruster* t = er->eng;
if(t->getPropEngine()) {
PropEngine* p = t->getPropEngine();
sprintf(buf, "%s/rpm", er->prefix);
p->setOmega(fgGetFloat(buf) * RPM2RAD);
}
}
}
void FGFDM::setOutputProperties()