9 friend std::ostream & operator<<(std::ostream & out, const Rotorpart& rp);
12 float _last_torque[3];
17 // Position of this surface in local coords
18 void setPosition(float* p);
19 void getPosition(float* out);
20 void setCompiled() {_compiled=1;}
21 float getDt() {return _dt;}
22 void setPositionForceAttac(float* p);
23 void getPositionForceAttac(float* out);
24 void setNormal(float* p);
25 void getNormal(float* out);
26 void setCollective(float pos);
27 void setCyclic(float pos);
28 void getLastTorque(float *t)
29 {for (int i=0;i<3;i++) t[i]=_last_torque[i];}
30 void getAccelTorque(float relaccel,float *t);
31 void setSpeed(float* p);
32 void setDirectionofZentipetalforce(float* p);
33 void setDirectionofRotorPart(float* p);
34 void setZentipetalForce(float f);
35 void setMaxpitch(float f);
36 void setMinpitch(float f);
37 void setMaxcyclic(float f);
38 void setMincyclic(float f);
39 void setDelta3(float f);
40 void setDynamic(float f);
41 void setTranslift(float f);
43 void setZentForce(float f);
44 void setRelLenHinge(float f);
45 void setRelamp(float f);
46 void setDiameter(float f);
47 float getAlpha(int i);
48 float getrealAlpha(void);
49 char* getAlphaoutput(int i);
50 void setAlphaoutput(char *text,int i);
51 void inititeration(float dt,float *rot);
52 float getWeight(void);
53 void setWeight(float value);
54 void calcForce(float* v, float rho, float* forceOut, float* torqueOut,
55 float* torque_scalar);
56 float calculateAlpha(float* v, float rho, float incidence, float cyc,
57 float alphaalt, float *torque,float *returnlift=0);
58 void setlastnextrp(Rotorpart*lastrp,Rotorpart*nextrp,
59 Rotorpart *oppositerp,Rotorpart*last90rp,Rotorpart*next90rp);
60 void setTorque(float torque_max_force,float torque_no_force);
61 void setOmega(float value);
62 void setOmegaN(float value);
63 void setPhi(float value);
64 void setDdtOmega(float value);
67 void setAlphamin(float f);
68 void setAlphamax(float f);
69 void setAlpha0(float f);
70 void setAlpha0factor(float f);
71 void setLen(float value);
72 void setParameter(const char *parametername, float value);
73 void setRotor(Rotor *rotor);
74 void setTorqueOfInertia(float toi);
75 void writeInfo(std::ostringstream &buffer);
76 void setSharedFlapHinge(bool s);
77 void setDirection(float direction);
78 float getAlphaAlt() {return _alphaalt;}
81 void strncpy(char *dest,const char *src,int maxlen);
82 Rotorpart *_lastrp,*_nextrp,*_oppositerp,*_last90rp,*_next90rp;
85 float _pos[3]; // position in local coords
86 float _posforceattac[3]; // position in local coords
87 float _normal[3]; //direcetion of the rotation axis
88 float _torque_max_force;
89 float _torque_no_force;
91 float _direction_of_movement[3];
92 float _directionofcentripetalforce[3];
93 float _directionofrotorpart[3];
94 float _centripetalforce;
104 float _alphamin,_alphamax,_alpha0,_alpha0factor;
107 float _omega,_omegan,_ddt_omega;
111 float _twist; //outer incidence = inner inner incidence + _twist
112 int _number_of_segments;
113 float _rel_len_where_incidence_is_measured;
114 float _rel_len_blade_start;
116 float _torque_of_inertia;
118 // total torque of rotor (scalar) for calculating new rotor rpm
119 char _alphaoutputbuf[2][256];
121 float _rotor_correction_factor;
122 bool _shared_flap_hinge;
126 std::ostream & operator<<(std::ostream & out, const Rotorpart& rp);
127 }; // namespace yasim
128 #endif // _ROTORPART_HPP