Included is a patch that I use here to get rid of trace spewn
driven by short timers. It demotes the relevant sun solver
and ground cache update messages from INFO to DEBUG.


Index: src/FDM/groundcache.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/FDM/groundcache.cxx,v
retrieving revision 1.10
diff -u -p -r1.10 groundcache.cxx
--- src/FDM/groundcache.cxx     16 Aug 2005 09:37:24 -0000      1.10
+++ src/FDM/groundcache.cxx     18 Oct 2005 01:29:36 -0000
@@ -532,7 +532,7 @@ FGGroundCache::prepare_ground_cache(doub
   cache_fill(terrain, xform, &acSphere, down, &wireSphere);

   // some stats
-  SG_LOG(SG_FLIGHT,SG_INFO, "prepare_ground_cache(): ac radius = " << rad
+  SG_LOG(SG_FLIGHT,SG_DEBUG, "prepare_ground_cache(): ac radius = " << rad
          << ", # triangles = " << triangles.size()
          << ", # wires = " << wires.size()
          << ", # catapults = " << catapults.size()
Index: src/Time/light.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Time/light.cxx,v
retrieving revision 1.47
diff -u -p -r1.47 light.cxx
--- src/Time/light.cxx  26 Jul 2005 20:12:03 -0000      1.47
+++ src/Time/light.cxx  18 Oct 2005 01:29:41 -0000
@@ -166,20 +166,20 @@ void FGLight::update_sky_color () {
     const GLfloat base_sky_color[4] = { 0.31, 0.43, 0.69, 1.0 };
     const GLfloat base_fog_color[4] = { 0.84, 0.87, 1.0,  1.0 };

-    SG_LOG( SG_EVENT, SG_INFO, "Updating light parameters." );
+    SG_LOG( SG_EVENT, SG_DEBUG, "Updating light parameters." );

     // calculate lighting parameters based on sun's relative angle to
     // local up

     float deg = _sun_angle * SGD_RADIANS_TO_DEGREES;
-    SG_LOG( SG_EVENT, SG_INFO, "  Sun angle = " << deg );
+    SG_LOG( SG_EVENT, SG_DEBUG, "  Sun angle = " << deg );

     float ambient = _ambient_tbl->interpolate( deg );
     float diffuse = _diffuse_tbl->interpolate( deg );
     float specular = _specular_tbl->interpolate( deg );
     float sky_brightness = _sky_tbl->interpolate( deg );

-    SG_LOG( SG_EVENT, SG_INFO,
+    SG_LOG( SG_EVENT, SG_DEBUG,
            "  ambient = " << ambient << "  diffuse = " << diffuse
            << "  specular = " << specular << "  sky = " << sky_brightness );

Index: src/Time/sunpos.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Time/sunpos.cxx,v
retrieving revision 1.6
diff -u -p -r1.6 sunpos.cxx
--- src/Time/sunpos.cxx 24 Jan 2004 10:36:37 -0000      1.6
+++ src/Time/sunpos.cxx 18 Oct 2005 01:29:42 -0000
@@ -260,8 +260,8 @@ void fgUpdateSunPos( void ) {
     SGTime *t = globals->get_time_params();
     FGViewer *v = globals->get_current_view();

-    SG_LOG( SG_EVENT, SG_INFO, "  Updating Sun position" );
-    SG_LOG( SG_EVENT, SG_INFO, "  Gst = " << t->getGst() );
+    SG_LOG( SG_EVENT, SG_DEBUG, "  Updating Sun position" );
+    SG_LOG( SG_EVENT, SG_DEBUG, "  Gst = " << t->getGst() );

     double sun_l;
     fgSunPositionGST(t->getGst(), &sun_l, &sun_gd_lat);
@@ -273,8 +273,8 @@ void fgUpdateSunPos( void ) {
     Point3D p = Point3D( l->get_sun_lon(), l->get_sun_gc_lat(), sl_radius );
     l->set_sunpos( sgPolarToCart3d(p) );

-    SG_LOG( SG_EVENT, SG_INFO, "    t->cur_time = " << t->get_cur_time() );
-    SG_LOG( SG_EVENT, SG_INFO,
+    SG_LOG( SG_EVENT, SG_DEBUG, "    t->cur_time = " << t->get_cur_time() );
+    SG_LOG( SG_EVENT, SG_DEBUG,
            "    Sun Geodetic lat = " << sun_gd_lat
            << " Geocentric lat = " << l->get_sun_gc_lat() );

@@ -302,7 +302,7 @@ void fgUpdateSunPos( void ) {
     //      << nsun[2] << endl;

     l->set_sun_angle( acos( sgScalarProductVec3 ( nup, nsun ) ) );
-    SG_LOG( SG_EVENT, SG_INFO, "sun angle relative to current location = "
+    SG_LOG( SG_EVENT, SG_DEBUG, "sun angle relative to current location = "
            << l->get_sun_angle() );

     // calculate vector to sun's position on the earth's surface


_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to