1 #ifndef _ROTORBLADE_HPP
2 #define _ROTORBLADE_HPP
11 // Position of this surface in local coords
12 void setPosition(float* p);
13 void getPosition(float* out);
15 void setPhi(float value);
17 void setPositionForceAttac(float* p);
18 void getPositionForceAttac(float* out);
20 void setNormal(float* p);
21 void setFront(float* p);
22 void setRight(float* p);
23 void getNormal(float* out);
25 void setMaxPitchForce(float force);
27 void setCollective(float pos);
29 void setCyclicele(float pos);
30 void setCyclicail(float pos);
32 void setOmega(float value);
33 void setOmegaN(float value);
34 void setLen(float value);
35 void setLenHinge(float value);
36 void setLforceattac(float value);
38 void setSpeed(float p);
39 void setDirectionofZentipetalforce(float* p);
40 void setZentipetalForce(float f);
41 void setMaxpitch(float f);
42 void setDelta3(float f);
43 void setDelta(float f);
44 void setDeltaPhi(float f);
45 void setDynamic(float f);
46 void setTranslift(float f);
48 void setStepspersecond(float steps);
49 void setZentForce(float f);
51 float getAlpha(int i);
52 float getrealAlpha(void);
53 char* getAlphaoutput(int i);
54 void setAlphaoutput(char *text,int i);
56 void inititeration(float dt,float *rot);
58 float getWeight(void);
59 void setWeight(float value);
61 float getFlapatPos(int k);
69 // local -> Rotorblade coords
70 //void setOrientation(float* o);
73 void calcForce(float* v, float rho, float* forceOut, float* torqueOut);
74 void setlastnextrp(Rotorblade*lastrp,Rotorblade*nextrp,Rotorblade *oppositerp);
75 void setTorque(float torque_max_force,float torque_no_force);
76 void calcFrontRight();
78 void setAlpha0(float f);
79 void setAlphamin(float f);
80 void setAlphamax(float f);
81 void setAlpha0factor(float f);
82 void setTeeterdamp(float f);
83 void setMaxteeterdamp(float f);
84 void setRelLenTeeterHinge(float value);
87 void strncpy(char *dest,const char *src,int maxlen);
88 Rotorblade *_lastrp,*_nextrp,*_oppositerp;
91 float _phi,_omega,_omegan;
98 float _pos[3]; // position in local coords
99 float _posforceattac[3]; // position in local coords
100 float _normal[3]; //direcetion of the rotation axis
101 float _front[3],_right[3];
102 float _lright[3],_lfront[3];
103 float _torque_max_force;
104 float _torque_no_force;
106 float _directionofzentipetalforce[3];
107 float _zentipetalforce;
109 float _maxpitchforce;
115 float _flapatpos[4];//flapangle at 0, 90, 180 and 270 degree, for graphics
124 float _alphamin,_alphamax,_alpha0,_alpha0factor;
125 float _stepspersecond;
126 float _teeter,_ddtteeter;
127 float _teeterdamp,_maxteeterdamp;
128 float _rellenteeterhinge;
133 char _alphaoutputbuf[2][256];
136 //float _orient[9]; // local->surface orthonormal matrix
138 bool _calcforcesdone;
139 float _oldt[3],_oldf[3];
145 }; // namespace yasim
146 #endif // _ROTORBLADE_HPP