On Fri, 2009-01-02 at 12:35 +0000, James Turner wrote:
> On 2 Jan 2009, at 04:20, Csaba Halász wrote:
> 
> > Found the feenableexcept() function, so expect more of these :)
> > Thanks to Ron for his help.
> 
> Applied. Frankly, all uses of atan() should probably be replaced with  
> atan2(), but with some inspection of the call site to verify the  
> change is sane.
> 
> Regards,
> James

There was some code to correct the angle quadrant that needs to come out
now that we're using atan2()

Ron

Index: src/AIModel/AICarrier.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/AIModel/AICarrier.cxx,v
retrieving revision 1.26
diff -u -r1.26 AICarrier.cxx
--- src/AIModel/AICarrier.cxx	2 Jan 2009 12:34:28 -0000	1.26
+++ src/AIModel/AICarrier.cxx	11 Jan 2009 00:24:09 -0000
@@ -517,14 +517,6 @@
     rel_wind_from_deg = atan2(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts)
                             * SG_RADIANS_TO_DEGREES;
 
-    // rationalise the output
-    if (rel_wind_speed_from_north_kts <= 0) {
-        rel_wind_from_deg = 180 + rel_wind_from_deg;
-    } else {
-        if(rel_wind_speed_from_east_kts <= 0)
-            rel_wind_from_deg = 360 + rel_wind_from_deg;
-    }
-
     //calculate rel wind
     rel_wind = rel_wind_from_deg - hdg;
     if (rel_wind > 180)
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to