]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Rotorpart.hpp
latest updates from JSBSim
[flightgear.git] / src / FDM / YASim / Rotorpart.hpp
index 87dee27c5a721de5d05f0b1053d494b2fa13ffb4..8d68fa98fbe4969f339096d7cd86af7bb66fa2fc 100644 (file)
@@ -1,10 +1,12 @@
 #ifndef _ROTORPART_HPP
 #define _ROTORPART_HPP
+#include <iosfwd>
 
 namespace yasim {
     class Rotor;
     class Rotorpart
     {
+        friend std::ostream &  operator<<(std::ostream & out, const Rotorpart& rp);
     private:
         float _dt;
         float _last_torque[3];
@@ -54,10 +56,11 @@ namespace yasim {
         float calculateAlpha(float* v, float rho, float incidence, float cyc,
             float alphaalt, float *torque,float *returnlift=0);
         void setlastnextrp(Rotorpart*lastrp,Rotorpart*nextrp,
-            Rotorpart *oppositerp);
+            Rotorpart *oppositerp,Rotorpart*last90rp,Rotorpart*next90rp);
         void setTorque(float torque_max_force,float torque_no_force);
         void setOmega(float value);
         void setOmegaN(float value);
+        void setPhi(float value);
         void setDdtOmega(float value);
         float getIncidence();
         float getPhi();
@@ -66,13 +69,17 @@ namespace yasim {
         void setAlpha0(float f);
         void setAlpha0factor(float f);
         void setLen(float value);
-        void setParameter(char *parametername, float value);
+        void setParameter(const char *parametername, float value);
         void setRotor(Rotor *rotor);
         void setTorqueOfInertia(float toi);
+        void writeInfo(std::ostringstream &buffer);
+        void setSharedFlapHinge(bool s);
+        void setDirection(float direction);
+        float getAlphaAlt() {return _alphaalt;}
 
     private:
         void strncpy(char *dest,const char *src,int maxlen);
-        Rotorpart *_lastrp,*_nextrp,*_oppositerp;
+        Rotorpart *_lastrp,*_nextrp,*_oppositerp,*_last90rp,*_next90rp;
         Rotor *_rotor;
 
         float _pos[3];    // position in local coords
@@ -82,13 +89,9 @@ namespace yasim {
         float _torque_no_force;
         float _speed[3];
         float _direction_of_movement[3];
-        float _directionofzentipetalforce[3];
+        float _directionofcentripetalforce[3];
         float _directionofrotorpart[3];
-        float _zentipetalforce;
-        float _maxpitch;
-        float _minpitch;
-        float _maxcyclic;
-        float _mincyclic;
+        float _centripetalforce;
         float _cyclic;
         float _collective;
         float _delta3;
@@ -109,14 +112,17 @@ namespace yasim {
         int _number_of_segments;
         float _rel_len_where_incidence_is_measured;
         float _rel_len_blade_start;
-        float _rel_len_blade_measured;
         float _diameter;
         float _torque_of_inertia;
         float _torque; 
         // total torque of rotor (scalar) for calculating new rotor rpm
         char _alphaoutputbuf[2][256];
         int _alpha2type;
+        float _rotor_correction_factor;
+        bool _shared_flap_hinge;
+        float _direction;
+        float _balance;
     };
-
+    std::ostream &  operator<<(std::ostream & out, const Rotorpart& rp);
 }; // namespace yasim
 #endif // _ROTORPART_HPP