From 97a0511ce067448d3117ee7623460ad52d2a8a86 Mon Sep 17 00:00:00 2001 From: Henning Stahlke Date: Thu, 2 Feb 2017 09:55:45 +0100 Subject: [PATCH] YASim method name clarification in class Surface --- src/FDM/YASim/Surface.cpp | 12 ++++++------ src/FDM/YASim/Surface.hpp | 6 +++--- src/FDM/YASim/Wing.cpp | 14 +++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/FDM/YASim/Surface.cpp b/src/FDM/YASim/Surface.cpp index 88e4a07a8..dc1a4200a 100644 --- a/src/FDM/YASim/Surface.cpp +++ b/src/FDM/YASim/Surface.cpp @@ -134,7 +134,7 @@ void Surface::setSpoilerParams(float liftPenalty, float dragPenalty) _spoilerDrag = dragPenalty; } -void Surface::setFlap(float pos) +void Surface::setFlapPos(float pos) { _flapPos = pos; } @@ -150,12 +150,12 @@ double Surface::getFlapEffectiveness() } -void Surface::setSlat(float pos) +void Surface::setSlatPos(float pos) { _slatPos = pos; } -void Surface::setSpoiler(float pos) +void Surface::setSpoilerPos(float pos) { _spoilerPos = pos; } @@ -257,9 +257,9 @@ void Surface::test() float rho = Atmosphere::getStdDensity(0); float spd = 30; - setFlap(0); - setSlat(0); - setSpoiler(0); + setFlapPos(0); + setSlatPos(0); + setSpoilerPos(0); for(float angle = -90; angle<90; angle += 0.01) { float rad = angle * DEG2RAD; diff --git a/src/FDM/YASim/Surface.hpp b/src/FDM/YASim/Surface.hpp index 3679ab4ce..660efb2f9 100644 --- a/src/FDM/YASim/Surface.hpp +++ b/src/FDM/YASim/Surface.hpp @@ -32,9 +32,9 @@ public: // Positions for the controls, in the range [0:1]. [-1:1] for // flaps, with positive meaning "force goes towards positive Z" - void setFlap(float pos); - void setSlat(float pos); - void setSpoiler(float pos); + void setFlapPos(float pos); + void setSlatPos(float pos); + void setSpoilerPos(float pos); // Modifier for flap lift coefficient, useful for simulating flap blowing etc. void setFlapEffectiveness(float effectiveness); diff --git a/src/FDM/YASim/Wing.cpp b/src/FDM/YASim/Wing.cpp index 3b8101f4d..898a96cba 100644 --- a/src/FDM/YASim/Wing.cpp +++ b/src/FDM/YASim/Wing.cpp @@ -173,8 +173,8 @@ void Wing::setFlap0Pos(float lval, float rval) rval = Math::clamp(rval, -1, 1); int i; for(i=0; i<_flap0Surfs.size(); i++) { - ((Surface*)_flap0Surfs.get(i))->setFlap(lval); - if(_mirror) ((Surface*)_flap0Surfs.get(++i))->setFlap(rval); + ((Surface*)_flap0Surfs.get(i))->setFlapPos(lval); + if(_mirror) ((Surface*)_flap0Surfs.get(++i))->setFlapPos(rval); } } @@ -194,8 +194,8 @@ void Wing::setFlap1Pos(float lval, float rval) rval = Math::clamp(rval, -1, 1); int i; for(i=0; i<_flap1Surfs.size(); i++) { - ((Surface*)_flap1Surfs.get(i))->setFlap(lval); - if(_mirror) ((Surface*)_flap1Surfs.get(++i))->setFlap(rval); + ((Surface*)_flap1Surfs.get(i))->setFlapPos(lval); + if(_mirror) ((Surface*)_flap1Surfs.get(++i))->setFlapPos(rval); } } @@ -215,8 +215,8 @@ void Wing::setSpoilerPos(float lval, float rval) rval = Math::clamp(rval, 0, 1); int i; for(i=0; i<_spoilerSurfs.size(); i++) { - ((Surface*)_spoilerSurfs.get(i))->setSpoiler(lval); - if(_mirror) ((Surface*)_spoilerSurfs.get(++i))->setSpoiler(rval); + ((Surface*)_spoilerSurfs.get(i))->setSpoilerPos(lval); + if(_mirror) ((Surface*)_spoilerSurfs.get(++i))->setSpoilerPos(rval); } } @@ -225,7 +225,7 @@ void Wing::setSlatPos(float val) val = Math::clamp(val, 0, 1); int i; for(i=0; i<_slatSurfs.size(); i++) - ((Surface*)_slatSurfs.get(i))->setSlat(val); + ((Surface*)_slatSurfs.get(i))->setSlatPos(val); } float Wing::getGroundEffect(float* posOut)