]> git.mxchange.org Git - flightgear.git/blobdiff - src/Time/sunpos.cxx
Added a <solve-weight> subtag of the approach/cruise parameters that can
[flightgear.git] / src / Time / sunpos.cxx
index 0b1e03f595c496fb517912640dbc63b74bd5f25e..cf35a852e1493c21a98f39d9ee208589be4ebce1 100644 (file)
@@ -341,11 +341,16 @@ void fgUpdateSunPos( void ) {
     dot = sgScalarProductVec3( surface_to_sun, v->get_surface_south() );
     // cout << "  Dot product = " << dot << endl;
 
-    if (dot > 1) {
-        SG_LOG( SG_ASTRO, SG_WARN,
+    if (dot > 1.0) {
+        SG_LOG( SG_ASTRO, SG_INFO,
                 "Dot product  = " << dot << " is greater than 1.0" );
         dot = 1.0;
     }
+    else if (dot < -1.0) {
+         SG_LOG( SG_ASTRO, SG_INFO,
+                 "Dot product  = " << dot << " is less than -1.0" );
+         dot = -1.0;
+     }
 
     if ( east_dot >= 0 ) {
        l->set_sun_rotation( acos(dot) );