Jon S. Berndt a écrit :
Yes, the difference stems from the need to know what the wind is bringing,
and the vectorial definition of where it's going. The problem was that
sometimes we just had a vector where we expected to see North, East, and
Down, wind components. Well ... fine, but is that "to" or "from". The
convention was unspecified, and that caused confusion. From the FlightGear
side, I can see winds being specified either way. In the flight dynamics
code, however, I expect to see a wind velocity vector - the direction it's
going. The question is, where does the conversion to the wind velocity
vector form break?

Jon
After having seen in some places in last JSBSim code that wind direction is the direction the wind is toward, here's a patch that revert the values used in wind vector for JSBSim, that work for me, wind is now correctly applied.
i didn't tested vertical composante .

hope that helps

jano





Index: src/FDM/JSBSim/JSBSim.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/FDM/JSBSim/JSBSim.cxx,v
retrieving revision 1.55
diff -u -r1.55 JSBSim.cxx
--- src/FDM/JSBSim/JSBSim.cxx	27 Mar 2009 11:44:35 -0000	1.55
+++ src/FDM/JSBSim/JSBSim.cxx	1 Apr 2009 13:42:55 -0000
@@ -328,9 +328,9 @@
       Atmosphere->UseInternal();
     }
 
-    fgic->SetVNorthFpsIC( wind_from_north->getDoubleValue() );
-    fgic->SetVEastFpsIC( wind_from_east->getDoubleValue() );
-    fgic->SetVDownFpsIC( wind_from_down->getDoubleValue() );
+    fgic->SetVNorthFpsIC( -wind_from_north->getDoubleValue() );
+    fgic->SetVEastFpsIC( -wind_from_east->getDoubleValue() );
+    fgic->SetVDownFpsIC( -wind_from_down->getDoubleValue() );
 
     //Atmosphere->SetExTemperature(get_Static_temperature());
     //Atmosphere->SetExPressure(get_Static_pressure());
@@ -625,9 +625,9 @@
     tmp = turbulence_rate->getDoubleValue();
     //Atmosphere->SetTurbRate(tmp);
 
-    Atmosphere->SetWindNED( wind_from_north->getDoubleValue(),
-                            wind_from_east->getDoubleValue(),
-                            wind_from_down->getDoubleValue() );
+    Atmosphere->SetWindNED( -wind_from_north->getDoubleValue(),
+                            -wind_from_east->getDoubleValue(),
+                            -wind_from_down->getDoubleValue() );
 //    SG_LOG(SG_FLIGHT,SG_INFO, "Wind NED: "
 //                  << get_V_north_airmass() << ", "
 //                  << get_V_east_airmass()  << ", "
------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to