On Friday 10 February 2012 04:08:32 Torsten Dreyer wrote:
> Hi all,
>
> for our release of version 2.6.0 next week, we have a few open items on
> our checklist and I am kindly asking for support to get them done:
>
> 1. How are our release candidates performing? Are there any release
> blocking bugs that should be taken care of?

I found and fixed a potential NaN and Segfault in the JSBSim propeller code
yesterday. It could be considered a blocking bug for 2.6 to me.

The property /fdm/jsbsim/propulsion/engine/prop-induced-velocity_fps
gives wrong answers, and can become NaN under certain conditions. When thrust is
negative and forward velocity is small we can take the square root of a negative
number. This could occur, for example, when using reverse thrusters on landing.
The value comes out much too high when alpha is near 180, such as taxing with a 
tail wind.


Thanks,

Ron



http://jsbsim.cvs.sourceforge.net/viewvc/jsbsim/JSBSim/src/models/propulsion/FGPropeller.cpp?r1=1.42&r2=1.43&view=patch


--- FGPropeller.cpp     2011/12/22 22:13:59     1.42
+++ FGPropeller.cpp     2012/02/11 15:14:27     1.43
@@ -228,8 +228,16 @@
   // Induced velocity in the propeller disk area. This formula is obtained
   // from momentum theory - see B. W. McCormick, "Aerodynamics, Aeronautics,
   // and Flight Mechanics" 1st edition, eqn. 6.15 (propeller analysis chapter).
-  Vinduced = 0.5 * (-Vel + sqrt(Vel*Vel + 2.0*Thrust/(rho*Area)));
-
+  // Vinduced = 0.5 * (-Vel + sqrt(Vel*Vel + 2.0*Thrust/(rho*Area)))
+  // Since Thrust and Vel can both be negative we need to adjust this formula
+  // To handle sign (direction) separately from magnitude.
+  double Vel2sum = Vel*abs(Vel) + 2.0*Thrust/(rho*Area);
+  
+  if( Vel2sum > 0.0)
+    Vinduced = 0.5 * (-Vel + sqrt(Vel2sum));
+  else
+    Vinduced = 0.5 * (-Vel - sqrt(-Vel2sum));
+    
   // P-factor is simulated by a shift of the acting location of the thrust.
   // The shift is a multiple of the angle between the propeller shaft axis
   // and the relative wind that goes through the propeller disk.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to