Maik: add a downwashfactor tunable
This commit is contained in:
parent
a5548068dc
commit
0368accc6d
3 changed files with 10 additions and 1 deletions
|
@ -728,6 +728,7 @@ Rotor* FGFDM::parseRotor(XMLAttributes* a, const char* type)
|
|||
w->setTiltCenterX(attrf(a,"tiltcenterx",0.0));
|
||||
w->setTiltCenterY(attrf(a,"tiltcentery",0.0));
|
||||
w->setTiltCenterZ(attrf(a,"tiltcenterz",0.0));
|
||||
w->setDownwashFactor(attrf(a, "downwashfactor", 1));
|
||||
if(attrb(a,"ccw"))
|
||||
w->setCcw(1);
|
||||
if(attrb(a,"sharedflaphinge"))
|
||||
|
|
|
@ -150,6 +150,7 @@ Rotor::Rotor()
|
|||
_max_tilt_yaw=0;
|
||||
_max_tilt_pitch=0;
|
||||
_max_tilt_roll=0;
|
||||
_downwash_factor=1;
|
||||
}
|
||||
|
||||
Rotor::~Rotor()
|
||||
|
@ -652,6 +653,11 @@ void Rotor::setRelLenHinge(float value)
|
|||
_rel_len_hinge=value;
|
||||
}
|
||||
|
||||
void Rotor::setDownwashFactor(float value)
|
||||
{
|
||||
_downwash_factor=value;
|
||||
}
|
||||
|
||||
void Rotor::setAlphaoutput(int i, const char *text)
|
||||
{
|
||||
strncpy(_alphaoutput[i],text,255);
|
||||
|
@ -1019,7 +1025,7 @@ void Rotor::getDownWash(float *pos, float *v_heli, float *downwash)
|
|||
//at dist = rotor radius it is assumed to be 1/e * v1 + (1-1/e)* v2
|
||||
|
||||
float v = g * v1 + (1-g) * v2;
|
||||
Math::mul3(-v,_normal_with_yaw_roll,downwash);
|
||||
Math::mul3(-v*_downwash_factor,_normal_with_yaw_roll,downwash);
|
||||
//the downwash is calculated in the opposite direction of the normal
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ private:
|
|||
float _old_tilt_roll;
|
||||
float _old_tilt_pitch;
|
||||
float _old_tilt_yaw;
|
||||
float _downwash_factor;
|
||||
|
||||
public:
|
||||
Rotor();
|
||||
|
@ -107,6 +108,7 @@ public:
|
|||
void calcLiftFactor(float* v, float rho, State *s);
|
||||
void getDownWash(float *pos, float * v_heli, float *downwash);
|
||||
int getNumberOfBlades(){return _number_of_blades;}
|
||||
void setDownwashFactor(float value);
|
||||
|
||||
// Query the list of Rotorpart objects
|
||||
int numRotorparts();
|
||||
|
|
Loading…
Add table
Reference in a new issue