]> git.mxchange.org Git - flightgear.git/blob - src/FDM/YASim/Rotorpart.hpp
MSVC (warning) fixes.
[flightgear.git] / src / FDM / YASim / Rotorpart.hpp
1 #ifndef _ROTORPART_HPP
2 #define _ROTORPART_HPP
3
4 namespace yasim {
5
6 class Rotorpart
7 {
8 public:
9     Rotorpart();
10
11     // Position of this surface in local coords
12     void setPosition(float* p);
13     void getPosition(float* out);
14
15
16     void setPositionForceAttac(float* p);
17     void getPositionForceAttac(float* out);
18
19     void setNormal(float* p);
20     void getNormal(float* out);
21
22     void setMaxPitchForce(float force);
23
24     void setCollective(float pos);
25
26     void setCyclic(float pos);
27
28     void setSpeed(float* p);
29     void setDirectionofZentipetalforce(float* p);
30     void setZentipetalForce(float f);
31     void setMaxpitch(float f);
32     void setMinpitch(float f);
33     void setMaxcyclic(float f);
34     void setMincyclic(float f);
35     void setDelta3(float f);
36     void setDynamic(float f);
37     void setTranslift(float f);
38     void setC2(float f);
39     void setZentForce(float f);
40     void setRelLenHinge(float f);
41     void setRelamp(float f);
42
43     float getAlpha(int i);
44     float getrealAlpha(void);
45     char* getAlphaoutput(int i);
46     void setAlphaoutput(char *text,int i);
47
48     void inititeration(float dt,float *rot);
49     
50     float getWeight(void);
51     void setWeight(float value);
52
53
54
55
56
57
58     void calcForce(float* v, float rho, float* forceOut, float* torqueOut);
59     void setlastnextrp(Rotorpart*lastrp,Rotorpart*nextrp,Rotorpart *oppositerp);
60     void setTorque(float torque_max_force,float torque_no_force);
61     void setOmega(float value);
62     void setOmegaN(float value);
63     float getIncidence();
64     float getPhi();
65     void setAlphamin(float f);
66     void setAlphamax(float f);
67     void setAlpha0(float f);
68     void setAlpha0factor(float f);
69     void setLen(float value);
70
71
72 private:
73     void strncpy(char *dest,const char *src,int maxlen);
74     Rotorpart *_lastrp,*_nextrp,*_oppositerp;
75
76     float _dt;
77     float _pos[3];    // position in local coords
78     float _posforceattac[3];    // position in local coords
79     float _normal[3]; //direcetion of the rotation axis
80     float _torque_max_force;
81     float _torque_no_force;
82     float _speed[3];
83     float _directionofzentipetalforce[3];
84     float _zentipetalforce;
85     float _maxpitch;
86     float _minpitch;
87     float _maxpitchforce;
88     float _maxcyclic;
89     float _mincyclic;
90     float _cyclic;
91     float _collective;
92     float _delta3;
93     float _dynamic;
94     float _translift;
95     float _c2;
96     float _mass;
97     float _alpha;
98     float _alphaalt;
99     float _alphamin,_alphamax,_alpha0,_alpha0factor;
100     float _rellenhinge;
101     float _relamp;
102     float _omega,_omegan;
103     float _phi;
104     float _len;
105     float _incidence;
106
107
108
109           
110     char _alphaoutputbuf[2][256];
111     int _alpha2type;
112
113 };
114
115 }; // namespace yasim
116 #endif // _ROTORPART_HPP