]> git.mxchange.org Git - flightgear.git/commitdiff
Maik JUSTUS: change /rotors/*/blade1_pos to /rotors/*/blade[0]/position-deg,
authormfranz <mfranz>
Sat, 28 Oct 2006 20:53:19 +0000 (20:53 +0000)
committermfranz <mfranz>
Sat, 28 Oct 2006 20:53:19 +0000 (20:53 +0000)
incidence to incidence-deg, and flap to flap-deg

src/FDM/YASim/Rotor.cpp
src/MultiPlayer/multiplaymgr.cxx

index e2611df90ec7f1e79b642089795f0385a5e8f348..ec6462a782c05379964b36da69d8e46cdb149e70 100644 (file)
@@ -300,9 +300,9 @@ int Rotor::getValueforFGSet(int j,char *text,float *f)
                             return 0;
                         }
                         int w=j%3;
-                        sprintf(text,"/rotors/%s/blade%i_%s",
-                            _name,b+1,
-                            w==0?"pos":(w==1?"flap":"incidence"));
+                        sprintf(text,"/rotors/%s/blade[%i]/%s",
+                            _name,b,
+                            w==0?"position-deg":(w==1?"flap-deg":"incidence-deg"));
                         *f=((Rotorpart*)getRotorpart(0))->getPhi()*180/pi
                             +360*b/_number_of_blades*(_ccw?1:-1);
                         if (*f>360) *f-=360;
@@ -894,6 +894,9 @@ void Rotor::compile()
         Math::unit3(directions[i],directions[i]);
     }
     Math::set3(directions[4],directions[0]);
+    // now directions[0] is perpendicular to the _normal.and has a length
+    // of 1. if _forward is already normalized and perpendicular to the 
+    // normal, directions[0] will be the same
     for (i=0;i<4;i++)
     {
         Math::mul3(_diameter*0.7,directions[i],_groundeffectpos[i]);
@@ -1048,7 +1051,7 @@ void Rotor::compile()
         &(torque[1]),&(lift[1])); //pitch b
     rps[0]->calculateAlpha(v_wind,rho_null,0,0,0,
         &(torque[3]),&(lift[3])); //pitch 0
-    SG_LOG(SG_GENERAL, SG_DEBUG,
+    SG_LOG(SG_GENERAL, SG_INFO,
         "Rotor: coefficients for airfoil:" << endl << setprecision(6)
         << " drag0: " << _dragcoef0*_number_of_parts/_number_of_blades/_c2
         << " drag1: " << _dragcoef1*_number_of_parts/_number_of_blades/_c2
index 53a6e1666bb21f8a5d754f68890af0f9c7668962..f3f26a8716c7cc5ef38bfdb7b994c478005c802f 100644 (file)
@@ -108,16 +108,16 @@ FGMultiplayMgr::sIdPropertyList[] = {
 
   {800, "rotors/main/rpm", SGPropertyNode::FLOAT},
   {801, "rotors/tail/rpm", SGPropertyNode::FLOAT},
-  {810, "rotors/main/blade1_pos",  SGPropertyNode::FLOAT},
-  {811, "rotors/main/blade2_pos",  SGPropertyNode::FLOAT},
-  {812, "rotors/main/blade3_pos",  SGPropertyNode::FLOAT},
-  {813, "rotors/main/blade4_pos",  SGPropertyNode::FLOAT},
-  {820, "rotors/main/blade1_flap",  SGPropertyNode::FLOAT},
-  {821, "rotors/main/blade2_flap",  SGPropertyNode::FLOAT},
-  {822, "rotors/main/blade3_flap",  SGPropertyNode::FLOAT},
-  {823, "rotors/main/blade4_flap",  SGPropertyNode::FLOAT},
-  {830, "rotors/tail/blade1_pos",  SGPropertyNode::FLOAT},
-  {831, "rotors/tail/blade2_pos",  SGPropertyNode::FLOAT},
+  {810, "rotors/main/blade[0]/position-deg",  SGPropertyNode::FLOAT},
+  {811, "rotors/main/blade[1]/position-deg",  SGPropertyNode::FLOAT},
+  {812, "rotors/main/blade[2]/position-deg",  SGPropertyNode::FLOAT},
+  {813, "rotors/main/blade[3]/position-deg",  SGPropertyNode::FLOAT},
+  {820, "rotors/main/blade[0]/flap-deg",  SGPropertyNode::FLOAT},
+  {821, "rotors/main/blade[1]/flap-deg",  SGPropertyNode::FLOAT},
+  {822, "rotors/main/blade[2]/flap-deg",  SGPropertyNode::FLOAT},
+  {823, "rotors/main/blade[3]/flap-deg",  SGPropertyNode::FLOAT},
+  {830, "rotors/tail/blade[0]/position-deg",  SGPropertyNode::FLOAT},
+  {831, "rotors/tail/blade[1]/position-deg",  SGPropertyNode::FLOAT},
 
   {1001, "controls/flight/slats",  SGPropertyNode::FLOAT},
   {1002, "controls/flight/speedbrake",  SGPropertyNode::FLOAT},