/* Display various parameters to stdout */
void aircraft_debug(int type) {
- struct flight_params *f;
- struct control_params *c;
+ struct FLIGHT *f;
+ struct CONTROLS *c;
f = ¤t_aircraft.flight;
c = ¤t_aircraft.controls;
/* $Log$
-/* Revision 1.9 1997/07/19 22:39:08 curt
-/* Moved PI to ../constants.h
+/* Revision 1.10 1997/08/27 03:29:56 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.9 1997/07/19 22:39:08 curt
+ * Moved PI to ../constants.h
+ *
* Revision 1.8 1997/06/25 15:39:45 curt
* Minor changes to compile with rsxnt/win32.
*
/* Define a structure containing all the parameters for an aircraft */
-struct aircraft_params {
- struct flight_params flight;
- struct control_params controls;
+struct AIRCRAFT {
+ struct FLIGHT flight;
+ struct CONTROLS controls;
};
/* current_aircraft contains all the parameters of the aircraft
currently being operated. */
-extern struct aircraft_params current_aircraft;
+extern struct AIRCRAFT current_aircraft;
/* Display various parameters to stdout */
/* $Log$
-/* Revision 1.4 1997/07/23 21:52:17 curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.5 1997/08/27 03:29:58 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.4 1997/07/23 21:52:17 curt
+ * Put comments around the text after an #endif for increased portability.
+ *
* Revision 1.3 1997/06/21 17:12:42 curt
* Capitalized subdirectory names.
*
void fgControlsInit() {
int i;
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elevator = 0.0;
void fgElevMove(double amt) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elevator += amt;
}
void fgElevSet(double pos) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elevator = pos;
}
void fgElevTrimMove(double amt) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elev_Trim += amt;
}
void fgElevTrimSet(double pos) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Elev_Trim = pos;
}
void fgAileronMove(double amt) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Aileron += amt;
}
void fgAileronSet(double pos) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Aileron = pos;
}
void fgRudderMove(double amt) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Rudder += amt;
}
void fgRudderSet(double pos) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
FG_Rudder = pos;
void fgThrottleMove(int engine, double amt) {
int i;
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
if ( engine == FG_Throttle_All ) {
void fgThrottleSet(int engine, double pos) {
int i;
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
if ( engine == FG_Throttle_All ) {
/* $Log$
-/* Revision 1.2 1997/06/21 17:12:48 curt
-/* Capitalized subdirectory names.
+/* 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.
+ *
* Revision 1.1 1997/05/31 19:24:04 curt
* Initial revision.
*
/* Define a structure containing the control parameters */
-struct control_params {
+struct CONTROLS {
double aileron;
double elevator;
double elevator_trim;
/* $Log$
-/* Revision 1.4 1997/07/23 21:52:18 curt
-/* Put comments around the text after an #endif for increased portability.
+/* 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.
+ *
* Revision 1.3 1997/05/31 19:16:27 curt
* Elevator trim added.
*
/* Initialize the flight model parameters */
-int fgFlightModelInit(int model, struct flight_params *f, double dt) {
+int fgFlightModelInit(int model, struct FLIGHT *f, double dt) {
int result;
if ( model == FG_LARCSIM ) {
/* Run multiloop iterations of the flight model */
-int fgFlightModelUpdate(int model, struct flight_params *f, int multiloop) {
+int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop) {
int result;
if ( model == FG_LARCSIM ) {
/* $Log$
-/* Revision 1.2 1997/05/29 22:39:57 curt
-/* Working on incorporating the LaRCsim flight model.
+/* 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.
+ *
* Revision 1.1 1997/05/29 02:35:04 curt
* Initial revision.
*
typedef double FG_VECTOR_3[3];
/* This is based heavily on LaRCsim/ls_generic.h */
-struct flight_params {
+struct FLIGHT {
/*================== Mass properties and geometry values ==================*/
/* General interface to the flight model routines */
/* Initialize the flight model parameters */
-int fgFlightModelInit(int model, struct flight_params *f, double dt);
+int fgFlightModelInit(int model, struct FLIGHT *f, double dt);
/* Run multiloop iterations of the flight model */
-int fgFlightModelUpdate(int model, struct flight_params *f, int multiloop);
+int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop);
#endif /* FLIGHT_H */
/* $Log$
-/* Revision 1.7 1997/07/23 21:52:19 curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.8 1997/08/27 03:30:06 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.7 1997/07/23 21:52:19 curt
+ * Put comments around the text after an #endif for increased portability.
+ *
* Revision 1.6 1997/06/21 17:52:22 curt
* Continue directory shuffling ... everything should be compilable/runnable
* again.
int ls_cockpit() {
- struct control_params *c;
+ struct CONTROLS *c;
sim_control_.paused = 0;
}
-/* Convert from the FG flight_params struct to the LaRCsim generic_ struct */
-int fgFlight_2_LaRCsim (struct flight_params *f) {
+/* Convert from the FG FLIGHT struct to the LaRCsim generic_ struct */
+int fgFlight_2_LaRCsim (struct FLIGHT *f) {
Mass = FG_Mass;
I_xx = FG_I_xx;
I_yy = FG_I_yy;
}
-/* Convert from the LaRCsim generic_ struct to the FG flight_params struct */
-int fgLaRCsim_2_Flight (struct flight_params *f) {
+/* Convert from the LaRCsim generic_ struct to the FG FLIGHT struct */
+int fgLaRCsim_2_Flight (struct FLIGHT *f) {
FG_Mass = Mass;
FG_I_xx = I_xx;
FG_I_yy = I_yy;
/* Flight Gear Modification Log
*
* $Log$
+ * Revision 1.9 1997/08/27 03:30:08 curt
+ * Changed naming scheme of basic shared structures.
+ *
* Revision 1.8 1997/06/21 17:12:50 curt
* Capitalized subdirectory names.
*
/* Handle keyboard events */
void GLUTkey(unsigned char k, int x, int y) {
- struct control_params *c;
- struct weather_params *w;
+ struct CONTROLS *c;
+ struct WEATHER *w;
c = ¤t_aircraft.controls;
w = ¤t_weather;
/* Handle "special" keyboard events */
void GLUTspecialkey(int k, int x, int y) {
- struct control_params *c;
+ struct CONTROLS *c;
c = ¤t_aircraft.controls;
/* $Log$
-/* Revision 1.19 1997/08/25 20:27:21 curt
-/* Merged in initial HUD and Joystick code.
+/* Revision 1.20 1997/08/27 03:30:13 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.19 1997/08/25 20:27:21 curt
+ * Merged in initial HUD and Joystick code.
+ *
* Revision 1.18 1997/08/22 21:34:38 curt
* Doing a bit of reorganizing and house cleaning.
*
/* This is a record containing all the info for the aircraft currently
being operated */
-struct aircraft_params current_aircraft;
+struct AIRCRAFT current_aircraft;
/* This is a record containing global housekeeping information */
-struct general_params general;
+struct GENERAL general;
/* This is a record containing current weather info */
-struct weather_params current_weather;
+struct WEATHER current_weather;
/* view parameters */
static GLfloat win_ratio = 1.0;
**************************************************************************/
static void fgInitVisuals() {
- struct weather_params *w;
+ struct WEATHER *w;
w = ¤t_weather;
static void fgUpdateViewParams() {
struct fgCartesianPoint view_pos /*, alt_up */;
- struct flight_params *f;
- struct time_params *t;
+ struct FLIGHT *f;
+ struct fgTIME *t;
MAT3mat R, TMP, UP, LOCAL, VIEW;
MAT3vec vec, view_up, forward, view_forward, local_up, nup, nsun;
double sun_angle, temp, ambient, diffuse, sky;
**************************************************************************/
void fgUpdateTimeDepCalcs(int multi_loop) {
- struct flight_params *f;
- struct time_params *t;
+ struct FLIGHT *f;
+ struct fgTIME *t;
int i;
f = ¤t_aircraft.flight;
double cur_elev;
double joy_x, joy_y;
int joy_b1, joy_b2;
- struct flight_params *f;
+ struct FLIGHT *f;
f = ¤t_aircraft.flight;
**************************************************************************/
int main( int argc, char *argv[] ) {
- struct flight_params *f;
+ struct FLIGHT *f;
f = ¤t_aircraft.flight;
/* $Log$
-/* Revision 1.10 1997/08/25 20:27:22 curt
-/* Merged in initial HUD and Joystick code.
+/* Revision 1.11 1997/08/27 03:30:16 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.10 1997/08/25 20:27:22 curt
+ * Merged in initial HUD and Joystick code.
+ *
* Revision 1.9 1997/08/22 21:34:39 curt
* Doing a bit of reorganizing and house cleaning.
*
-GLUTkey.o: GLUTkey.c GLUTkey.h ../Aircraft/aircraft.h \
+GLUTkey.o: GLUTkey.c GLUTkey.h ../constants.h ../Aircraft/aircraft.h \
../Aircraft/../Flight/flight.h ../Aircraft/../Flight/Slew/slew.h \
../Aircraft/../Flight/LaRCsim/ls_interface.h \
../Aircraft/../Flight/LaRCsim/../flight.h \
../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../constants.h
+ ../Aircraft/../Controls/../limits.h ../Weather/weather.h
GLUTmain.o: GLUTmain.c fg_init.h ../constants.h ../general.h \
../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
../Aircraft/../Flight/Slew/slew.h \
../Aircraft/../Flight/LaRCsim/ls_interface.h \
../Aircraft/../Flight/LaRCsim/../flight.h \
../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Scenery/mesh.h \
- ../Scenery/scenery.h ../Scenery/../types.h ../Math/fg_geodesy.h \
- ../Math/mat3.h ../Math/polar.h ../Math/../types.h ../Time/fg_time.h \
+ ../Aircraft/../Controls/../limits.h ../Cockpit/cockpit.h \
+ ../Cockpit/hud.h ../Cockpit/../Aircraft/aircraft.h \
+ ../Cockpit/../Flight/flight.h ../Cockpit/../Controls/controls.h \
+ ../Joystick/joystick.h ../Math/fg_geodesy.h ../Math/mat3.h \
+ ../Math/polar.h ../Math/../types.h ../Scenery/mesh.h \
+ ../Scenery/scenery.h ../Scenery/../types.h ../Time/fg_time.h \
../Time/../types.h ../Time/fg_timer.h ../Time/sunpos.h \
../Weather/weather.h
fg_init.o: fg_init.c fg_init.h ../constants.h ../general.h \
../Aircraft/../Flight/LaRCsim/ls_interface.h \
../Aircraft/../Flight/LaRCsim/../flight.h \
../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Math/fg_random.h
+ ../Aircraft/../Controls/../limits.h ../Cockpit/cockpit.h \
+ ../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/scenery.h ../Scenery/../types.h ../Time/sunpos.h \
+ ../Weather/weather.h
#include "../Math/fg_random.h"
#include "../Scenery/mesh.h"
#include "../Scenery/scenery.h"
+#include "../Scenery/stars.h"
#include "../Time/sunpos.h"
#include "../Weather/weather.h"
/* General house keeping initializations */
void fgInitGeneral( void ) {
- struct general_params *g;
+ struct GENERAL *g;
g = &general;
void fgInitSubsystems( void ) {
double cur_elev;
- struct flight_params *f;
+ struct FLIGHT *f;
f = ¤t_aircraft.flight;
/* Initialize the Cockpit subsystem */
fgCockpitInit( current_aircraft );
+ /* Initialize the Stars subsystem */
+ fgStarsInit();
+
/* Initialize the Scenery Management subsystem */
fgSceneryInit();
/* $Log$
-/* Revision 1.2 1997/08/25 20:27:23 curt
-/* Merged in initial HUD and Joystick code.
+/* Revision 1.3 1997/08/27 03:30:19 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.2 1997/08/25 20:27:23 curt
+ * Merged in initial HUD and Joystick code.
+ *
* Revision 1.1 1997/08/23 01:46:20 curt
* Initial revision.
*
TARGET = libScenery.a
-CFILES = chunkmgr.c common.c mesh.c scenery.c scanner.c parser.c geometry.c
+CFILES = chunkmgr.c common.c mesh.c scenery.c scanner.c parser.c geometry.c \
+ stars.c
OFILES = $(CFILES:.c=.o)
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.19 1997/08/27 03:30:23 curt
+# Changed naming scheme of basic shared structures.
+#
# Revision 1.18 1997/08/02 19:10:12 curt
# Incorporated mesh2GL.c into mesh.c
#
parser.o: parser.c parsevrml.h geometry.h common.h mesh.h scenery.h \
../types.h
scanner.o: scanner.c parser.h
-scenery.o: scenery.c scenery.h ../types.h parsevrml.h
+scenery.o: scenery.c ../general.h scenery.h ../types.h parsevrml.h
static vrmlGeometryType;
-struct mesh eg;
+struct MESH eg;
/* Begin a new vrml geometry statement */
/* $Log$
-/* Revision 1.3 1997/07/08 18:20:13 curt
-/* Working on establishing a hard ground.
+/* Revision 1.4 1997/08/27 03:30:26 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.3 1997/07/08 18:20:13 curt
+ * Working on establishing a hard ground.
+ *
* Revision 1.2 1997/07/07 20:59:51 curt
* Working on scenery transformations to enable us to fly fluidly over the
* poles with no discontinuity/distortion in scenery.
/* Temporary hack until we get the scenery management system running */
extern GLint mesh_hack;
-extern struct mesh eg;
+extern struct MESH eg;
/* initialize the non-array mesh values */
-void mesh_init(struct mesh *m) {
+void mesh_init(struct MESH *m) {
m->originx = 0.0;
m->originy = 0.0;
/* return a pointer to a new mesh structure (no data array allocated yet) */
-struct mesh *(new_mesh)() {
- struct mesh *mesh_ptr;
+struct MESH *(new_mesh)() {
+ struct MESH *mesh_ptr;
- mesh_ptr = (struct mesh *)malloc(sizeof(struct mesh));
+ mesh_ptr = (struct MESH *)malloc(sizeof(struct MESH));
if ( mesh_ptr == 0 ) {
printf("Virtual memory exceeded\n");
/* set the option name in the mesh data structure */
-void mesh_set_option_name(struct mesh *m, char *name) {
+void mesh_set_option_name(struct MESH *m, char *name) {
if ( strlen(name) < MAX_IDENT_LEN ) {
strcpy(m->option_name, name);
} else {
/* set an option value in the mesh data structure */
-void mesh_set_option_value(struct mesh *m, char *value) {
+void mesh_set_option_value(struct MESH *m, char *value) {
/* printf("Setting %s to %s\n", m->option_name, value); */
if ( m->do_data ) {
/* do whatever needs to be done with the mesh now that it's been
loaded, such as generating the OpenGL call list. */
-void mesh_do_it(struct mesh *m) {
+void mesh_do_it(struct MESH *m) {
mesh_hack = mesh_to_OpenGL(m);
}
/* walk through mesh and make opengl calls */
-GLint mesh_to_OpenGL(struct mesh *m) {
+GLint mesh_to_OpenGL(struct MESH *m) {
GLint mesh;
/* static GLfloat color[4] = { 0.5, 0.4, 0.25, 1.0 }; */ /* dark desert */
static GLfloat color[4] = { 0.5, 0.5, 0.25, 1.0 };
/* $Log$
-/* Revision 1.20 1997/08/19 23:55:08 curt
-/* Worked on better simulating real lighting.
+/* Revision 1.21 1997/08/27 03:30:27 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.20 1997/08/19 23:55:08 curt
+ * Worked on better simulating real lighting.
+ *
* Revision 1.19 1997/08/06 00:24:28 curt
* Working on correct real time sun lighting.
*
#include <GL/glut.h>
-struct mesh {
+struct MESH {
/* start coordinates (in arc seconds) */
double originx, originy;
/* return a pointer to a new mesh structure (no data array allocated yet) */
-struct mesh *(new_mesh)();
+struct MESH *(new_mesh)();
/* initialize the non-array mesh values */
-void mesh_init(struct mesh *m);
+void mesh_init(struct MESH *m);
/* return a pointer to a dynamically allocated array */
float *(new_mesh_data)(int nrows, int ncols);
/* set the option name in the mesh data structure */
-void mesh_set_option_name(struct mesh *m, char *name);
+void mesh_set_option_name(struct MESH *m, char *name);
/* set an option value in the mesh data structure */
-void mesh_set_option_value(struct mesh *m, char *value);
+void mesh_set_option_value(struct MESH *m, char *value);
/* do whatever needs to be done with the mesh now that it's been
* loaded, such as generating the OpenGL call list. */
-void mesh_do_it(struct mesh *m);
+void mesh_do_it(struct MESH *m);
/* return the current altitude based on mesh data. We should rewrite
* this to interpolate exact values, but for now this is good enough */
double mesh_altitude(double lon, double lat);
/* walk through mesh and make opengl calls */
-GLint mesh_to_OpenGL(struct mesh *m);
+GLint mesh_to_OpenGL(struct MESH *m);
#endif /* MESH_H */
/* $Log$
-/* Revision 1.6 1997/08/02 19:10:15 curt
-/* Incorporated mesh2GL.c into mesh.c
+/* Revision 1.7 1997/08/27 03:30:29 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.6 1997/08/02 19:10:15 curt
+ * Incorporated mesh2GL.c into mesh.c
+ *
* Revision 1.5 1997/07/23 21:52:25 curt
* Put comments around the text after an #endif for increased portability.
*
yydebug = 1;
#endif
- printf("input file = %s\n", argv[1]);
+ printf(" input file = %s\n", argv[1]);
push_input_stream(argv[1]);
yyparse();
int fgParseVRML(char *file) {
int result;
- printf("input file = %s\n", file);
+ printf(" input file = %s\n", file);
push_input_stream(file);
result = yyparse();
#endif
#include <GL/glut.h>
+#include <stdio.h>
#include <string.h>
#include "../general.h"
/* Shared structure to hold current scenery parameters */
-struct scenery_params scenery;
+struct SCENERY 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_params *g;
+ struct GENERAL *g;
char path[1024];
g = &general;
strcat(path, g->root_dir);
strcat(path, "/Scenery/");
strcat(path, "mesa-e.wrl");
+
+ printf("Loading Scenery: %s\n", path);
+
fgParseVRML(path);
}
/* $Log$
-/* Revision 1.14 1997/08/25 20:27:24 curt
-/* Merged in initial HUD and Joystick code.
+/* Revision 1.15 1997/08/27 03:30:32 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.14 1997/08/25 20:27:24 curt
+ * Merged in initial HUD and Joystick code.
+ *
* Revision 1.13 1997/08/22 21:34:41 curt
* Doing a bit of reorganizing and house cleaning.
*
/* Define a structure containing global scenery parameters */
-struct scenery_params {
+struct SCENERY {
/* number of terrain data points to skip */
int terrain_skip;
struct fgCartesianPoint center;
};
-extern struct scenery_params scenery;
+extern struct SCENERY scenery;
/* Initialize the Scenery Management system */
/* $Log$
-/* Revision 1.8 1997/08/06 00:24:30 curt
-/* Working on correct real time sun lighting.
+/* Revision 1.9 1997/08/27 03:30:33 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.8 1997/08/06 00:24:30 curt
+ * Working on correct real time sun lighting.
+ *
* Revision 1.7 1997/07/23 21:52:27 curt
* Put comments around the text after an #endif for increased portability.
*
/* the general house keeping structure definition */
-struct general_params {
+struct GENERAL {
/* The flight gear "root" directory */
char *root_dir;
};
/* general contains all the general house keeping parameters. */
-extern struct general_params general;
+extern struct GENERAL general;
#endif /* GENERAL_H */
/* $Log$
-/* Revision 1.1 1997/08/23 11:37:12 curt
-/* Initial revision.
+/* 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.
+ *
*/
/* reset flight params to a specific position */
void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
- struct flight_params *f;
+ struct FLIGHT *f;
f = ¤t_aircraft.flight;
/* update position based on inputs, positions, velocities, etc. */
void fgSlewUpdate() {
- struct flight_params *f;
- struct control_params *c;
+ struct FLIGHT *f;
+ struct CONTROLS *c;
f = ¤t_aircraft.flight;
c = ¤t_aircraft.controls;
/* $Log$
-/* Revision 1.5 1997/07/19 22:35:06 curt
-/* Moved fiddled with PI to avoid compiler warnings.
+/* Revision 1.6 1997/08/27 03:30:11 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.5 1997/07/19 22:35:06 curt
+ * Moved fiddled with PI to avoid compiler warnings.
+ *
* Revision 1.4 1997/06/21 17:12:51 curt
* Capitalized subdirectory names.
*
fg_time.o: fg_time.c fg_time.h ../types.h
fg_timer.o: fg_timer.c fg_timer.h
-sptest.o: sptest.c sunpos.h ../constants.h
sunpos.o: sunpos.c sunpos.h fg_time.h ../types.h ../constants.h \
../Math/fg_geodesy.h ../Math/polar.h ../Math/../types.h
#include "fg_time.h"
-struct time_params cur_time_params;
+struct fgTIME cur_time_params;
/* $Log$
-/* Revision 1.1 1997/08/13 21:55:59 curt
-/* Initial revision.
+/* Revision 1.2 1997/08/27 03:30:35 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.1 1997/08/13 21:55:59 curt
+ * Initial revision.
+ *
*/
/* Define a structure containing global time parameters */
-struct time_params {
+struct fgTIME {
/* the point on the earth's surface above which the sun is directly
* overhead */
struct fgCartesianPoint fg_sunpos; /* in cartesian coordiantes */
double sun_lon, sun_gc_lat; /* in geocentric coordinates */
};
-extern struct time_params cur_time_params;
+extern struct fgTIME cur_time_params;
#endif /* FG_TIME_H */
/* $Log$
-/* Revision 1.1 1997/08/13 21:56:00 curt
-/* Initial revision.
+/* Revision 1.2 1997/08/27 03:30:36 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.1 1997/08/13 21:56:00 curt
+ * Initial revision.
+ *
*/
/* update the cur_time_params structure with the current sun position */
void fgUpdateSunPos() {
- struct time_params *t;
+ struct fgTIME *t;
double sun_gd_lat, sl_radius;
static int time_warp = 0;
fgGeodToGeoc(sun_gd_lat, 0.0, &sl_radius, &t->sun_gc_lat);
t->fg_sunpos = fgPolarToCart(t->sun_lon, t->sun_gc_lat, sl_radius);
+
+ /* printf("Geodetic lat = %.5f Geocentric lat = %.5f\n", sun_gd_lat,
+ t->sun_gc_lat); */
}
/* $Log$
-/* Revision 1.5 1997/08/22 21:34:41 curt
-/* Doing a bit of reorganizing and house cleaning.
+/* Revision 1.6 1997/08/27 03:30:37 curt
+/* Changed naming scheme of basic shared structures.
/*
+ * Revision 1.5 1997/08/22 21:34:41 curt
+ * Doing a bit of reorganizing and house cleaning.
+ *
* Revision 1.4 1997/08/19 23:55:09 curt
* Worked on better simulating real lighting.
*
/* Initialize the weather modeling subsystem */
void fgWeatherInit(void) {
- struct weather_params *w;
+ struct WEATHER *w;
w = ¤t_weather;
/* Update the weather parameters for the current position */
void fgWeatherUpdate(double lon, double lat, double alt) {
- struct flight_params *f;
- struct weather_params *w;
+ struct FLIGHT *f;
+ struct WEATHER *w;
f = ¤t_aircraft.flight;
w = ¤t_weather;
/* $Log$
-/* Revision 1.5 1997/08/22 21:34:42 curt
-/* Doing a bit of reorganizing and house cleaning.
+/* 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.
+ *
* Revision 1.4 1997/08/02 16:23:55 curt
* Misc. tweaks.
*
/* holds the current weather values */
-struct weather_params {
+struct WEATHER {
float visibility;
};
-extern struct weather_params current_weather;
+extern struct WEATHER current_weather;
/* Initialize the weather modeling subsystem */
/* $Log$
-/* Revision 1.3 1997/08/22 21:34:43 curt
-/* Doing a bit of reorganizing and house cleaning.
+/* 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.
+ *
* Revision 1.2 1997/07/23 21:52:30 curt
* Put comments around the text after an #endif for increased portability.
*