Enable release builds using the --without-logging option to the configure
script. Also a couple log message cleanups, plus some C to C++ comment conversion.
This commit is contained in:
parent
c74350c4fe
commit
2c2b68fc47
7 changed files with 80 additions and 30 deletions
|
@ -90,7 +90,8 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t)
|
|||
|
||||
max_dist = 0.0;
|
||||
|
||||
cout << "generating airport base for size = " << perimeter.size() << "\n";
|
||||
FG_LOG( FG_TERRAIN, FG_INFO,
|
||||
"generating airport base for size = " << perimeter.size() );
|
||||
|
||||
fragment.init();
|
||||
fragment.tile_ptr = t;
|
||||
|
@ -102,10 +103,12 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t)
|
|||
<< " in fgAptGenerat()" );
|
||||
}
|
||||
|
||||
printf(" tile center = %.2f %.2f %.2f\n",
|
||||
t->center.x(), t->center.y(), t->center.z() );
|
||||
printf(" airport center = %.2f %.2f %.2f\n",
|
||||
average.x(), average.y(), average.z());
|
||||
FG_LOG( FG_TERRAIN, FG_INFO,
|
||||
" tile center = "
|
||||
<< t->center.x() << " " << t->center.y() << " " << t->center.z() );
|
||||
FG_LOG( FG_TERRAIN, FG_INFO,
|
||||
" airport center = "
|
||||
<< average.x() << " " << average.y() << " " << average.z() );
|
||||
fragment.center = average;
|
||||
|
||||
normal[0] = average.x();
|
||||
|
@ -233,7 +236,7 @@ fgAptGenerate(const string& path, fgTILE *tile)
|
|||
gen_base(average, perimeter, tile);
|
||||
}
|
||||
|
||||
cout << "Reading airport record\n";
|
||||
FG_LOG( FG_TERRAIN, FG_INFO, "Reading airport record" );
|
||||
in >> apt_id;
|
||||
apt_name = "";
|
||||
i = 1;
|
||||
|
@ -243,7 +246,8 @@ fgAptGenerate(const string& path, fgTILE *tile)
|
|||
while ( in.get(c) && c != '\n' ) {
|
||||
apt_name += c;
|
||||
}
|
||||
cout << "\tID = " + apt_id + " Name = " + apt_name + "\n";
|
||||
FG_LOG( FG_TERRAIN, FG_INFO,
|
||||
"\tID = " << apt_id << " Name = " << apt_name );
|
||||
} else if ( token == "p" ) {
|
||||
// airport area bounding polygon coordinate. These
|
||||
// specify a convex hull that should already have been cut
|
||||
|
@ -281,6 +285,11 @@ fgAptGenerate(const string& path, fgTILE *tile)
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.10 1998/11/07 19:07:06 curt
|
||||
// Enable release builds using the --without-logging option to the configure
|
||||
// script. Also a couple log message cleanups, plus some C to C++ comment
|
||||
// conversion.
|
||||
//
|
||||
// Revision 1.9 1998/11/06 21:17:32 curt
|
||||
// Converted to new logstream debugging facility. This allows release
|
||||
// builds with no messages at all (and no performance impact) by using
|
||||
|
|
|
@ -104,8 +104,9 @@ int fgStarsInit( void ) {
|
|||
}
|
||||
|
||||
timer.stop();
|
||||
cerr << "Loaded " << starcount << " stars in "
|
||||
<< timer.elapsedSeconds() << " seconds" << endl;
|
||||
FG_LOG( FG_ASTRO, FG_INFO,
|
||||
"Loaded " << starcount << " stars in "
|
||||
<< timer.elapsedSeconds() << " seconds" );
|
||||
|
||||
min_magnitude[0] = 4.2;
|
||||
min_magnitude[1] = 3.6;
|
||||
|
@ -254,6 +255,11 @@ void fgStarsRender( void ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.22 1998/11/07 19:07:07 curt
|
||||
// Enable release builds using the --without-logging option to the configure
|
||||
// script. Also a couple log message cleanups, plus some C to C++ comment
|
||||
// conversion.
|
||||
//
|
||||
// Revision 1.21 1998/11/06 21:17:42 curt
|
||||
// Converted to new logstream debugging facility. This allows release
|
||||
// builds with no messages at all (and no performance impact) by using
|
||||
|
|
|
@ -693,8 +693,10 @@ static void fgIdleFunction ( void ) {
|
|||
string slfile = current_options.get_fg_root() + "/Sounds/wasp.wav";
|
||||
|
||||
s1 = new slSample ( (char *)slfile.c_str() );
|
||||
printf("Rate = %d Bps = %d Stereo = %d\n",
|
||||
s1 -> getRate(), s1 -> getBps(), s1 -> getStereo());
|
||||
FG_LOG( FG_GENERAL, FG_INFO,
|
||||
"Rate = " << s1 -> getRate()
|
||||
<< " Bps = " << s1 -> getBps()
|
||||
<< " Stereo = " << s1 -> getStereo() );
|
||||
audio_sched -> loopSample ( s1 );
|
||||
|
||||
if ( audio_sched->working() ) {
|
||||
|
@ -897,6 +899,11 @@ int main( int argc, char **argv ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.64 1998/11/07 19:07:09 curt
|
||||
// Enable release builds using the --without-logging option to the configure
|
||||
// script. Also a couple log message cleanups, plus some C to C++ comment
|
||||
// conversion.
|
||||
//
|
||||
// Revision 1.63 1998/11/06 21:18:08 curt
|
||||
// Converted to new logstream debugging facility. This allows release
|
||||
// builds with no messages at all (and no performance impact) by using
|
||||
|
|
|
@ -105,7 +105,8 @@ int fgInitPosition( void ) {
|
|||
FG_Longitude = current_options.get_lon() * DEG_TO_RAD;
|
||||
FG_Latitude = current_options.get_lat() * DEG_TO_RAD;
|
||||
}
|
||||
printf("starting altitude is = %.2f\n", current_options.get_altitude());
|
||||
FG_LOG( FG_GENERAL, FG_INFO,
|
||||
"starting altitude is = " << current_options.get_altitude() );
|
||||
|
||||
FG_Altitude = current_options.get_altitude() * METER_TO_FEET;
|
||||
FG_Runway_altitude = FG_Altitude - 3.758099;
|
||||
|
@ -376,6 +377,11 @@ int fgInitSubsystems( void )
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.48 1998/11/07 19:07:10 curt
|
||||
// Enable release builds using the --without-logging option to the configure
|
||||
// script. Also a couple log message cleanups, plus some C to C++ comment
|
||||
// conversion.
|
||||
//
|
||||
// Revision 1.47 1998/11/06 21:18:10 curt
|
||||
// Converted to new logstream debugging facility. This allows release
|
||||
// builds with no messages at all (and no performance impact) by using
|
||||
|
|
|
@ -293,7 +293,8 @@ fgMATERIAL_MGR::load_lib ( void )
|
|||
in >> material_name >> token;
|
||||
|
||||
if ( token == '{' ) {
|
||||
printf( " Loading material %s\n", material_name.c_str() );
|
||||
FG_LOG( FG_TERRAIN, FG_INFO,
|
||||
" Loading material " << material_name );
|
||||
fgMATERIAL m;
|
||||
in >> m;
|
||||
|
||||
|
@ -355,6 +356,11 @@ fgMATERIAL_MGR::render_fragments()
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.11 1998/11/07 19:07:12 curt
|
||||
// Enable release builds using the --without-logging option to the configure
|
||||
// script. Also a couple log message cleanups, plus some C to C++ comment
|
||||
// conversion.
|
||||
//
|
||||
// Revision 1.10 1998/11/06 21:18:17 curt
|
||||
// Converted to new logstream debugging facility. This allows release
|
||||
// builds with no messages at all (and no performance impact) by using
|
||||
|
|
|
@ -94,7 +94,7 @@ fgEVENT::~fgEVENT()
|
|||
void
|
||||
fgEVENT::run()
|
||||
{
|
||||
printf("Running %s\n", description.c_str() );
|
||||
FG_LOG(FG_TIME, FG_INFO, "Running " << description );
|
||||
|
||||
// record starting time
|
||||
timestamp( &last_run );
|
||||
|
@ -131,11 +131,14 @@ fgEVENT::run()
|
|||
int
|
||||
fgEVENT::PrintStats() const
|
||||
{
|
||||
printf(" %-30s int=%.2fs cum=%ld min=%ld max=%ld count=%ld ave=%.2f\n",
|
||||
description.c_str(),
|
||||
interval / 1000.0,
|
||||
cum_time, min_time, max_time, count,
|
||||
cum_time / (double)count);
|
||||
FG_LOG( FG_TIME, FG_INFO,
|
||||
" " << description
|
||||
<< " int=" << interval / 1000.0
|
||||
<< " cum=" << cum_time
|
||||
<< " min=" << min_time
|
||||
<< " max=" << max_time
|
||||
<< " count=" << count
|
||||
<< " ave=" << cum_time / (double)count );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -146,7 +149,7 @@ fgEVENT_MGR::fgEVENT_MGR( void ) {
|
|||
|
||||
// Initialize the scheduling subsystem
|
||||
void fgEVENT_MGR::Init( void ) {
|
||||
printf("Initializing event manager\n");
|
||||
FG_LOG(FG_TIME, FG_INFO, "Initializing event manager" );
|
||||
|
||||
run_queue.erase( run_queue.begin(), run_queue.end() );
|
||||
event_table.erase( event_table.begin(), event_table.end() );
|
||||
|
@ -162,7 +165,7 @@ fgEVENT_MGR::Register( const string& desc,
|
|||
{
|
||||
fgEVENT e( desc, cb, status, interval );
|
||||
|
||||
printf("Registering event: %s\n", desc.c_str() );
|
||||
FG_LOG( FG_TIME, FG_INFO, "Registering event: " << desc );
|
||||
|
||||
// Actually run the event
|
||||
e.run();
|
||||
|
@ -195,15 +198,15 @@ void fgEVENT_MGR::Resume( void ) {
|
|||
void
|
||||
fgEVENT_MGR::PrintStats()
|
||||
{
|
||||
printf("\n");
|
||||
printf("Event Stats\n");
|
||||
printf("-----------\n");
|
||||
FG_LOG( FG_TIME, FG_INFO, "" );
|
||||
FG_LOG( FG_TIME, FG_INFO, "Event Stats" );
|
||||
FG_LOG( FG_TIME, FG_INFO, "-----------" );
|
||||
|
||||
for_each( event_table.begin(),
|
||||
event_table.end(),
|
||||
mem_fun_ref( &fgEVENT::PrintStats ));
|
||||
|
||||
printf("\n");
|
||||
FG_LOG( FG_TIME, FG_INFO, "");
|
||||
}
|
||||
|
||||
|
||||
|
@ -258,6 +261,11 @@ fgEVENT_MGR::~fgEVENT_MGR( void ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.10 1998/11/07 19:07:13 curt
|
||||
// Enable release builds using the --without-logging option to the configure
|
||||
// script. Also a couple log message cleanups, plus some C to C++ comment
|
||||
// conversion.
|
||||
//
|
||||
// Revision 1.9 1998/11/06 21:18:24 curt
|
||||
// Converted to new logstream debugging facility. This allows release
|
||||
// builds with no messages at all (and no performance impact) by using
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
//#include <Astro/orbits.hxx>
|
||||
#include <Astro/solarsystem.hxx>
|
||||
#include <Debug/logstream.hxx>
|
||||
#include <Include/fg_constants.h>
|
||||
#include <Main/views.hxx>
|
||||
#include <Math/fg_geodesy.hxx>
|
||||
|
@ -193,7 +194,8 @@ static double julian_date(int y, int m, int d) {
|
|||
|
||||
/* lazy test to ensure gregorian calendar */
|
||||
if (y < 1583) {
|
||||
printf("WHOOPS! Julian dates only valid for 1582 oct 15 or later\n");
|
||||
FG_LOG( FG_TIME, FG_ALERT,
|
||||
"WHOOPS! Julian dates only valid for 1582 oct 15 or later" );
|
||||
}
|
||||
|
||||
if ((m == 1) || (m == 2)) {
|
||||
|
@ -338,7 +340,7 @@ void fgUpdateSunPos( void ) {
|
|||
t = &cur_time_params;
|
||||
v = ¤t_view;
|
||||
|
||||
printf(" Updating Sun position\n");
|
||||
FG_LOG( FG_TIME, FG_INFO, " Updating Sun position" );
|
||||
|
||||
// (not sure why there was two)
|
||||
// fgSunPosition(t->cur_time, &l->sun_lon, &sun_gd_lat);
|
||||
|
@ -349,9 +351,10 @@ void fgUpdateSunPos( void ) {
|
|||
p = Point3D( l->sun_lon, l->sun_gc_lat, sl_radius );
|
||||
l->fg_sunpos = fgPolarToCart3d(p);
|
||||
|
||||
printf( " t->cur_time = %ld\n", t->cur_time);
|
||||
printf( " Sun Geodetic lat = %.5f Geocentric lat = %.5f\n",
|
||||
sun_gd_lat, l->sun_gc_lat);
|
||||
FG_LOG( FG_TIME, FG_INFO, " t->cur_time = " << t->cur_time );
|
||||
FG_LOG( FG_TIME, FG_INFO,
|
||||
" Sun Geodetic lat = " << sun_gd_lat
|
||||
<< " Geocentric lat = " << l->sun_gc_lat );
|
||||
|
||||
// I think this will work better for generating the sun light vector
|
||||
l->sun_vec[0] = l->fg_sunpos.x();
|
||||
|
@ -423,6 +426,11 @@ void fgUpdateSunPos( void ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.16 1998/11/07 19:07:14 curt
|
||||
// Enable release builds using the --without-logging option to the configure
|
||||
// script. Also a couple log message cleanups, plus some C to C++ comment
|
||||
// conversion.
|
||||
//
|
||||
// Revision 1.15 1998/10/18 01:17:24 curt
|
||||
// Point3D tweaks.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue