system and commandline/config file processing code.
#include <Astro/moon.h>
#include <Aircraft/aircraft.h>
-#include <Include/constants.h>
+#include <Include/fg_constants.h>
#include <Include/general.h>
#include <Main/views.h>
#include <Time/fg_time.h>
+#include <Main/fg_debug.h>
struct CelestialCoord moonPos;
struct fgLIGHT *l;
static int dl_exists = 0;
- printf("Initializing the Moon\n");
+ fgPrintf( FG_ASTRO, FG_INFO, "Initializing the Moon\n");
l = &cur_light_params;
moonPos = fgCalculateMoon(pltOrbElements[1], pltOrbElements[0],
cur_time_params);
#ifdef DEBUG
- printf("Moon found at %f (ra), %f (dec)\n", moonPos.RightAscension,
- moonPos.Declination);
+ fgPrintf( FG_ASTRO, FG_DEBUG,
+ "Moon found at %f (ra), %f (dec)\n", moonPos.RightAscension,
+ moonPos.Declination);
#endif
xMoon = 60000.0 * cos(moonPos.RightAscension) * cos(moonPos.Declination);
/* $Log$
-/* Revision 1.3 1998/01/19 19:26:57 curt
-/* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
-/* This should simplify things tremendously.
+/* Revision 1.4 1998/01/27 00:47:46 curt
+/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+/* system and commandline/config file processing code.
/*
+ * Revision 1.3 1998/01/19 19:26:57 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
* Revision 1.2 1998/01/19 18:40:16 curt
* Tons of little changes to clean up the code and to remove fatal errors
* when building with the c++ compiler.
#include <Include/general.h>
#include <Time/fg_time.h>
-
+#include <Main/fg_debug.h>
struct OrbElements pltOrbElements[9];
int i;
FILE *data;
- printf("Initializing solar system\n");
+ fgPrintf( FG_ASTRO, FG_INFO, "Initializing solar system\n");
/* build the full path name to the orbital elements database file */
g = &general;
if ( (data = fopen(path, "r")) == NULL )
{
- printf("Cannot open data file: '%s'\n", path);
+ fgPrintf( FG_ASTRO, FG_ALERT, "Cannot open data file: '%s'\n", path);
return;
}
#ifdef DEBUG
- printf(" reading datafile %s\n", path);
+ fgPrintf( FG_ASTRO, FG_INFO, " reading datafile %s\n", path);
#endif
/* for all the objects... */
/* $Log$
-/* Revision 1.3 1998/01/22 02:59:27 curt
-/* Changed #ifdef FILE_H to #ifdef _FILE_H
+/* Revision 1.4 1998/01/27 00:47:47 curt
+/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+/* system and commandline/config file processing code.
/*
+ * Revision 1.3 1998/01/22 02:59:27 curt
+ * Changed #ifdef FILE_H to #ifdef _FILE_H
+ *
* Revision 1.2 1998/01/19 19:26:58 curt
* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
* This should simplify things tremendously.
#include <Astro/orbits.h>
#include <Astro/planets.h>
#include <Astro/sun.h>
-
+#include <Main/fg_debug.h>
struct CelestialCoord fgCalculatePlanet(struct OrbElements planet,
struct OrbElements theSun,
result.magnitude = -6.90 + 5*log10 (r*R) + 0.001 *FV;
break;
default:
- printf("index %d out of range !!!!\n", idx);
+ fgPrintf( FG_ASTRO, FG_ALERT, "index %d out of range !!!!\n", idx);
}
- printf(" Planet found at %f (ra), %f (dec)\n",
- result.RightAscension, result.Declination);
- printf(" Geocentric dist %f\n"
- " Heliocentric dist %f\n"
- " Distance to the sun %f\n"
- " Phase angle %f\n"
- " Brightness %f\n", R, r, s, FV, result.magnitude);
+ fgPrintf( FG_ASTRO, FG_DEBUG,
+ " Planet found at %f (ra), %f (dec)\n",
+ result.RightAscension, result.Declination);
+ fgPrintf( FG_ASTRO, FG_DEBUG,
+ " Geocentric dist %f\n"
+ " Heliocentric dist %f\n"
+ " Distance to the sun %f\n"
+ " Phase angle %f\n"
+ " Brightness %f\n", R, r, s, FV, result.magnitude);
return result;
}
/* $Log$
-/* Revision 1.2 1998/01/19 19:26:59 curt
-/* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
-/* This should simplify things tremendously.
+/* Revision 1.3 1998/01/27 00:47:47 curt
+/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+/* system and commandline/config file processing code.
/*
+ * Revision 1.2 1998/01/19 19:26:59 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
* Revision 1.1 1998/01/07 03:16:18 curt
* Moved from .../Src/Scenery/ to .../Src/Astro/
*
#include <Aircraft/aircraft.h>
#include <Flight/flight.h>
-#include <Include/constants.h>
+#include <Include/fg_constants.h>
#include <Main/views.h>
#include <Math/fg_random.h>
/* $Log$
-/* Revision 1.4 1998/01/26 15:54:28 curt
-/* Added a "skirt" to try to help hide gaps between scenery and sky. This will
-/* have to be revisited in the future.
+/* Revision 1.5 1998/01/27 00:47:48 curt
+/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+/* system and commandline/config file processing code.
/*
+ * Revision 1.4 1998/01/26 15:54:28 curt
+ * Added a "skirt" to try to help hide gaps between scenery and sky. This will
+ * have to be revisited in the future.
+ *
* Revision 1.3 1998/01/19 19:26:59 curt
* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
* This should simplify things tremendously.
#include <Astro/planets.h>
#include <Astro/stars.h>
-#include <Include/constants.h>
+#include <Include/fg_constants.h>
#include <Include/general.h>
#include <Aircraft/aircraft.h>
#include <Main/views.h>
#include <Time/fg_time.h>
-
+#include <Main/fg_debug.h>
#define EpochStart (631065600)
#define DaysSinceEpoch(secs) (((secs)-EpochStart)*(1.0/(24*3600)))
double ra_save1, decl_save1;
int count, i, j, max_stars;
- printf("Initializing stars\n");
+ fgPrintf( FG_ASTRO, FG_INFO, "Initializing stars\n");
g = &general;
max_stars = FG_MAX_STARS;
for ( i = 0; i < FG_STAR_LEVELS; i++ ) {
- printf(" Loading %d Stars: %s\n", max_stars, path);
+ fgPrintf( FG_ASTRO, FG_INFO, " Loading %d Stars: %s\n", max_stars, path);
if ( (fd = fopen(path, "r")) == NULL ) {
- printf("Cannot open star file: '%s'\n", path);
+ fgPrintf( FG_ASTRO, FG_ALERT, "Cannot open star file: '%s'\n", path);
return;
}
/* $Log$
-/* Revision 1.3 1998/01/19 19:26:59 curt
-/* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
-/* This should simplify things tremendously.
+/* Revision 1.4 1998/01/27 00:47:49 curt
+/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+/* system and commandline/config file processing code.
/*
+ * Revision 1.3 1998/01/19 19:26:59 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
* Revision 1.2 1998/01/19 18:40:18 curt
* Tons of little changes to clean up the code and to remove fatal errors
* when building with the c++ compiler.
#include <Main/views.h>
#include <Astro/orbits.h>
#include <Astro/sun.h>
+#include <Main/fg_debug.h>
GLint sun_obj;
void fgSunInit( void ) {
static int dl_exists = 0;
- printf(" Initializing the Sun\n");
+ fgPrintf( FG_ASTRO, FG_INFO, " Initializing the Sun\n");
fgSolarSystemUpdate(&(pltOrbElements[0]), cur_time_params);
sunPos = fgCalculateSun(pltOrbElements[0], cur_time_params);
#ifdef DEBUG
- printf("Sun found at %f (ra), %f (dec)\n", sunPos.RightAscension,
- sunPos.Declination);
+ fgPrintf( FG_ASTRO, FG_INFO,
+ "Sun found at %f (ra), %f (dec)\n",
+ sunPos.RightAscension, sunPos.Declination);
#endif
xSun = 60000.0 * cos(sunPos.RightAscension) * cos(sunPos.Declination);
amb[2] = 0.00 + ((ambient * 6.66) - 1.6);
amb[3] = 0.00;
#ifdef DEBUG
- printf("Color of the sun: %f, %f, %f\n"
- "Ambient value : %f\n"
- "Sun Angle : %f\n" , amb[0], amb[1], amb[2], ambient, t->sun_angle);
+ fgPrintf( FG_ASTRO, FG_INFO,
+ "Color of the sun: %f, %f, %f\n"
+ "Ambient value : %f\n"
+ "Sun Angle : %f\n" , amb[0], amb[1], amb[2], ambient, t->sun_angle);
#endif
diff[0] = 0.0;
diff[1] = 0.0;
/* $Log$
-/* Revision 1.3 1998/01/19 19:27:00 curt
-/* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
-/* This should simplify things tremendously.
+/* Revision 1.4 1998/01/27 00:47:50 curt
+/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+/* system and commandline/config file processing code.
/*
+ * Revision 1.3 1998/01/19 19:27:00 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
* Revision 1.2 1998/01/19 18:40:18 curt
* Tons of little changes to clean up the code and to remove fatal errors
* when building with the c++ compiler.