1
0
Fork 0

YASim method name clarification Wind::setFlap0

This commit is contained in:
Henning Stahlke 2017-02-02 09:40:25 +01:00
parent ce753c0382
commit e69f6ba9ab
4 changed files with 6 additions and 6 deletions

View file

@ -211,7 +211,7 @@ void ControlMap::applyControls(float dt)
case LACCEL: ((Launchbar*)obj)->setAcceleration(lval); break; case LACCEL: ((Launchbar*)obj)->setAcceleration(lval); break;
case CASTERING:((Gear*)obj)->setCastering(lval != 0); break; case CASTERING:((Gear*)obj)->setCastering(lval != 0); break;
case SLAT: ((Wing*)obj)->setSlat(lval); break; case SLAT: ((Wing*)obj)->setSlat(lval); break;
case FLAP0: ((Wing*)obj)->setFlap0(lval, rval); break; case FLAP0: ((Wing*)obj)->setFlap0Pos(lval, rval); break;
case FLAP0EFFECTIVENESS: ((Wing*)obj)->setFlap0Effectiveness(lval); break; case FLAP0EFFECTIVENESS: ((Wing*)obj)->setFlap0Effectiveness(lval); break;
case FLAP1: ((Wing*)obj)->setFlap1(lval, rval); break; case FLAP1: ((Wing*)obj)->setFlap1(lval, rval); break;
case FLAP1EFFECTIVENESS: ((Wing*)obj)->setFlap1Effectiveness(lval); break; case FLAP1EFFECTIVENESS: ((Wing*)obj)->setFlap1Effectiveness(lval); break;

View file

@ -482,7 +482,7 @@ void FGFDM::startElement(const char* name, const XMLAttributes &atts)
w->setStallWidth(attrf(a, "width", 2) * DEG2RAD); w->setStallWidth(attrf(a, "width", 2) * DEG2RAD);
w->setStallPeak(attrf(a, "peak", 1.5)); w->setStallPeak(attrf(a, "peak", 1.5));
} else if(eq(name, "flap0")) { } else if(eq(name, "flap0")) {
((Wing*)_currObj)->setFlap0(attrf(a, "start"), attrf(a, "end"), ((Wing*)_currObj)->setFlap0Params(attrf(a, "start"), attrf(a, "end"),
attrf(a, "lift"), attrf(a, "drag")); attrf(a, "lift"), attrf(a, "drag"));
} else if(eq(name, "flap1")) { } else if(eq(name, "flap1")) {
((Wing*)_currObj)->setFlap1(attrf(a, "start"), attrf(a, "end"), ((Wing*)_currObj)->setFlap1(attrf(a, "start"), attrf(a, "end"),

View file

@ -135,7 +135,7 @@ void Wing::setIncidence(float incidence)
((SurfRec*)_surfs.get(i))->surface->setIncidence(incidence); ((SurfRec*)_surfs.get(i))->surface->setIncidence(incidence);
} }
void Wing::setFlap0(float start, float end, float lift, float drag) void Wing::setFlap0Params(float start, float end, float lift, float drag)
{ {
_flap0Start = start; _flap0Start = start;
_flap0End = end; _flap0End = end;
@ -167,7 +167,7 @@ void Wing::setSpoilerParams(float start, float end, float lift, float drag)
_spoilerDrag = drag; _spoilerDrag = drag;
} }
void Wing::setFlap0(float lval, float rval) void Wing::setFlap0Pos(float lval, float rval)
{ {
lval = Math::clamp(lval, -1, 1); lval = Math::clamp(lval, -1, 1);
rval = Math::clamp(rval, -1, 1); rval = Math::clamp(rval, -1, 1);

View file

@ -33,13 +33,13 @@ public:
void setIncidence(float incidence); void setIncidence(float incidence);
void setInducedDrag(float drag) { _inducedDrag = drag; } void setInducedDrag(float drag) { _inducedDrag = drag; }
void setFlap0(float start, float end, float lift, float drag); void setFlap0Params(float start, float end, float lift, float drag);
void setFlap1(float start, float end, float lift, float drag); void setFlap1(float start, float end, float lift, float drag);
void setSpoilerParams(float start, float end, float lift, float drag); void setSpoilerParams(float start, float end, float lift, float drag);
void setSlat(float start, float end, float aoa, float drag); void setSlat(float start, float end, float aoa, float drag);
// Set the control axes for the sub-surfaces // Set the control axes for the sub-surfaces
void setFlap0(float lval, float rval); void setFlap0Pos(float lval, float rval);
void setFlap1(float lval, float rval); void setFlap1(float lval, float rval);
void setSpoilerPos(float lval, float rval); void setSpoilerPos(float lval, float rval);
void setSlat(float val); void setSlat(float val);