]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/ridge_lift.cxx
Bugfix - untie property.
[flightgear.git] / src / Environment / ridge_lift.cxx
index 4a371a3ae9d79e3688488d2131327cfeb9ee7918..9598f2bbb908400c9ead7f396232aeaf8b0f6f80 100644 (file)
@@ -171,10 +171,10 @@ void FGRidgeLift::update(double dt) {
                // position is geodetic, need geocentric for advanceRadM
                SGGeod myGeodPos = SGGeod::fromDegM( probe_lon_deg[0], probe_lat_deg[0], 20000.0 );
                SGGeoc myGeocPos = SGGeoc::fromGeod( myGeodPos );
-               double ground_wind_from_rad = _surface_wind_from_deg_node->getDoubleValue() * SG_DEGREES_TO_RADIANS + SG_PI;
+               double ground_wind_from_rad = _surface_wind_from_deg_node->getDoubleValue() * SG_DEGREES_TO_RADIANS;
 
                // compute the remaining probes
-               for (int i = 1; i < sizeof(probe_elev_m)/sizeof(probe_elev_m[0]); i++) {
+               for (unsigned i = 1; i < sizeof(probe_elev_m)/sizeof(probe_elev_m[0]); i++) {
                        SGGeoc probe = myGeocPos.advanceRadM( ground_wind_from_rad, dist_probe_m[i] );
                        // convert to geodetic position for ground level computation
                        SGGeod probeGeod = SGGeod::fromGeoc( probe );
@@ -193,7 +193,7 @@ void FGRidgeLift::update(double dt) {
                slope[2] = (probe_elev_m[2] - probe_elev_m[3]) / dist_probe_m[3];
                slope[3] = (probe_elev_m[4] - probe_elev_m[0]) / -dist_probe_m[4];
        
-               for (int i = 0; i < sizeof(slope)/sizeof(slope[0]); i++)
+               for (unsigned i = 0; i < sizeof(slope)/sizeof(slope[0]); i++)
                        adj_slope[i] = sin(atan(5.0 * pow ( (fabs(slope[i])),1.7) ) ) *sign(slope[i]);
        
                //adjustment