Maik JUSTUS: "further (final?) modifications for the jet ranger rotor"
This commit is contained in:
parent
b727604591
commit
5bbd649b5a
3 changed files with 10 additions and 4 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "Math.hpp"
|
||||
#include "Surface.hpp"
|
||||
#include "Rotorpart.hpp"
|
||||
#include "Glue.hpp"
|
||||
#include "Ground.hpp"
|
||||
#include "Rotor.hpp"
|
||||
|
||||
|
@ -695,6 +696,9 @@ void Rotor::calcLiftFactor(float* v, float rho, State *s)
|
|||
*(_translift_maxfactor-1)+1)/_translift_maxfactor;
|
||||
|
||||
_lift_factor = _f_ge*_f_tl*_f_vs;
|
||||
|
||||
//store the gravity direction
|
||||
Glue::geodUp(s->pos, _grav_direction);
|
||||
}
|
||||
|
||||
void Rotor::findGroundEffectAltitude(Ground * ground_cb,State *s)
|
||||
|
|
|
@ -113,9 +113,9 @@ public:
|
|||
float getOverallStall()
|
||||
{if (_stall_v2sum !=0 ) return _stall_sum/_stall_v2sum; else return 0;}
|
||||
float getAirfoilIncidenceNoLift() {return _airfoil_incidence_no_lift;}
|
||||
|
||||
Vector _rotorparts;
|
||||
void findGroundEffectAltitude(Ground * ground_cb,State *s);
|
||||
float *getGravDirection() {return _grav_direction;}
|
||||
void writeInfo();
|
||||
void setSharedFlapHinge(bool s);
|
||||
|
||||
|
@ -201,6 +201,7 @@ private:
|
|||
float _rotor_correction_factor;
|
||||
float _phi;
|
||||
bool _shared_flap_hinge;
|
||||
float _grav_direction[3];
|
||||
};
|
||||
std::ostream & operator<<(std::ostream & out, /*const*/ Rotor& r);
|
||||
|
||||
|
|
|
@ -361,7 +361,8 @@ float Rotorpart::calculateAlpha(float* v_rel_air, float rho,
|
|||
int i,n;
|
||||
for (i=0;i<3;i++)
|
||||
moment[i]=0;
|
||||
lift_moment=-_mass*_len*9.81; //*cos yaw * cos roll
|
||||
float relgrav = Math::dot3(_normal,_rotor->getGravDirection());
|
||||
lift_moment=-_mass*_len*9.81*relgrav;
|
||||
*torque=0;//
|
||||
if((_nextrp==NULL)||(_lastrp==NULL)||(_rotor==NULL))
|
||||
return 0.0;//not initialized. Can happen during startupt of flightgear
|
||||
|
@ -453,12 +454,12 @@ float Rotorpart::calculateAlpha(float* v_rel_air, float rho,
|
|||
{
|
||||
float div=0;
|
||||
if (Math::abs(_alphaalt) >1e-6)
|
||||
div=(_centripetalforce * _len - _mass * _len * 9.81 /_alpha0*(_alphaalt+_oppositerp->getAlphaAlt())/(2.0*_alphaalt));
|
||||
div=(_centripetalforce * _len - _mass * _len * 9.81 * relgrav /_alpha0*(_alphaalt+_oppositerp->getAlphaAlt())/(2.0*_alphaalt));
|
||||
if (Math::abs(div)>1e-6)
|
||||
alpha=lift_moment/div;
|
||||
else if(Math::abs(_alphaalt+_oppositerp->getAlphaAlt())>1e-6)
|
||||
{
|
||||
float div=(_centripetalforce * _len - _mass * _len * 9.81 *0.5)*(_alphaalt+_oppositerp->getAlphaAlt());
|
||||
float div=(_centripetalforce * _len - _mass * _len * 9.81 *0.5 * relgrav)*(_alphaalt+_oppositerp->getAlphaAlt());
|
||||
if (Math::abs(div)>1e-6)
|
||||
alpha=_oppositerp->getAlphaAlt()+lift_moment/div*_alphaalt;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue