when building with the c++ compiler.
../Include/general.h ../Main/views.h ../Main/../Include/types.h \
../Main/../Flight/flight.h ../Main/../Math/mat3.h \
../Main/../Time/fg_time.h
+old_astro.o: old_astro.c ../XGL/xgl.h old_astro.h stars.h moon.h \
+ orbits.h ../Time/fg_time.h ../Time/../Include/types.h \
+ ../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
+ ../Time/../Flight/LaRCsim/ls_interface.h \
+ ../Time/../Flight/LaRCsim/../flight.h planets.h sun.h \
+ ../Include/constants.h ../Include/general.h ../Main/views.h \
+ ../Main/../Include/types.h ../Main/../Flight/flight.h \
+ ../Main/../Math/mat3.h ../Main/../Time/fg_time.h \
+ ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
+ ../Aircraft/../Controls/controls.h \
+ ../Aircraft/../Controls/../Include/limits.h
orbits.o: orbits.c orbits.h ../Time/fg_time.h \
../Time/../Include/types.h ../Time/../Flight/flight.h \
../Time/../Flight/Slew/slew.h \
}
-void fgMoonInit() {
+void fgMoonInit( void ) {
struct fgLIGHT *l;
static int dl_exists = 0;
/* Draw the moon */
-void fgMoonRender() {
+void fgMoonRender( void ) {
struct fgLIGHT *l;
GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
/* $Log$
-/* Revision 1.1 1998/01/07 03:16:16 curt
-/* Moved from .../Src/Scenery/ to .../Src/Astro/
+/* 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.
/*
+ * Revision 1.1 1998/01/07 03:16:16 curt
+ * Moved from .../Src/Scenery/ to .../Src/Astro/
+ *
* Revision 1.16 1998/01/06 01:20:24 curt
* Tweaks to help building with MSVC++
*
/* Initialize the Moon Display management Subsystem */
-void fgMoonInit();
+void fgMoonInit( void );
/* Draw the Stars */
-void fgMoonRender();
+void fgMoonRender( void );
struct CelestialCoord fgCalculateMoon(struct OrbElements Params,
struct OrbElements sunParams,
/* $Log$
-/* Revision 1.1 1998/01/07 03:16:16 curt
-/* Moved from .../Src/Scenery/ to .../Src/Astro/
+/* Revision 1.2 1998/01/19 18:40:17 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.1 1998/01/07 03:16:16 curt
+ * Moved from .../Src/Scenery/ to .../Src/Astro/
+ *
* Revision 1.4 1997/12/11 04:43:56 curt
* Fixed sun vector and lighting problems. I thing the moon is now lit
* correctly.
/* Calculate the sky structure vertices */
-void fgSkyVerticesInit() {
+void fgSkyVerticesInit( void ) {
float theta;
int i;
/* (Re)calculate the sky colors at each vertex */
-void fgSkyColorsInit() {
+void fgSkyColorsInit( void ) {
struct fgLIGHT *l;
float sun_angle, diff;
float outer_param[3], outer_amt[3], outer_diff[3];
/* Initialize the sky structure and colors */
-void fgSkyInit() {
+void fgSkyInit( void ) {
printf("Initializing the sky\n");
fgSkyVerticesInit();
/* Draw the Sky */
-void fgSkyRender() {
+void fgSkyRender( void ) {
struct fgFLIGHT *f;
struct fgLIGHT *l;
struct fgVIEW *v;
/* $Log$
-/* Revision 1.1 1998/01/07 03:16:19 curt
-/* Moved from .../Src/Scenery/ to .../Src/Astro/
+/* Revision 1.2 1998/01/19 18:40:17 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.1 1998/01/07 03:16:19 curt
+ * Moved from .../Src/Scenery/ to .../Src/Astro/
+ *
* Revision 1.11 1997/12/30 22:22:38 curt
* Further integration of event manager.
*
/* (Re)generate the display list */
-void fgSkyInit();
+void fgSkyInit( void );
/* (Re)calculate the sky colors at each vertex */
-void fgSkyColorsInit();
+void fgSkyColorsInit( void );
/* Draw the Sky */
-void fgSkyRender();
+void fgSkyRender( void );
/* $Log$
-/* Revision 1.1 1998/01/07 03:16:19 curt
-/* Moved from .../Src/Scenery/ to .../Src/Astro/
+/* Revision 1.2 1998/01/19 18:40:17 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.1 1998/01/07 03:16:19 curt
+ * Moved from .../Src/Scenery/ to .../Src/Astro/
+ *
* Revision 1.2 1997/12/22 23:45:49 curt
* First stab at sunset/sunrise sky glow effects.
*
/* Initialize the Star Management Subsystem */
-void fgStarsInit() {
+void fgStarsInit( void ) {
FILE *fd;
struct fgGENERAL *g;
struct CelestialCoord pltPos;
/* Draw the Stars */
-void fgStarsRender() {
+void fgStarsRender( void ) {
struct fgFLIGHT *f;
struct fgVIEW *v;
struct fgLIGHT *l;
/* $Log$
-/* Revision 1.1 1998/01/07 03:16:20 curt
-/* Moved from .../Src/Scenery/ to .../Src/Astro/
+/* 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.
/*
+ * Revision 1.1 1998/01/07 03:16:20 curt
+ * Moved from .../Src/Scenery/ to .../Src/Astro/
+ *
* Revision 1.24 1997/12/30 22:22:39 curt
* Further integration of event manager.
*
#define FG_MIN_STAR_MAG 0.738750 /* magnitude of weakest star we'll display */
/* Initialize the Star Management Subsystem */
-void fgStarsInit();
+void fgStarsInit( void );
/* Draw the Stars */
-void fgStarsRender();
+void fgStarsRender( void );
extern struct OrbElements pltOrbElements[9];
extern struct fgTIME cur_time_params;
/* $Log$
-/* Revision 1.1 1998/01/07 03:16:20 curt
-/* Moved from .../Src/Scenery/ to .../Src/Astro/
+/* 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.
/*
+ * Revision 1.1 1998/01/07 03:16:20 curt
+ * Moved from .../Src/Scenery/ to .../Src/Astro/
+ *
* Revision 1.6 1997/10/25 03:18:29 curt
* Incorporated sun, moon, and planet position and rendering code contributed
* by Durk Talsma.
/* Initialize the Sun */
-void fgSunInit() {
+void fgSunInit( void ) {
static int dl_exists = 0;
printf(" Initializing the Sun\n");
/* Draw the Sun */
-void fgSunRender() {
+void fgSunRender( void ) {
struct fgVIEW *v;
struct fgTIME *t;
struct fgLIGHT *l;
/* $Log$
-/* Revision 1.1 1998/01/07 03:16:20 curt
-/* Moved from .../Src/Scenery/ to .../Src/Astro/
+/* 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.
/*
+ * Revision 1.1 1998/01/07 03:16:20 curt
+ * Moved from .../Src/Scenery/ to .../Src/Astro/
+ *
* Revision 1.12 1998/01/05 18:44:36 curt
* Add an option to advance/decrease time from keyboard.
*
extern struct OrbElements pltOrbElements[9];
/* Initialize the Sun */
-void fgSunInit();
+void fgSunInit( void );
/* Draw the Sun */
-void fgSunRender();
+void fgSunRender( void );
#endif /* SUN_H */
/* $Log$
-/* Revision 1.1 1998/01/07 03:16:21 curt
-/* Moved from .../Src/Scenery/ to .../Src/Astro/
+/* Revision 1.2 1998/01/19 18:40:19 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.1 1998/01/07 03:16:21 curt
+ * Moved from .../Src/Scenery/ to .../Src/Astro/
+ *
* Revision 1.3 1997/12/11 04:43:56 curt
* Fixed sun vector and lighting problems. I thing the moon is now lit
* correctly.
cockpit->hud = hud;
}
-void fgCockpitUpdate()
+void fgCockpitUpdate( void )
{
printf( "Cockpit: code %d status %d\n", aircraft_cockpit->code, aircraft_cockpit->status );
/* $Log$
-/* Revision 1.4 1997/12/30 20:47:34 curt
-/* Integrated new event manager with subsystem initializations.
+/* Revision 1.5 1998/01/19 18:40:19 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.4 1997/12/30 20:47:34 curt
+ * Integrated new event manager with subsystem initializations.
+ *
* Revision 1.3 1997/12/15 23:54:33 curt
* Add xgl wrappers for debugging.
* Generate terrain normals on the fly.
};
struct fgCOCKPIT *fgCockpitInit( struct fgAIRCRAFT cur_aircraft );
-void fgCockpitUpdate();
+void fgCockpitUpdate( void );
/* $Log$
-/* 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.3 1998/01/19 18:40:19 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * 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.
*
../Scenery/scenery.h ../Scenery/../Include/types.h ../Math/mat3.h \
../Math/polar.h ../Math/../Include/types.h ../Time/fg_timer.h \
../Math/fg_random.h ../Weather/weather.h
-test.o: test.c test.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/../Include/limits.h ../Flight/flight.h \
- ../Controls/controls.h ../Include/constants.h ../Scenery/mesh.h \
- ../Scenery/scenery.h ../Scenery/../Include/types.h ../Math/mat3.h \
- ../Math/polar.h ../Math/../Include/types.h ../Time/fg_timer.h \
- ../Math/fg_random.h ../Weather/weather.h
}
-double get_speed()
+double get_speed( void )
{
struct fgFLIGHT *f;
return( FG_V_equiv_kts );
}
-double get_aoa()
+double get_aoa( void )
{
struct fgFLIGHT *f;
return( FG_Gamma_vert_rad*RAD_TO_DEG );
}
-double get_roll()
+double get_roll( void )
{
struct fgFLIGHT *f;
return( FG_Phi );
}
-double get_pitch()
+double get_pitch( void )
{
struct fgFLIGHT *f;
return( FG_Theta );
}
-double get_heading()
+double get_heading( void )
{
struct fgFLIGHT *f;
return( FG_Psi*RAD_TO_DEG );
}
-double get_altitude()
+double get_altitude( void )
{
struct fgFLIGHT *f;
double rough_elev;
Hptr fgHUDAddHorizon( Hptr hud, int x_pos, int y_pos, int length, \
int hole_len, double (*load_value)() )
{
-#ifndef WIN32
struct HUD_horizon *horizon;
struct HUD_instr *instrument;
HIptr tmp_first, tmp_next;
return( NULL );
instrument->type = ARTIFICIAL_HORIZON;
- instrument->instr = *horizon;
+ instrument->instr.horizon = *horizon;
instrument->instr.horizon.x_pos = x_pos;
instrument->instr.horizon.y_pos = y_pos;
instrument->instr.horizon.scr_width = length;
hud->instruments = instrument;
return( hud );
-#endif
}
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)() )
{
-#ifndef WIN32
struct HUD_scale *scale;
struct HUD_instr *instrument;
HIptr tmp_first, tmp_next;
return( NULL );
instrument->type = SCALE;
- instrument->instr = *scale;
+ instrument->instr.scale = *scale;
instrument->instr.scale.type = type;
instrument->instr.scale.scr_pos = scr_pos;
instrument->instr.scale.scr_min = scr_min;
hud->instruments = instrument;
return( hud );
-#endif
}
Hptr fgHUDAddLabel( Hptr hud, int x_pos, int y_pos, int size, int blink, int justify, \
char *pre_str, char *post_str, char *format, double (*load_value)() )
{
-#ifndef WIN32
struct HUD_label *label;
struct HUD_instr *instrument;
HIptr tmp_first, tmp_next;
return( NULL );
instrument->type = LABEL;
- instrument->instr = *label;
+ instrument->instr.label = *label;
instrument->instr.label.x_pos = x_pos;
instrument->instr.label.y_pos = y_pos;
instrument->instr.label.size = size;
hud->instruments = instrument;
return( hud );
-#endif
}
Hptr fgHUDAddLadder( Hptr hud, int x_pos, int y_pos, int scr_width, int scr_height, \
int hole_len, int div_units, int label_pos, int width_units, \
double (*load_roll)(), double (*load_pitch)() )
{
-#ifndef WIN32
struct HUD_ladder *ladder;
struct HUD_instr *instrument;
HIptr tmp_first, tmp_next;
return( NULL );
instrument->type = LADDER;
- instrument->instr = *ladder;
+ instrument->instr.ladder = *ladder;
instrument->instr.ladder.type = 0; // Not used.
instrument->instr.ladder.x_pos = x_pos;
instrument->instr.ladder.y_pos = y_pos;
hud->instruments = instrument;
return( hud );
-#endif
}
/*
/* $Log$
-/* Revision 1.6 1997/12/15 23:54:34 curt
-/* Add xgl wrappers for debugging.
-/* Generate terrain normals on the fly.
+/* Revision 1.7 1998/01/19 18:40:20 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.6 1997/12/15 23:54:34 curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
* 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 {}"
int with_minimum;
int minimum_value;
int width_units;
- double (*load_value)();
+ double (*load_value)( void );
};
struct HUD_circular_scale {
int orientation;
int label_position;
int width_units;
- double (*load_value)();
+ double (*load_value)( void );
};
struct HUD_ladder {
int div_units;
int label_position;
int width_units;
- double (*load_roll)();
- double (*load_pitch)();
+ double (*load_roll)( void );
+ double (*load_pitch)( void );
};
struct HUD_circular_ladder {
int orientation;
int label_position;
int width_units;
- double (*load_value)();
+ double (*load_value)( void );
};
#define HORIZON_FIXED 1
int y_pos;
int scr_width;
int scr_hole;
- double (*load_value)();
+ double (*load_value)( void );
};
#define LABEL_COUNTER 1
char *pre_str;
char *post_str;
char *format;
- double (*load_value)();
+ double (*load_value)( void );
};
union HUD_instr_data {
typedef struct HUD *Hptr;
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 fgHUDAddHorizon( Hptr hud, int x_pos, int y_pos, int length, int hole_len, double (*load_value)( void ) );
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)() );
+ int orientation, int with_min, int min_value, int width_units, double (*load_value)( void ) );
Hptr fgHUDAddLabel( Hptr hud, int x_pos, int y_pos, int size, int blink, int justify, \
- char *pre_str, char *post_str, char *format, double (*load_value)() );
+ char *pre_str, char *post_str, char *format, double (*load_value)( void ) );
Hptr fgHUDAddLadder( Hptr hud, int x_pos, int y_pos, int scr_width, int scr_height, \
int hole_len, int div_units, int label_pos, int max_value, \
- double (*load_roll)(), double (*load_pitch)() );
+ double (*load_roll)( void ), double (*load_pitch)( void ) );
int max_value, double *(load_value) );
struct HUD *fgHUDAddNumDisp( Hptr hud, int x_pos, int y_pos, int size, int blink, \
char *pre_str, char *post_str, double *(load_value) ); */
-void fgUpdateHUD();
+void fgUpdateHUD( Hptr hud );
void fgUpdateHUD2( struct HUD *hud );
/* $Log$
-/* Revision 1.3 1997/12/30 16:36:41 curt
-/* Merged in Durk's changes ...
+/* Revision 1.4 1998/01/19 18:40:21 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.3 1997/12/30 16:36:41 curt
+ * Merged in Durk's changes ...
+ *
* 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 {}"
#include "../Aircraft/aircraft.h"
-void fgControlsInit() {
+void fgControlsInit( void ) {
int i;
struct fgCONTROLS *c;
c = ¤t_aircraft.controls;
/* $Log$
-/* 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.5 1998/01/19 18:40:22 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * 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.
*
*/
-void fgControlsInit();
+void fgControlsInit( void );
void fgElevMove(double amt);
void fgElevSet(double pos);
/* $Log$
-/* Revision 1.7 1997/12/15 23:54:36 curt
-/* Add xgl wrappers for debugging.
-/* Generate terrain normals on the fly.
+/* Revision 1.8 1998/01/19 18:40:22 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.7 1997/12/15 23:54:36 curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
* 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 {}"
#include <stdio.h>
#include "flight.h"
+#include "LaRCsim/ls_interface.h"
/* Initialize the flight model parameters */
/* $Log$
-/* Revision 1.6 1998/01/19 18:35:43 curt
-/* Minor tweaks and fixes for cygwin32.
+/* Revision 1.7 1998/01/19 18:40:23 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.6 1998/01/19 18:35:43 curt
+ * Minor tweaks and fixes for cygwin32.
+ *
* Revision 1.5 1997/12/30 20:47:37 curt
* Integrated new event manager with subsystem initializations.
*
#include "ls_types.h"
#include "ls_constants.h"
+
+#include "atmos_62.h"
+
#include <math.h>
#define alt_0 d_a_table[index ][0]
{ 240000., 1.08270E-07, 9.47120E+02, 0.00000E+00, 0.00000E+00 }
};
- index = altitude / 2000;
+ index = (int)( altitude / 2000 );
if (index > (MAX_ALT_INDEX-2))
{
index = MAX_ALT_INDEX-2; /* limit maximum altitude */
$Header$
$Log$
+Revision 1.2 1998/01/19 18:40:23 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.1 1997/05/29 00:09:53 curt
Initial Flight Gear revision.
--------------------------------------------------------------------------*/
-void inertias() {}
-void subsystems() {}
+
+#include "ls_types.h"
+#include "default_model_routines.h"
+
+void inertias( SCALAR dt, int Initialize ) {}
+void subsystems( SCALAR dt, int Initialize ) {}
/* void engine() {} */
/* void gear() {} */
LaRCsim.o: LaRCsim.c ls_types.h ls_constants.h ls_generic.h \
ls_sim_control.h ls_cockpit.h
-atmos_62.o: atmos_62.c ls_types.h ls_constants.h
-default_model_routines.o: default_model_routines.c
-ls_accel.o: ls_accel.c ls_types.h ls_generic.h ls_constants.h
-ls_aux.o: ls_aux.c ls_types.h ls_constants.h ls_generic.h
-ls_geodesy.o: ls_geodesy.c ls_types.h ls_constants.h
-ls_gravity.o: ls_gravity.c ls_types.h ls_constants.h
-ls_init.o: ls_init.c ls_types.h ls_sym.h ls_generic.h
+atmos_62.o: atmos_62.c ls_types.h ls_constants.h atmos_62.h
+default_model_routines.o: default_model_routines.c ls_types.h \
+ default_model_routines.h
+ls_accel.o: ls_accel.c ls_types.h ls_generic.h ls_constants.h \
+ ls_accel.h
+ls_aux.o: ls_aux.c ls_types.h ls_constants.h ls_generic.h ls_aux.h \
+ atmos_62.h ls_geodesy.h ls_gravity.h
+ls_geodesy.o: ls_geodesy.c ls_types.h ls_constants.h ls_geodesy.h
+ls_gravity.o: ls_gravity.c ls_types.h ls_constants.h ls_gravity.h
+ls_init.o: ls_init.c ls_types.h ls_sym.h ls_step.h ls_init.h \
+ navion_init.h ls_generic.h
ls_interface.o: ls_interface.c ls_types.h ls_constants.h ls_generic.h \
ls_sim_control.h ls_cockpit.h ls_interface.h ../flight.h \
- ../Slew/slew.h ../LaRCsim/ls_interface.h ../../Aircraft/aircraft.h \
+ ../Slew/slew.h ../LaRCsim/ls_interface.h ls_step.h ls_accel.h \
+ ls_aux.h ls_model.h ls_init.h ../../Aircraft/aircraft.h \
../../Aircraft/../Flight/flight.h \
../../Aircraft/../Controls/controls.h \
../../Aircraft/../Controls/../Include/limits.h
-ls_model.o: ls_model.c ls_types.h
-ls_step.o: ls_step.c ls_types.h ls_constants.h ls_generic.h
+ls_model.o: ls_model.c ls_types.h ls_model.h default_model_routines.h
+ls_step.o: ls_step.c ls_types.h ls_constants.h ls_generic.h ls_accel.h \
+ ls_aux.h ls_model.h ls_step.h ls_geodesy.h ls_gravity.h
ls_sync.o: ls_sync.c ls_types.h ls_sim_control.h
mymain.o: mymain.c ls_types.h ls_cockpit.h ls_generic.h
navion_aero.o: navion_aero.c ls_types.h ls_generic.h ls_cockpit.h
navion_engine.o: navion_engine.c ls_types.h ls_constants.h \
- ls_generic.h ls_cockpit.h ls_sim_control.h
+ ls_generic.h ls_sim_control.h ls_cockpit.h
navion_gear.o: navion_gear.c ls_types.h ls_constants.h ls_generic.h \
ls_cockpit.h
navion_init.o: navion_init.c ls_types.h ls_generic.h ls_cockpit.h
$Header$
$Log$
+Revision 1.2 1998/01/19 18:40:24 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.1 1997/05/29 00:09:53 curt
Initial Flight Gear revision.
#include "ls_types.h"
#include "ls_generic.h"
#include "ls_constants.h"
+#include "ls_accel.h"
#include <math.h>
-void ls_accel( )
-{
+void ls_accel( void ) {
SCALAR inv_Mass, inv_Radius;
SCALAR ixz2, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10;
$Header$
$Log$
+Revision 1.2 1998/01/19 18:40:24 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.1 1997/05/29 00:09:54 curt
Initial Flight Gear revision.
#include "ls_types.h"
#include "ls_constants.h"
#include "ls_generic.h"
+
+#include "ls_aux.h"
+
+#include "atmos_62.h"
+#include "ls_geodesy.h"
+#include "ls_gravity.h"
+
#include <math.h>
-void ls_aux()
-{
+
+void ls_aux( void ) {
SCALAR dx_pilot_from_cg, dy_pilot_from_cg, dz_pilot_from_cg;
- SCALAR inv_Mass;
+ /* SCALAR inv_Mass; */
SCALAR v_XZ_plane_2, signU, v_tangential;
- SCALAR inv_radius_ratio;
+ /* SCALAR inv_radius_ratio; */
SCALAR cos_rwy_hdg, sin_rwy_hdg;
SCALAR mach2, temp_ratio, pres_ratio;
$Header$
$Log$
+Revision 1.2 1998/01/19 18:40:25 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.1 1997/05/29 00:09:56 curt
Initial Flight Gear revision.
#include "ls_types.h"
#include "ls_constants.h"
+#include "ls_geodesy.h"
#include <math.h>
/* ONE_SECOND is pi/180/60/60, or about 100 feet at earths' equator */
#define HALF_PI 0.5*PI
-void ls_geoc_to_geod( lat_geoc, radius, lat_geod, alt, sea_level_r )
- SCALAR lat_geoc;
- SCALAR radius;
- SCALAR *lat_geod;
- SCALAR *alt;
- SCALAR *sea_level_r;
+void ls_geoc_to_geod( SCALAR lat_geoc, SCALAR radius, SCALAR *lat_geod,
+ SCALAR *alt, SCALAR *sea_level_r )
{
SCALAR t_lat, x_alpha, mu_alpha, delt_mu, r_alpha, l_point, rho_alpha;
SCALAR sin_mu_a, denom,delt_lambda, lambda_sl, sin_lambda_sl;
}
}
-void ls_geod_to_geoc( lat_geod, alt, sl_radius, lat_geoc )
- SCALAR lat_geod;
- SCALAR alt;
- SCALAR *sl_radius;
- SCALAR *lat_geoc;
+
+void ls_geod_to_geoc( SCALAR lat_geod, SCALAR alt,
+ SCALAR *sl_radius, SCALAR *lat_geoc )
{
SCALAR lambda_sl, sin_lambda_sl, cos_lambda_sl, sin_mu, cos_mu, px, py;
$Header$
$Log$
+Revision 1.2 1998/01/19 18:40:26 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.1 1997/05/29 00:09:56 curt
Initial Flight Gear revision.
--------------------------------------------------------------------------*/
#include "ls_types.h"
#include "ls_constants.h"
+#include "ls_gravity.h"
#include <math.h>
#define GM 1.4076431E16
$Header$
$Log$
+Revision 1.4 1998/01/19 18:40:26 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.3 1998/01/05 22:19:25 curt
#ifdef'd out some unused code that was problematic for MSVC++ to compile.
#include <stdio.h>
#include "ls_types.h"
#include "ls_sym.h"
+#include "ls_step.h"
+#include "ls_init.h"
+#include "navion_init.h"
/* temp */
#include "ls_generic.h"
extern SCALAR Simtime;
-static int Symbols_loaded = 0;
+/* static int Symbols_loaded = 0; */
static int Number_of_Continuous_States = 0;
static int Number_of_Discrete_States = 0;
static cont_state_rec Continuous_States[ MAX_NUMBER_OF_CONTINUOUS_STATES ];
static disc_state_rec Discrete_States[ MAX_NUMBER_OF_DISCRETE_STATES ];
-void ls_init_init()
-{
- int i, error;
+void ls_init_init( void ) {
+ int i;
+ /* int error; */
if (Number_of_Continuous_States == 0)
{
*/
}
-void ls_init()
-{
- int i;
+void ls_init( void ) {
+ /* int i; */
Simtime = 0;
return;
}
-void ls_save_current_as_ic()
-{
+void ls_save_current_as_ic( void ) {
/* Save current states as initial conditions */
- int i, error;
+ /* int i, error; */
/* commented out by CLO
for(i=0;i<Number_of_Continuous_States;i++)
#include "ls_sim_control.h"
#include "ls_cockpit.h"
#include "ls_interface.h"
+#include "ls_step.h"
+#include "ls_accel.h"
+#include "ls_aux.h"
+#include "ls_model.h"
+#include "ls_init.h"
#include "../flight.h"
#include "../../Aircraft/aircraft.h"
-void ls_stamp()
-{
+void ls_stamp( void ) {
char rcsid[] = "$Id$";
char revid[] = "$Revision$";
char dateid[] = "$Date$";
return;
}
-void ls_setdefopts()
-{
+void ls_setdefopts( void ) {
/* set default values for most options */
sim_control_.debug = 0; /* change to non-zero if in dbx! */
sim_control_.write_mat = 0; /* write matrix-x/matlab script */
sim_control_.write_tab = 0; /* write tab delim. history file */
sim_control_.write_asc1 = 0; /* write GetData file */
- sim_control_.sim_type = GLmouse; /* hook up to mouse */
sim_control_.save_spacing = DEFAULT_SAVE_SPACING;
/* interpolation on recording */
sim_control_.write_spacing = DEFAULT_WRITE_SPACING;
sim_control_.end_time = DEFAULT_END_TIME;
sim_control_.model_hz = DEFAULT_MODEL_HZ;
sim_control_.term_update_hz = DEFAULT_TERM_UPDATE_HZ;
- sim_control_.time_slices = DEFAULT_END_TIME * DEFAULT_MODEL_HZ /
- DEFAULT_SAVE_SPACING;
+ sim_control_.time_slices = (long int)(DEFAULT_END_TIME * DEFAULT_MODEL_HZ /
+ DEFAULT_SAVE_SPACING);
sim_control_.paused = 0;
speedup = 1.0;
#endif /* COMPILE_THIS_CODE_THIS_USELESS_CODE */
-void ls_loop( dt, initialize )
-
-SCALAR dt;
-int initialize;
-
-{
+void ls_loop( SCALAR dt, int initialize ) {
/* printf (" In ls_loop()\n"); */
ls_step( dt, initialize );
/* if (sim_control_.sim_type == cockpit ) ls_ACES(); */
-int ls_cockpit() {
+int ls_cockpit( void ) {
struct fgCONTROLS *c;
sim_control_.paused = 0;
printf("%.4f,%.4f,%.2f ", Latitude, Longitude, Altitude);
printf("%.2f,%.2f,%.2f\n", Phi, Theta, Psi); */
+ return( 0 );
}
X_pilot_rwy = FG_X_pilot_rwy;
Y_pilot_rwy = FG_Y_pilot_rwy;
H_pilot_rwy = FG_H_pilot_rwy;
+
+ return( 0 );
}
FG_X_pilot_rwy = X_pilot_rwy;
FG_Y_pilot_rwy = Y_pilot_rwy;
FG_H_pilot_rwy = H_pilot_rwy;
+
+ return ( 0 );
}
/* Flight Gear Modification Log
*
* $Log$
+ * Revision 1.13 1998/01/19 18:40:26 curt
+ * Tons of little changes to clean up the code and to remove fatal errors
+ * when building with the c++ compiler.
+ *
* Revision 1.12 1998/01/06 01:20:16 curt
* Tweaks to help building with MSVC++
*
/* update position based on inputs, positions, velocities, etc. */
int fgLaRCsimUpdate(int multiloop);
+/* Convert from the fgFLIGHT struct to the LaRCsim generic_ struct */
+int fgFlight_2_LaRCsim (struct fgFLIGHT *f);
+
+/* Convert from the LaRCsim generic_ struct to the fgFLIGHT struct */
+int fgLaRCsim_2_Flight (struct fgFLIGHT *f);
+
#endif /* LS_INTERFACE_H */
/* $Log$
-/* Revision 1.3 1997/07/23 21:52:20 curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.4 1998/01/19 18:40:27 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.3 1997/07/23 21:52:20 curt
+ * Put comments around the text after an #endif for increased portability.
+ *
* Revision 1.2 1997/05/29 22:39:59 curt
* Working on incorporating the LaRCsim flight model.
*
CURRENT RCS HEADER INFO:
$Header$
$Log$
+Revision 1.2 1998/01/19 18:40:27 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.1 1997/05/29 00:09:58 curt
Initial Flight Gear revision.
--------------------------------------------------------------------------*/
#include "ls_types.h"
+#include "ls_model.h"
+#include "default_model_routines.h"
-void ls_model( SCALAR dt, int Initialize )
-{
- inertias( dt, Initialize );
- subsystems( dt, Initialize );
- aero( dt, Initialize );
- engine( dt, Initialize );
- gear( dt, Initialize );
+void ls_model( SCALAR dt, int Initialize ) {
+ inertias( dt, Initialize );
+ subsystems( dt, Initialize );
+ aero( dt, Initialize );
+ engine( dt, Initialize );
+ gear( dt, Initialize );
}
$Header$
$Log$
+Revision 1.2 1998/01/19 18:40:28 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.1 1997/05/29 00:09:59 curt
Initial Flight Gear revision.
#include "ls_types.h"
#include "ls_constants.h"
#include "ls_generic.h"
+#include "ls_accel.h"
+#include "ls_aux.h"
+#include "ls_model.h"
+#include "ls_step.h"
+#include "ls_geodesy.h"
+#include "ls_gravity.h"
/* #include "ls_sim_control.h" */
#include <math.h>
extern SCALAR Simtime; /* defined in ls_main.c */
-void ls_step( dt, Initialize )
-
-SCALAR dt;
-int Initialize;
-
-{
+void ls_step( SCALAR dt, int Initialize ) {
static int inited = 0;
SCALAR dth;
static SCALAR v_dot_north_past, v_dot_east_past, v_dot_down_past;
/* Initialize vehicle model */
ls_aux();
- ls_model();
+ ls_model(0.0, 0);
/* Calculate initial accelerations */
COCKPIT cockpit_;
GENERIC generic_;
-int main() {
+int main(int argc, char **argv) {
model_init();
}
extern COCKPIT cockpit_;
-void aero()
-{
+void aero( SCALAR dt, int Initialize ) {
static int init = 0;
SCALAR u, w;
static SCALAR yaw_scale = -0.1;
static SCALAR scale = 1.0;
- static SCALAR trim_inc = 0.0002;
+ /* static SCALAR trim_inc = 0.0002; */
/* static SCALAR long_trim; */
static DATA U_0;
#include "ls_types.h"
#include "ls_constants.h"
#include "ls_generic.h"
-#include "ls_cockpit.h"
#include "ls_sim_control.h"
+#include "ls_cockpit.h"
+extern SIM_CONTROL sim_control_;
-void engine( SCALAR dt, int init )
-
-{
- if (init || sim_control_.sim_type != cockpit)
- Throttle[3] = Throttle_pct;
+void engine( SCALAR dt, int init ) {
+ /* if (init) { */
+ Throttle[3] = Throttle_pct;
+ /* } */
/* F_X_engine = Throttle[3]*813.4/0.2; */ /* original code */
/* F_Z_engine = Throttle[3]*11.36/0.2; */ /* original code */
$Header$
$Log$
+Revision 1.2 1998/01/19 18:40:29 curt
+Tons of little changes to clean up the code and to remove fatal errors
+when building with the c++ compiler.
+
Revision 1.1 1997/05/29 00:10:02 curt
Initial Flight Gear revision.
v[0] = 0.; v[1] = 0.; v[2] = 0.;
}
-gear()
-{
+void gear( SCALAR dt, int Initialize ) {
char rcsid[] = "$Id$";
/*
#include "ls_generic.h"
#include "ls_cockpit.h"
-void model_init()
-{
+void model_init( void ) {
Throttle[3] = 0.2; Rudder_pedal = 0; Lat_control = 0; Long_control = 0;
/* pointer to scenery structure */
/* static GLint scenery, runway; */
-double Simtime;
+/* double Simtime; */
/* Another hack */
int use_signals = 0;
* fgInitVisuals() -- Initialize various GL/view parameters
**************************************************************************/
-static void fgInitVisuals() {
+static void fgInitVisuals( void ) {
struct fgLIGHT *l;
struct fgTIME *t;
struct fgWEATHER *w;
* Update the view volume, position, and orientation
**************************************************************************/
-static void fgUpdateViewParams() {
+static void fgUpdateViewParams( void ) {
struct fgFLIGHT *f;
struct fgLIGHT *l;
struct fgTIME *t;
/*************************************************************************
* Draw a basic instrument panel
************************************************************************/
-static void fgUpdateInstrViewParams() {
+static void fgUpdateInstrViewParams( void ) {
xglViewport(0, 0 , (GLint)winWidth, (GLint)winHeight / 2);
xglMatrixMode(GL_PROJECTION);
}
-void fgInitTimeDepCalcs() {
+void fgInitTimeDepCalcs( void ) {
/* initialize timer */
#ifdef USE_ITIMER
FG_Altitude * FEET_TO_METER);
}
- /* fgAircraftOutputCurrent(a); */
+ fgAircraftOutputCurrent(a);
/* see if we need to load any new scenery tiles */
/* fgTileMgrUpdate(); */
/* $Log$
-/* Revision 1.48 1998/01/19 18:35:46 curt
-/* Minor tweaks and fixes for cygwin32.
+/* Revision 1.49 1998/01/19 18:40:31 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.48 1998/01/19 18:35:46 curt
+ * Minor tweaks and fixes for cygwin32.
+ *
* Revision 1.47 1998/01/13 00:23:08 curt
* Initial changes to support loading and management of scenery tiles. Note,
* there's still a fair amount of work left to be done.
../Cockpit/../Controls/controls.h ../Joystick/joystick.h \
../Math/fg_geodesy.h ../Math/polar.h ../Math/../Include/types.h \
../Scenery/mesh.h ../Scenery/scenery.h ../Scenery/../Include/types.h \
- ../Time/event.h ../Time/fg_timer.h ../Time/sunpos.h \
- ../Weather/weather.h
+ ../Scenery/tilemgr.h ../Time/event.h ../Time/fg_timer.h \
+ ../Time/sunpos.h ../Weather/weather.h
fg_init.o: fg_init.c fg_init.h views.h ../Include/types.h \
../Flight/flight.h ../Flight/Slew/slew.h \
../Flight/LaRCsim/ls_interface.h ../Flight/LaRCsim/../flight.h \
../Astro/stars.h ../Astro/sun.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/tilemgr.h ../Scenery/mesh.h \
- ../Scenery/scenery.h ../Scenery/../Include/types.h ../Time/event.h \
+ ../Math/fg_random.h ../Scenery/mesh.h ../Scenery/scenery.h \
+ ../Scenery/../Include/types.h ../Scenery/tilemgr.h ../Time/event.h \
../Time/sunpos.h ../Weather/weather.h
-probdemo.o: probdemo.c ../XGL/xgl.h
views.o: views.c views.h ../Include/types.h ../Flight/flight.h \
../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
../Flight/LaRCsim/../flight.h ../Math/mat3.h ../Time/fg_time.h \
FG_Runway_altitude = 3234.5;
FG_Runway_heading = 102.0 * DEG_TO_RAD;
- /* Initial Position at GLOBE airport */
+ /* Initial Position at (P13) GLOBE airport */
FG_Longitude = ( -398391.28 / 3600.0 ) * DEG_TO_RAD;
FG_Latitude = ( 120070.41 / 3600.0 ) * DEG_TO_RAD;
FG_Altitude = FG_Runway_altitude + 3.758099;
+ /* Initial Position at (SEZ) SEDONA airport */
+ FG_Longitude = -111.7884614 * DEG_TO_RAD;
+ FG_Latitude = 34.8486289 * DEG_TO_RAD;
+ FG_Runway_altitude = 4827;
+ FG_Altitude = FG_Runway_altitude + 3.758099;
+
+ /* Initial Position at (ANE) Anoka County airport */
+ FG_Longitude = -93.2113889 * DEG_TO_RAD;
+ FG_Latitude = 45.145 * DEG_TO_RAD;
+ FG_Runway_altitude = 912;
+ FG_Altitude = FG_Runway_altitude + 3.758099;
+
/* Initial Position north of the city of Globe */
/* FG_Longitude = ( -398673.28 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Latitude = ( 120625.64 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Latitude = ( 93312.00 / 3600.0 ) * DEG_TO_RAD; */
- FG_Runway_altitude = 4000.0;
- FG_Altitude = FG_Runway_altitude + 3.758099;
-
- printf("Initial position is: (%.4f, %.4f, %.2f)\n",
+
+ printf("Initial position is: (%.4f, %.4f, %.2f)\n",
FG_Longitude * RAD_TO_DEG, FG_Latitude * RAD_TO_DEG,
FG_Altitude * FEET_TO_METER);
/* $Log$
-/* Revision 1.30 1998/01/13 00:23:09 curt
-/* Initial changes to support loading and management of scenery tiles. Note,
-/* there's still a fair amount of work left to be done.
+/* Revision 1.31 1998/01/19 18:40:32 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.30 1998/01/13 00:23:09 curt
+ * Initial changes to support loading and management of scenery tiles. Note,
+ * there's still a fair amount of work left to be done.
+ *
* Revision 1.29 1998/01/08 02:22:08 curt
* Beginning to integrate Tile management subsystem.
*
mesh.o: mesh.c ../Include/constants.h ../Include/types.h \
../Math/fg_geodesy.h ../Math/fg_random.h ../Math/mat3.h \
../Math/polar.h ../Math/../Include/types.h mesh.h common.h scenery.h
-obj.o: obj.c ../XGL/xgl.h obj.h scenery.h ../Include/types.h \
+obj.o: obj.c ../XGL/xgl.h obj.h ../Include/types.h scenery.h \
../Math/mat3.h
-scenery.o: scenery.c ../XGL/xgl.h ../Include/general.h obj.h scenery.h \
- ../Include/types.h
-tilemgr.o: tilemgr.c ../XGL/xgl.h tileutils.h ../Aircraft/aircraft.h \
+scenery.o: scenery.c ../XGL/xgl.h ../Include/general.h obj.h \
+ ../Include/types.h scenery.h
+tilemgr.o: tilemgr.c ../XGL/xgl.h scenery.h ../Include/types.h \
+ tileutils.h obj.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/../Include/limits.h
+ ../Aircraft/../Controls/../Include/limits.h ../Include/constants.h \
+ ../Include/general.h
tileutils.o: tileutils.c tileutils.h ../Include/constants.h
/* We've finished parsing the current geometry. Now do whatever needs
* to be done with it (like generating the OpenGL call list for
* instance */
-void vrmlHandleGeometry() {
+void vrmlHandleGeometry( void ) {
switch(vrmlGeometryType) {
case VRML_ELEV_GRID:
mesh_do_it(&eg);
/* Finish up the current vrml geometry statement */
-int vrmlFreeGeometry() {
+int vrmlFreeGeometry( void ) {
printf("Freeing geometry type = %d\n", vrmlGeometryType);
switch(vrmlGeometryType) {
/* $Log$
-/* Revision 1.5 1998/01/06 01:20:23 curt
-/* Tweaks to help building with MSVC++
+/* Revision 1.6 1998/01/19 18:40:35 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.5 1998/01/06 01:20:23 curt
+ * Tweaks to help building with MSVC++
+ *
* Revision 1.4 1997/08/27 03:30:26 curt
* Changed naming scheme of basic shared structures.
*
/* We've finished parsing the current geometry. Now do whatever needs
* to be done with it (like generating the OpenGL call list for
* instance */
-void vrmlHandleGeometry();
+void vrmlHandleGeometry( void );
/* Finish up the current vrml geometry statement */
-int vrmlFreeGeometry();
+int vrmlFreeGeometry( void );
#endif /* GEOMETRY_H */
/* $Log$
-/* Revision 1.2 1997/07/23 21:52:25 curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.3 1998/01/19 18:40:36 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.2 1997/07/23 21:52:25 curt
+ * Put comments around the text after an #endif for increased portability.
+ *
* Revision 1.1 1997/06/29 21:16:48 curt
* More twiddling with the Scenery Management system.
*
/* return a pointer to a new mesh structure (no data array allocated yet) */
-struct MESH *(new_mesh)() {
+struct MESH *(new_mesh)( void ) {
struct MESH *mesh_ptr;
mesh_ptr = (struct MESH *)malloc(sizeof(struct MESH));
/* $Log$
-/* Revision 1.25 1998/01/07 03:31:27 curt
-/* Miscellaneous tweaks.
+/* Revision 1.26 1998/01/19 18:40:36 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.25 1998/01/07 03:31:27 curt
+ * Miscellaneous tweaks.
+ *
* Revision 1.24 1997/12/15 23:54:59 curt
* Add xgl wrappers for debugging.
* Generate terrain normals on the fly.
/* return a pointer to a new mesh structure (no data array allocated yet) */
-struct MESH *(new_mesh)();
+struct MESH *(new_mesh)( void );
/* initialize the non-array mesh values */
void mesh_init(struct MESH *m);
/* $Log$
-/* Revision 1.7 1997/08/27 03:30:29 curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.8 1998/01/19 18:40:37 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * 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
*
/* Initialize the Scenery Management system */
-void fgSceneryInit() {
+void fgSceneryInit( void ) {
printf("Initializing scenery subsystem\n");
/* set the default terrain detail level */
/* Render out the current scene */
-void fgSceneryRender() {
+void fgSceneryRender( void ) {
static GLfloat terrain_color[4] = { 0.6, 0.8, 0.4, 1.0 };
static GLfloat terrain_ambient[4];
static GLfloat terrain_diffuse[4];
/* $Log$
-/* Revision 1.31 1998/01/13 00:23:11 curt
-/* Initial changes to support loading and management of scenery tiles. Note,
-/* there's still a fair amount of work left to be done.
+/* Revision 1.32 1998/01/19 18:40:37 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.31 1998/01/13 00:23:11 curt
+ * Initial changes to support loading and management of scenery tiles. Note,
+ * there's still a fair amount of work left to be done.
+ *
* Revision 1.30 1998/01/07 03:22:29 curt
* Moved astro stuff to .../Src/Astro/
*
/* Initialize the Scenery Management system */
-void fgSceneryInit();
+void fgSceneryInit( void );
/* Tell the scenery manager where we are so it can load the proper data, and
/* Render out the current scene */
-void fgSceneryRender();
+void fgSceneryRender( void );
#endif /* SCENERY_H */
/* $Log$
-/* Revision 1.12 1997/12/15 23:55:03 curt
-/* Add xgl wrappers for debugging.
-/* Generate terrain normals on the fly.
+/* Revision 1.13 1998/01/19 18:40:38 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.12 1997/12/15 23:55:03 curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
* 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 {}"
/* Initialize the Tile Manager subsystem */
-void fgTileMgrInit() {
+void fgTileMgrInit( void ) {
printf("Initializing Tile Manager subsystem.\n");
/* fgTileCacheInit(); */
}
/* given the current lon/lat, fill in the array of local chunks. If
* the chunk isn't already in the cache, then read it from disk. */
-void fgTileMgrUpdate() {
+void fgTileMgrUpdate( void ) {
struct fgFLIGHT *f;
struct fgGENERAL *g;
struct bucket p;
+ struct bucket p_last = {-1000, 0, 0, 0};
char base_path[256];
char file_name[256];
int i, j;
find_bucket(FG_Longitude * RAD_TO_DEG, FG_Latitude * RAD_TO_DEG, &p);
printf("Updating Tile list for %d,%d %d,%d\n", p.lon, p.lat, p.x, p.y);
+ if ( (p.lon == p_last.lon) && (p.lat == p_last.lat) &&
+ (p.x == p_last.x) && (p.y == p_last.y) ) {
+ /* same bucket as last time */
+ }
+
gen_idx_array(&p, local_tiles, 7, 7);
/* scenery.center = ref; */
/* Render the local tiles --- hack, hack, hack */
-void fgTileMgrRender() {
+void fgTileMgrRender( void ) {
static GLfloat terrain_color[4] = { 0.6, 0.8, 0.4, 1.0 };
static GLfloat terrain_ambient[4];
static GLfloat terrain_diffuse[4];
/* $Log$
-/* Revision 1.3 1998/01/13 00:23:11 curt
-/* Initial changes to support loading and management of scenery tiles. Note,
-/* there's still a fair amount of work left to be done.
+/* Revision 1.4 1998/01/19 18:40:38 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.3 1998/01/13 00:23:11 curt
+ * Initial changes to support loading and management of scenery tiles. Note,
+ * there's still a fair amount of work left to be done.
+ *
* Revision 1.2 1998/01/08 02:22:27 curt
* Continue working on basic features.
*
/* Initialize the Tile Manager subsystem */
-void fgTileMgrInit();
+void fgTileMgrInit( void );
/* given the current lon/lat, fill in the array of local chunks. If
* the chunk isn't already in the cache, then read it from disk. */
-void fgTileMgrUpdate();
+void fgTileMgrUpdate( void );
/* Render the local tiles --- hack, hack, hack */
-void fgTileMgrRender();
+void fgTileMgrRender( void );
/* $Log$
-/* Revision 1.2 1998/01/13 00:23:11 curt
-/* Initial changes to support loading and management of scenery tiles. Note,
-/* there's still a fair amount of work left to be done.
+/* Revision 1.3 1998/01/19 18:40:38 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.2 1998/01/13 00:23:11 curt
+ * Initial changes to support loading and management of scenery tiles. Note,
+ * there's still a fair amount of work left to be done.
+ *
* Revision 1.1 1998/01/07 23:50:51 curt
* "area" renamed to "tile"
*
1/16/98 - Release verison 0.23
+1/17/98 - Change all "type function();" to "type function( void );"
+
--------------------------------------------------------------------------
| Todo
--------------------------------------------------------------------------
+1/17/98 - Compile with c++
+
+1/17/98 - in all .h's change #ifdef FILE_H -> #ifdef _FILE_H
+
+1/17/98 - Remove some of the unused files such as ls_sync.c
+
12/29/97 - Scenery area manager
12/29/97 - View frustum culling
# Choose your weapons
#---------------------------------------------------------------------------
-CC = gcc
+CC = g++
FLEX = flex -f -L
BISON = bison -v --no-lines
AR = ar
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.33 1998/01/19 18:40:15 curt
+# Tons of little changes to clean up the code and to remove fatal errors
+# when building with the c++ compiler.
+#
# Revision 1.32 1998/01/19 18:35:40 curt
# Minor tweaks and fixes for cygwin32.
#
/* reset flight params to a specific position */
void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
- struct FLIGHT *f;
+ struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
- /* f->pos_x = pos_x;
+ /*
+ f->pos_x = pos_x;
f->pos_y = pos_y;
f->pos_z = pos_z;
f->vel_Theta = 0.0;
f->vel_Psi = 0.0;
- f->Psi = heading; */
+ f->Psi = heading;
+ */
}
/* update position based on inputs, positions, velocities, etc. */
-void fgSlewUpdate() {
- struct FLIGHT *f;
- struct CONTROLS *c;
+void fgSlewUpdate( void ) {
+ struct fgFLIGHT *f;
+ struct fgCONTROLS *c;
f = ¤t_aircraft.flight;
c = ¤t_aircraft.controls;
/* $Log$
-/* Revision 1.7 1997/12/15 23:54:42 curt
-/* Add xgl wrappers for debugging.
-/* Generate terrain normals on the fly.
+/* Revision 1.8 1998/01/19 18:40:30 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.7 1997/12/15 23:54:42 curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
* Revision 1.6 1997/08/27 03:30:11 curt
* Changed naming scheme of basic shared structures.
*
void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading);
/* update position based on inputs, positions, velocities, etc. */
-void fgSlewUpdate();
+void fgSlewUpdate( void );
#endif /* SLEW_H */
/* $Log$
-/* Revision 1.2 1997/07/23 21:52:20 curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.3 1998/01/19 18:40:30 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.2 1997/07/23 21:52:20 curt
+ * Put comments around the text after an #endif for increased portability.
+ *
* Revision 1.1 1997/05/29 02:29:43 curt
* Moved to their own directory.
*
../Flight/LaRCsim/../flight.h ../Include/constants.h \
../Time/fg_time.h
fg_timer.o: fg_timer.c fg_timer.h
-scheduler.o: scheduler.c
-sidereal.o: sidereal.c ../Include/constants.h
+sptest.o: sptest.c sunpos.h ../Include/types.h ../Include/constants.h
sunpos.o: sunpos.c sunpos.h ../Include/types.h fg_time.h \
../Flight/flight.h ../Flight/Slew/slew.h \
../Flight/LaRCsim/ls_interface.h ../Flight/LaRCsim/../flight.h \
struct fgEVENT {
char description[256];
- void (*event)(); /* pointer to function */
+ void (*event)( void ); /* pointer to function */
int status; /* status flag */
long interval; /* interval in ms between each iteration of this event */
/* initialize the run queue */
-void initq() {
+void initq( void ) {
queue_front = queue_end = 0;
}
/* return queue empty status */
-int emptyq() {
+int emptyq( void ) {
if ( queue_front == queue_end ) {
return(1);
} else {
/* return queue full status */
-int fullq() {
+int fullq( void ) {
if ( (queue_end + 1) % MAX_RUN_QUEUE == queue_front ) {
return(1);
} else {
/* remove a member from the front of the queue */
-int popq() {
+int popq( void ) {
int ptr;
if ( !emptyq() ) {
/* Initialize the scheduling subsystem */
-void fgEventInit() {
+void fgEventInit( void ) {
printf("Initializing event manager\n");
event_ptr = 0;
initq();
/* Register an event with the scheduler, returns a pointer into the
* event table */
-int fgEventRegister(char *desc, void (*event)(), int status, int interval) {
+int fgEventRegister(char *desc, void (*event)( void ), int status,
+ int interval)
+{
struct fgEVENT *e;
e = &events[event_ptr];
/* Update the scheduling parameters for an event */
-void fgEventUpdate() {
+void fgEventUpdate( void ) {
}
/* Delete a scheduled event */
-void fgEventDelete() {
+void fgEventDelete( void ) {
}
/* Temporarily suspend scheduling of an event */
-void fgEventSuspend() {
+void fgEventSuspend( void ) {
}
/* Resume scheduling and event */
-void fgEventResume() {
+void fgEventResume( void ) {
}
/* Dump scheduling stats */
-void fgEventPrintStats() {
+void fgEventPrintStats( void ) {
int i;
if ( event_ptr > 0 ) {
/* Add pending jobs to the run queue and run the job at the front of
* the queue */
-void fgEventProcess() {
+void fgEventProcess( void ) {
#ifdef USE_FTIME
struct timeb current;
#else
/* $Log$
-/* Revision 1.5 1998/01/06 01:20:27 curt
-/* Tweaks to help building with MSVC++
+/* Revision 1.6 1998/01/19 18:40:39 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.5 1998/01/06 01:20:27 curt
+ * Tweaks to help building with MSVC++
+ *
* Revision 1.4 1997/12/31 17:46:50 curt
* Tweaked fg_time.c to be able to use ftime() instead of gettimeofday()
*
/* Initialize the scheduling subsystem */
-void fgEventInit();
+void fgEventInit( void );
/* Register an event with the scheduler, returns a pointer into the
* event table */
-int fgEventRegister(char *desc, void (*event)(), int status, int interval);
+int fgEventRegister(char *desc, void (*event)( void ), int status,
+ int interval);
/* Update the scheduling parameters for an event */
-void fgEventUpdate();
+void fgEventUpdate( void );
/* Delete a scheduled event */
-void fgEventDelete();
+void fgEventDelete( void );
/* Temporarily suspend scheduling of an event */
-void fgEventSuspend();
+void fgEventSuspend( void );
/* Resume scheduling and event */
-void fgEventResume();
+void fgEventResume( void );
/* Dump scheduling stats */
-void fgEventPrintStats();
+void fgEventPrintStats( void );
/* Add pending jobs to the run queue and run the job at the front of
* the queue */
-void fgEventProcess();
+void fgEventProcess( void );
/* $Log$
-/* Revision 1.1 1997/12/30 04:19:22 curt
-/* Initial revision.
+/* Revision 1.2 1998/01/19 18:40:39 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.1 1997/12/30 04:19:22 curt
+ * Initial revision.
+ *
*/
/* This routine catches the SIGALRM */
-void fgTimerCatch() {
+void fgTimerCatch( void ) {
/* ignore any SIGALRM's until we come back from our EOM iteration */
signal(SIGALRM, SIG_IGN);
/* This function returns the number of milleseconds since the last
time it was called. */
-int fgGetTimeInterval() {
+int fgGetTimeInterval( void ) {
int interval;
static int inited = 0;
/* $Log$
-/* Revision 1.7 1997/12/30 13:06:58 curt
-/* A couple lighting tweaks ...
+/* Revision 1.8 1998/01/19 18:40:39 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.7 1997/12/30 13:06:58 curt
+ * A couple lighting tweaks ...
+ *
* Revision 1.6 1997/07/12 02:13:04 curt
* Add ftime() support for those that don't have gettimeofday()
*
/* this routine initializes the interval timer to generate a SIGALRM
* after the specified interval (dt) the function f() will be called
* at each signal */
-void fgTimerInit(float dt, void (*f)());
+void fgTimerInit( float dt, void (*f)( void ) );
/* This function returns the number of milleseconds since the last
time it was called. */
-int fgGetTimeInterval();
+int fgGetTimeInterval( void );
#endif /* FG_TIMER_H */
/* $Log$
-/* Revision 1.2 1997/07/23 21:52:27 curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.3 1998/01/19 18:40:40 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.2 1997/07/23 21:52:27 curt
+ * Put comments around the text after an #endif for increased portability.
+ *
* Revision 1.1 1997/06/16 19:24:20 curt
* Initial revision.
*
/* update the cur_time_params structure with the current sun position */
-void fgUpdateSunPos() {
+void fgUpdateSunPos( void ) {
struct fgLIGHT *l;
struct fgTIME *t;
struct fgVIEW *v;
/* $Log$
-/* Revision 1.21 1997/12/30 23:10:19 curt
-/* Calculate lighting parameters here.
+/* Revision 1.22 1998/01/19 18:40:40 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.21 1997/12/30 23:10:19 curt
+ * Calculate lighting parameters here.
+ *
* Revision 1.20 1997/12/30 22:22:43 curt
* Further integration of event manager.
*
#include "../Include/types.h"
/* update the cur_time_params structure with the current sun position */
-void fgUpdateSunPos();
+void fgUpdateSunPos( void );
void fgSunPosition(time_t ssue, double *lon, double *lat);
/* Initialize the weather modeling subsystem */
-void fgWeatherInit(void) {
+void fgWeatherInit( void ) {
struct fgWEATHER *w;
w = ¤t_weather;
/* Update the weather parameters for the current position */
-void fgWeatherUpdate() {
+void fgWeatherUpdate( void ) {
struct fgFLIGHT *f;
struct fgWEATHER *w;
/* $Log$
-/* Revision 1.10 1997/12/30 22:22:46 curt
-/* Further integration of event manager.
+/* Revision 1.11 1998/01/19 18:40:41 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.10 1997/12/30 22:22:46 curt
+ * Further integration of event manager.
+ *
* Revision 1.9 1997/12/30 20:48:03 curt
* Integrated new event manager with subsystem initializations.
*
/* Initialize the weather modeling subsystem */
-void fgWeatherInit(void);
+void fgWeatherInit( void );
/* Update the weather parameters for the current position */
-void fgWeatherUpdate();
+void fgWeatherUpdate( void );
#endif /* WEATHER_H */
/* $Log$
-/* Revision 1.6 1997/12/30 22:22:47 curt
-/* Further integration of event manager.
+/* Revision 1.7 1998/01/19 18:40:41 curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
/*
+ * Revision 1.6 1997/12/30 22:22:47 curt
+ * Further integration of event manager.
+ *
* 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 {}"