#include "../constants.h"
+/* This is a record containing all the info for the aircraft currently
+ being operated */
+struct fgAIRCRAFT current_aircraft;
+
+
/* Display various parameters to stdout */
-void fgAircraftOutputCurrent(struct AIRCRAFT *a) {
- struct FLIGHT *f;
- struct CONTROLS *c;
+void fgAircraftOutputCurrent(struct fgAIRCRAFT *a) {
+ struct fgFLIGHT *f;
+ struct fgCONTROLS *c;
f = &a->flight;
c = &a->controls;
/* $Log$
-/* Revision 1.11 1997/09/13 02:00:05 curt
-/* Mostly working on stars and generating sidereal time for accurate star
-/* placement.
+/* Revision 1.12 1997/12/10 22:37:37 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.11 1997/09/13 02:00:05 curt
+ * Mostly working on stars and generating sidereal time for accurate star
+ * placement.
+ *
* Revision 1.10 1997/08/27 03:29:56 curt
* Changed naming scheme of basic shared structures.
*
/* Define a structure containing all the parameters for an aircraft */
-struct AIRCRAFT {
- struct FLIGHT flight;
- struct CONTROLS controls;
+struct fgAIRCRAFT {
+ struct fgFLIGHT flight;
+ struct fgCONTROLS controls;
};
/* current_aircraft contains all the parameters of the aircraft
currently being operated. */
-extern struct AIRCRAFT current_aircraft;
+extern struct fgAIRCRAFT current_aircraft;
/* Display various parameters to stdout */
-void fgAircraftOutputCurrent(struct AIRCRAFT *a);
+void fgAircraftOutputCurrent(struct fgAIRCRAFT *a);
#endif /* AIRCRAFT_H */
/* $Log$
-/* Revision 1.6 1997/09/13 02:00:06 curt
-/* Mostly working on stars and generating sidereal time for accurate star
-/* placement.
+/* Revision 1.7 1997/12/10 22:37:38 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.6 1997/09/13 02:00:06 curt
+ * Mostly working on stars and generating sidereal time for accurate star
+ * placement.
+ *
* Revision 1.5 1997/08/27 03:29:58 curt
* Changed naming scheme of basic shared structures.
*
// #define DEBUG
/* This is a structure that contains all data related to cockpit/panel/hud system */
-static struct COCKPIT *aircraft_cockpit;
+static struct fgCOCKPIT *aircraft_cockpit;
-struct COCKPIT *fgCockpitInit( struct AIRCRAFT cur_aircraft )
+struct fgCOCKPIT *fgCockpitInit( struct fgAIRCRAFT cur_aircraft )
{
- struct COCKPIT *cockpit;
+ struct fgCOCKPIT *cockpit;
Hptr hud;
- cockpit = (struct COCKPIT *)calloc(sizeof(struct COCKPIT),1);
+ cockpit = (struct fgCOCKPIT *)calloc(sizeof(struct fgCOCKPIT),1);
if( cockpit == NULL )
return( NULL );
return( cockpit );
}
-struct COCKPIT *fgCockpitAddHUD( struct COCKPIT *cockpit, struct HUD *hud )
+struct fgCOCKPIT *fgCockpitAddHUD( struct fgCOCKPIT *cockpit, struct HUD *hud )
{
cockpit->hud = hud;
}
/* $Log$
-/* Revision 1.1 1997/08/29 18:03:20 curt
-/* Initial revision.
+/* Revision 1.2 1997/12/10 22:37:38 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.1 1997/08/29 18:03:20 curt
+ * Initial revision.
+ *
*/
// And in the future (near future i hope).
// #include "panel.h"
-struct COCKPIT {
+struct fgCOCKPIT {
int code;
Hptr hud;
// As above.
int status;
};
-struct COCKPIT *fgCockpitInit( struct AIRCRAFT cur_aircraft );
+struct fgCOCKPIT *fgCockpitInit( struct fgAIRCRAFT cur_aircraft );
void fgCockpitUpdate();
/* $Log$
-/* Revision 1.1 1997/08/29 18:03:21 curt
-/* Initial revision.
+/* Revision 1.2 1997/12/10 22:37:39 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.1 1997/08/29 18:03:21 curt
+ * Initial revision.
+ *
*/
{
int x_inc1, y_inc1;
int x_inc2, y_inc2;
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
double sin_bank, cos_bank;
double bank_angle;
double get_speed()
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
return( FG_V_equiv_kts );
double get_aoa()
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
return( FG_Gamma_vert_rad*RAD_TO_DEG );
double get_roll()
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
return( FG_Phi );
double get_pitch()
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
return( FG_Theta );
double get_heading()
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
return( FG_Psi*RAD_TO_DEG );
double get_altitude()
{
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
double rough_elev;
f = ¤t_aircraft.flight;
// while( ++instruments
}
-Hptr fgHUDInit( struct AIRCRAFT current_aircraft, int color )
+Hptr fgHUDInit( struct fgAIRCRAFT current_aircraft, int color )
{
Hptr hud;
/* $Log$
-/* Revision 1.4 1997/09/23 00:29:32 curt
-/* Tweaks to get things to compile with gcc-win32.
+/* Revision 1.5 1997/12/10 22:37:39 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.4 1997/09/23 00:29:32 curt
+ * Tweaks to get things to compile with gcc-win32.
+ *
* Revision 1.3 1997/09/05 14:17:26 curt
* More tweaking with stars.
*
typedef struct HUD *Hptr;
-Hptr fgHUDInit( struct AIRCRAFT cur_aircraft, int color );
+Hptr fgHUDInit( struct fgAIRCRAFT cur_aircraft, int color );
Hptr fgHUDAddHorizon( Hptr hud, int x_pos, int y_pos, int length, int hole_len, double (*load_value)() );
Hptr fgHUDAddScale( Hptr hud, int type, int scr_pos, int scr_min, int scr_max, int div_min, int div_max, \
int orientation, int with_min, int min_value, int width_units, double (*load_value)() );
/* $Log$
-/* Revision 1.1 1997/08/29 18:03:22 curt
-/* Initial revision.
+/* Revision 1.2 1997/12/10 22:37:40 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.1 1997/08/29 18:03:22 curt
+ * Initial revision.
+ *
*/
void fgControlsInit() {
int i;
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elevator = 0.0;
void fgElevMove(double amt) {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elevator += amt;
}
void fgElevSet(double pos) {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elevator = pos;
}
void fgElevTrimMove(double amt) {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elev_Trim += amt;
}
void fgElevTrimSet(double pos) {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elev_Trim = pos;
}
void fgAileronMove(double amt) {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Aileron += amt;
}
void fgAileronSet(double pos) {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Aileron = pos;
}
void fgRudderMove(double amt) {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Rudder += amt;
}
void fgRudderSet(double pos) {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
FG_Rudder = pos;
void fgThrottleMove(int engine, double amt) {
int i;
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
if ( engine == FG_Throttle_All ) {
void fgThrottleSet(int engine, double pos) {
int i;
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
if ( engine == FG_Throttle_All ) {
/* $Log$
-/* Revision 1.3 1997/08/27 03:30:01 curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.4 1997/12/10 22:37:41 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.3 1997/08/27 03:30:01 curt
+ * Changed naming scheme of basic shared structures.
+ *
* Revision 1.2 1997/06/21 17:12:48 curt
* Capitalized subdirectory names.
*
/* Define a structure containing the control parameters */
-struct CONTROLS {
+struct fgCONTROLS {
double aileron;
double elevator;
double elevator_trim;
/* $Log$
-/* Revision 1.5 1997/08/27 03:30:02 curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.6 1997/12/10 22:37:41 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.5 1997/08/27 03:30:02 curt
+ * Changed naming scheme of basic shared structures.
+ *
* Revision 1.4 1997/07/23 21:52:18 curt
* Put comments around the text after an #endif for increased portability.
*
/* Initialize the flight model parameters */
-int fgFlightModelInit(int model, struct FLIGHT *f, double dt) {
+int fgFlightModelInit(int model, struct fgFLIGHT *f, double dt) {
int result;
if ( model == FG_LARCSIM ) {
/* Run multiloop iterations of the flight model */
-int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop) {
+int fgFlightModelUpdate(int model, struct fgFLIGHT *f, int multiloop) {
int result;
if ( model == FG_LARCSIM ) {
/* $Log$
-/* Revision 1.3 1997/08/27 03:30:04 curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.4 1997/12/10 22:37:42 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.3 1997/08/27 03:30:04 curt
+ * Changed naming scheme of basic shared structures.
+ *
* Revision 1.2 1997/05/29 22:39:57 curt
* Working on incorporating the LaRCsim flight model.
*
typedef double FG_VECTOR_3[3];
/* This is based heavily on LaRCsim/ls_generic.h */
-struct FLIGHT {
+struct fgFLIGHT {
/*================== Mass properties and geometry values ==================*/
/* General interface to the flight model routines */
/* Initialize the flight model parameters */
-int fgFlightModelInit(int model, struct FLIGHT *f, double dt);
+int fgFlightModelInit(int model, struct fgFLIGHT *f, double dt);
/* Run multiloop iterations of the flight model */
-int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop);
+int fgFlightModelUpdate(int model, struct fgFLIGHT *f, int multiloop);
#endif /* FLIGHT_H */
/* $Log$
-/* Revision 1.9 1997/09/04 02:17:33 curt
-/* Shufflin' stuff.
+/* Revision 1.10 1997/12/10 22:37:43 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.9 1997/09/04 02:17:33 curt
+ * Shufflin' stuff.
+ *
* Revision 1.8 1997/08/27 03:30:06 curt
* Changed naming scheme of basic shared structures.
*
int ls_cockpit() {
- struct CONTROLS *c;
+ struct fgCONTROLS *c;
sim_control_.paused = 0;
}
-/* Convert from the FG FLIGHT struct to the LaRCsim generic_ struct */
-int fgFlight_2_LaRCsim (struct FLIGHT *f) {
+/* Convert from the fgFLIGHT struct to the LaRCsim generic_ struct */
+int fgFlight_2_LaRCsim (struct fgFLIGHT *f) {
Mass = FG_Mass;
I_xx = FG_I_xx;
I_yy = FG_I_yy;
}
-/* Convert from the LaRCsim generic_ struct to the FG FLIGHT struct */
-int fgLaRCsim_2_Flight (struct FLIGHT *f) {
+/* Convert from the LaRCsim generic_ struct to the fgFLIGHT struct */
+int fgLaRCsim_2_Flight (struct fgFLIGHT *f) {
FG_Mass = Mass;
FG_I_xx = I_xx;
FG_I_yy = I_yy;
/* Flight Gear Modification Log
*
* $Log$
+ * Revision 1.10 1997/12/10 22:37:43 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
* Revision 1.9 1997/08/27 03:30:08 curt
* Changed naming scheme of basic shared structures.
*
/* Handle keyboard events */
void GLUTkey(unsigned char k, int x, int y) {
- struct CONTROLS *c;
- struct VIEW *v;
- struct WEATHER *w;
+ struct fgCONTROLS *c;
+ struct fgVIEW *v;
+ struct fgWEATHER *w;
c = ¤t_aircraft.controls;
v = ¤t_view;
/* Handle "special" keyboard events */
void GLUTspecialkey(int k, int x, int y) {
- struct CONTROLS *c;
- struct VIEW *v;
+ struct fgCONTROLS *c;
+ struct fgVIEW *v;
c = ¤t_aircraft.controls;
v = ¤t_view;
/* $Log$
-/* Revision 1.21 1997/08/27 21:32:23 curt
-/* Restructured view calculation code. Added stars.
+/* Revision 1.22 1997/12/10 22:37:45 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.21 1997/08/27 21:32:23 curt
+ * Restructured view calculation code. Added stars.
+ *
* Revision 1.20 1997/08/27 03:30:13 curt
* Changed naming scheme of basic shared structures.
*
#include "../Weather/weather.h"
-/* This is a record containing all the info for the aircraft currently
- being operated */
-struct AIRCRAFT current_aircraft;
-
/* This is a record containing global housekeeping information */
-struct GENERAL general;
-
-/* This is a record containing current weather info */
-struct WEATHER current_weather;
-
-/* This is a record containing current view parameters */
-struct VIEW current_view;
+struct fgGENERAL general;
/* view parameters */
static GLfloat win_ratio = 1.0;
static void fgInitVisuals() {
struct fgLIGHT *l;
struct fgTIME *t;
- struct WEATHER *w;
+ struct fgWEATHER *w;
l = &cur_light_params;
t = &cur_time_params;
**************************************************************************/
static void fgUpdateViewParams() {
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
struct fgLIGHT *l;
struct fgTIME *t;
- struct VIEW *v;
+ struct fgVIEW *v;
double x_2, x_4, x_8, x_10;
double ambient, diffuse, sky;
**************************************************************************/
void fgUpdateTimeDepCalcs(int multi_loop) {
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
struct fgTIME *t;
- struct VIEW *v;
+ struct fgVIEW *v;
int i;
f = ¤t_aircraft.flight;
double cur_elev;
double joy_x, joy_y;
int joy_b1, joy_b2;
- struct AIRCRAFT *a;
- struct FLIGHT *f;
+ struct fgAIRCRAFT *a;
+ struct fgFLIGHT *f;
struct fgTIME *t;
a = ¤t_aircraft;
**************************************************************************/
int main( int argc, char *argv[] ) {
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
/* $Log$
-/* Revision 1.27 1997/12/09 05:11:54 curt
-/* Working on tweaking lighting.
+/* Revision 1.28 1997/12/10 22:37:45 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.27 1997/12/09 05:11:54 curt
+ * Working on tweaking lighting.
+ *
* Revision 1.26 1997/12/09 04:25:29 curt
* Working on adding a global lighting params structure.
*
../Cockpit/hud.h ../Cockpit/../Aircraft/aircraft.h \
../Cockpit/../Flight/flight.h ../Cockpit/../Controls/controls.h \
../Joystick/joystick.h ../Math/fg_random.h ../Scenery/mesh.h \
- ../Scenery/moon.h ../Scenery/orbits.h ../Scenery/../Time/fg_time.h \
- ../Scenery/../Time/../types.h ../Scenery/../Time/../Flight/flight.h \
- ../Scenery/scenery.h ../Scenery/../types.h ../Scenery/stars.h \
- ../Time/fg_time.h ../Time/sunpos.h ../Time/../types.h \
- ../Weather/weather.h
+ ../Scenery/astro.h ../Scenery/stars.h ../Scenery/scenery.h \
+ ../Scenery/../types.h ../Time/fg_time.h ../Time/../types.h \
+ ../Time/../Flight/flight.h ../Time/sunpos.h ../Weather/weather.h
views.o: views.c views.h ../types.h ../Flight/flight.h \
../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
../Flight/LaRCsim/../flight.h ../Math/mat3.h ../constants.h \
/* General house keeping initializations */
void fgInitGeneral( void ) {
- struct GENERAL *g;
+ struct fgGENERAL *g;
g = &general;
void fgInitSubsystems( void ) {
double cur_elev;
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
struct fgTIME *t;
- struct VIEW *v;
+ struct fgVIEW *v;
f = ¤t_aircraft.flight;
t = &cur_time_params;
/* $Log$
-/* Revision 1.13 1997/11/25 19:25:32 curt
-/* Changes to integrate Durk's moon/sun code updates + clean up.
+/* Revision 1.14 1997/12/10 22:37:47 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.13 1997/11/25 19:25:32 curt
+ * Changes to integrate Durk's moon/sun code updates + clean up.
+ *
* Revision 1.12 1997/11/15 18:16:35 curt
* minor tweaks.
*
#include "../Scenery/scenery.h"
+/* This is a record containing current view parameters */
+struct fgVIEW current_view;
+
+
/* Initialize a view structure */
-void fgViewInit(struct VIEW *v) {
+void fgViewInit(struct fgVIEW *v) {
v->view_offset = 0.0;
v->goal_view_offset = 0.0;
}
/* Update the view parameters */
-void fgViewUpdate(struct FLIGHT *f, struct VIEW *v) {
+void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v) {
MAT3vec vec, forward;
MAT3mat R, TMP, UP, LOCAL, VIEW;
/* $Log$
-/* Revision 1.1 1997/08/27 21:31:17 curt
-/* Initial revision.
+/* Revision 1.2 1997/12/10 22:37:48 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.1 1997/08/27 21:31:17 curt
+ * Initial revision.
+ *
*/
/* Define a structure containing view information */
-struct VIEW {
+struct fgVIEW {
struct fgCartesianPoint view_pos;
MAT3vec local_up, view_up, view_forward;
double view_offset, goal_view_offset;
};
-extern struct VIEW current_view;
+extern struct fgVIEW current_view;
/* Initialize a view structure */
-void fgViewInit(struct VIEW *v);
+void fgViewInit(struct fgVIEW *v);
/* Update the view parameters */
-void fgViewUpdate(struct FLIGHT *f, struct VIEW *v);
+void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v);
#endif /* VIEWS_H */
/* $Log$
-/* Revision 1.1 1997/08/27 21:31:18 curt
-/* Initial revision.
+/* Revision 1.2 1997/12/10 22:37:48 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.1 1997/08/27 21:31:18 curt
+ * Initial revision.
+ *
*/
/* Render Astronomical Objects */
void fgAstroRender() {
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
struct fgLIGHT *l;
- struct VIEW *v;
+ struct fgVIEW *v;
struct fgTIME *t;
double angle;
/* $Log$
-/* Revision 1.2 1997/12/09 04:25:33 curt
-/* Working on adding a global lighting params structure.
+/* Revision 1.3 1997/12/10 22:37:49 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.2 1997/12/09 04:25:33 curt
+ * Working on adding a global lighting params structure.
+ *
* Revision 1.1 1997/11/25 23:20:22 curt
* Initial revision.
*
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h orbits.h planets.h sun.h
-scenery.o: scenery.c ../general.h moon.h orbits.h ../Time/fg_time.h \
- ../Time/../types.h ../Time/../Flight/flight.h \
- ../Time/../Flight/Slew/slew.h \
- ../Time/../Flight/LaRCsim/ls_interface.h \
- ../Time/../Flight/LaRCsim/../flight.h obj.h scenery.h ../types.h \
- stars.h
+scenery.o: scenery.c ../general.h astro.h stars.h obj.h scenery.h \
+ ../types.h
stars.o: stars.c orbits.h ../Time/fg_time.h ../Time/../types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
void fgSolarSystemInit(struct fgTIME t)
{
- struct GENERAL *g;
+ struct fgGENERAL *g;
char path[80];
int i;
FILE *data;
/* $Log$
-/* Revision 1.3 1997/11/25 23:20:44 curt
-/* Changed planets.dat Planets.dat
+/* Revision 1.4 1997/12/10 22:37:51 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.3 1997/11/25 23:20:44 curt
+ * Changed planets.dat Planets.dat
+ *
* Revision 1.2 1997/11/25 19:25:36 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*
/* Shared structure to hold current scenery parameters */
-struct SCENERY scenery;
+struct fgSCENERY scenery;
/* Initialize the Scenery Management system */
/* Tell the scenery manager where we are so it can load the proper data, and
* build the proper structures. */
void fgSceneryUpdate(double lon, double lat, double elev) {
- struct GENERAL *g;
+ struct fgGENERAL *g;
char path[1024];
g = &general;
/* $Log$
-/* Revision 1.24 1997/12/08 22:51:18 curt
-/* Enhanced to handle ccw and cw tri-stripe winding. This is a temporary
-/* admission of defeat. I will eventually go back and get all the stripes
-/* wound the same way (ccw).
+/* Revision 1.25 1997/12/10 22:37:51 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.24 1997/12/08 22:51:18 curt
+ * Enhanced to handle ccw and cw tri-stripe winding. This is a temporary
+ * admission of defeat. I will eventually go back and get all the stripes
+ * wound the same way (ccw).
+ *
* Revision 1.23 1997/11/25 19:25:37 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*
/* Define a structure containing global scenery parameters */
-struct SCENERY {
+struct fgSCENERY {
/* number of terrain data points to skip */
int terrain_skip;
double sun_angle;
};
-extern struct SCENERY scenery;
+extern struct fgSCENERY scenery;
/* Initialize the Scenery Management system */
/* $Log$
-/* Revision 1.10 1997/09/04 02:17:37 curt
-/* Shufflin' stuff.
+/* Revision 1.11 1997/12/10 22:37:52 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.10 1997/09/04 02:17:37 curt
+ * Shufflin' stuff.
+ *
* Revision 1.9 1997/08/27 03:30:33 curt
* Changed naming scheme of basic shared structures.
*
/* Initialize the Star Management Subsystem */
void fgStarsInit() {
FILE *fd;
- struct GENERAL *g;
+ struct fgGENERAL *g;
struct CelestialCoord pltPos;
char path[1024];
char line[256], name[256];
/* Draw the Stars */
void fgStarsRender() {
- struct FLIGHT *f;
- struct VIEW *v;
+ struct fgFLIGHT *f;
+ struct fgVIEW *v;
struct fgLIGHT *l;
struct fgTIME *t;
int i;
/* $Log$
-/* Revision 1.17 1997/12/09 04:25:33 curt
-/* Working on adding a global lighting params structure.
+/* Revision 1.18 1997/12/10 22:37:52 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.17 1997/12/09 04:25:33 curt
+ * Working on adding a global lighting params structure.
+ *
* Revision 1.16 1997/11/25 19:25:38 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*
/* Draw the Sun */
void fgSunRender() {
- struct VIEW *v;
+ struct fgVIEW *v;
struct fgTIME *t;
GLfloat color[4] = { 0.85, 0.65, 0.05, 1.0 };
/* double x_2, x_4, x_8, x_10; */
/* $Log$
-/* Revision 1.3 1997/12/09 05:11:56 curt
-/* Working on tweaking lighting.
+/* Revision 1.4 1997/12/10 22:37:53 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.3 1997/12/09 05:11:56 curt
+ * Working on tweaking lighting.
+ *
* Revision 1.2 1997/11/25 19:25:39 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*
/* the general house keeping structure definition */
-struct GENERAL {
+struct fgGENERAL {
/* The flight gear "root" directory */
char *root_dir;
};
/* general contains all the general house keeping parameters. */
-extern struct GENERAL general;
+extern struct fgGENERAL general;
#endif /* GENERAL_H */
/* $Log$
-/* Revision 1.2 1997/08/27 03:29:38 curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.3 1997/12/10 22:37:34 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.2 1997/08/27 03:29:38 curt
+ * Changed naming scheme of basic shared structures.
+ *
* Revision 1.1 1997/08/23 11:37:12 curt
* Initial revision.
*
/* Update the time dependent variables */
-void fgTimeUpdate(struct FLIGHT *f, struct fgTIME *t) {
+void fgTimeUpdate(struct fgFLIGHT *f, struct fgTIME *t) {
double gst_precise, gst_course;
static long int warp = 0;
/* $Log$
-/* Revision 1.14 1997/12/10 01:19:52 curt
-/* Tweaks for verion 0.15 release.
+/* Revision 1.15 1997/12/10 22:37:54 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.14 1997/12/10 01:19:52 curt
+ * Tweaks for verion 0.15 release.
+ *
* Revision 1.13 1997/12/09 05:11:56 curt
* Working on tweaking lighting.
*
void fgTimeInit(struct fgTIME *t);
/* Update the time dependent variables */
-void fgTimeUpdate(struct FLIGHT *f, struct fgTIME *t);
+void fgTimeUpdate(struct fgFLIGHT *f, struct fgTIME *t);
#endif /* FG_TIME_H */
/* $Log$
-/* Revision 1.8 1997/12/09 04:25:38 curt
-/* Working on adding a global lighting params structure.
+/* Revision 1.9 1997/12/10 22:37:55 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.8 1997/12/09 04:25:38 curt
+ * Working on adding a global lighting params structure.
+ *
* Revision 1.7 1997/11/25 19:25:41 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*
void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
struct fgLIGHT *l;
struct fgTIME *t;
- struct VIEW *v;
+ struct fgVIEW *v;
MAT3vec nup, nsun;
double sun_gd_lat, sl_radius, temp;
static int time_warp = 0;
/* $Log$
-/* Revision 1.14 1997/12/09 04:25:39 curt
-/* Working on adding a global lighting params structure.
+/* Revision 1.15 1997/12/10 22:37:55 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.14 1997/12/09 04:25:39 curt
+ * Working on adding a global lighting params structure.
+ *
* Revision 1.13 1997/11/25 19:25:42 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*
#include "../Math/fg_random.h"
+/* This is a record containing current weather info */
+struct fgWEATHER current_weather;
+
+
/* Initialize the weather modeling subsystem */
void fgWeatherInit(void) {
- struct WEATHER *w;
+ struct fgWEATHER *w;
w = ¤t_weather;
/* Update the weather parameters for the current position */
void fgWeatherUpdate(double lon, double lat, double alt) {
- struct FLIGHT *f;
- struct WEATHER *w;
+ struct fgFLIGHT *f;
+ struct fgWEATHER *w;
f = ¤t_aircraft.flight;
w = ¤t_weather;
/* $Log$
-/* Revision 1.6 1997/08/27 03:30:38 curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.7 1997/12/10 22:37:56 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.6 1997/08/27 03:30:38 curt
+ * Changed naming scheme of basic shared structures.
+ *
* Revision 1.5 1997/08/22 21:34:42 curt
* Doing a bit of reorganizing and house cleaning.
*
/* holds the current weather values */
-struct WEATHER {
+struct fgWEATHER {
float visibility;
};
-extern struct WEATHER current_weather;
+extern struct fgWEATHER current_weather;
/* Initialize the weather modeling subsystem */
/* $Log$
-/* Revision 1.4 1997/08/27 03:30:39 curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.5 1997/12/10 22:37:56 curt
+/* Prepended "fg" on the name of all global structures that didn't have it yet.
+/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
+ * Revision 1.4 1997/08/27 03:30:39 curt
+ * Changed naming scheme of basic shared structures.
+ *
* Revision 1.3 1997/08/22 21:34:43 curt
* Doing a bit of reorganizing and house cleaning.
*