#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
-#include <simgear/math/fg_random.h>
#include <simgear/math/polar3d.hxx>
#include <Aircraft/aircraft.hxx>
#include <Include/general.hxx>
#include <FDM/ADA.hxx>
#include <Main/globals.hxx>
+#include <Main/fg_props.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
#include <GUI/gui.h>
{
// Make an explicit function call.
float speed = current_aircraft.fdm_state->get_V_calibrated_kts()
- * globals->get_options()->get_speed_up();
+ * fgGetInt("/sim/speed-up"); // FIXME: inefficient
return( speed );
}
// f->get_Latitude() * RAD_TO_ARCSEC);
float altitude;
- if ( globals->get_options()->get_units() == FGOptions::FG_UNITS_FEET ) {
+ if ( fgGetString("/sim/startup/units") == "feet" ) {
altitude = current_aircraft.fdm_state->get_Altitude();
} else {
altitude = (current_aircraft.fdm_state->get_Altitude() * FEET_TO_METER);
{
float agl;
- if ( globals->get_options()->get_units() == FGOptions::FG_UNITS_FEET ) {
+ if ( fgGetString("/sim/startup/units") == "feet" ) {
agl = (current_aircraft.fdm_state->get_Altitude()
- scenery.cur_elev * METER_TO_FEET);
} else {
float get_fov( void )
{
- float fov = globals->get_options()->get_fov();
+ float fov = globals->get_current_view()->get_fov();
return (fov);
}
float get_climb_rate( void )
{
float climb_rate;
- if ( globals->get_options()->get_units() == FGOptions::FG_UNITS_FEET ) {
+ if ( fgGetString("/sim/startup/units") == "feet" ) {
climb_rate = current_aircraft.fdm_state->get_Climb_Rate() * 60.0;
} else {
climb_rate = current_aircraft.fdm_state->get_Climb_Rate() * FEET_TO_METER * 60.0;
}
// $$$ begin - added, VS Renganathan 13 Oct 2K
-#ifdef FIGHTER_HUD
+// #ifdef FIGHTER_HUD
float get_Vx ( void )
{
- float Vxx = current_aircraft.fdm_state->get_V_north_rel_ground();
+ // CLO - 5 Jan 2000 - something needs to get addressed here
+ // float Vxx = current_aircraft.fdm_state->get_V_north_rel_ground();
+ float Vxx = 0;
return (Vxx);
}
float get_Vy ( void )
{
- float Vyy = current_aircraft.fdm_state->get_V_east_rel_ground();
+ // CLO - 5 Jan 2000 - something needs to get addressed here
+ // float Vyy = current_aircraft.fdm_state->get_V_east_rel_ground();
+ float Vyy = 0;
return (Vyy);
}
float get_Vz ( void )
{
- float Vzz = current_aircraft.fdm_state->get_V_down_rel_ground();
+ // CLO - 5 Jan 2000 - something needs to get addressed here
+ // float Vzz = current_aircraft.fdm_state->get_V_down_rel_ground();
+ float Vzz = 0;
return (Vzz);
}
FGADA *fdm = (FGADA *)current_aircraft.fdm_state;
return fdm->get_aux18();
}
-#endif
+// #endif
// $$$ end - added, VS Renganathan 13 Oct 2K
"Cockpit: code " << ac_cockpit->code() << " status "
<< ac_cockpit->status() );
- int iwidth = globals->get_options()->get_xsize();
- int iheight = globals->get_options()->get_ysize();
+ // FIXME: inefficient
+ int iwidth = fgGetInt("/sim/startup/xsize");
+ // FIXME: inefficient
+ int iheight = fgGetInt("/sim/startup/ysize");
float width = iwidth;
float height = iheight;
- if ( globals->get_options()->get_hud_status() ) {
+ // FIXME: inefficient
+ if ( fgGetBool("/sim/hud/visibility") ) {
// This will check the global hud linked list pointer.
// If these is anything to draw it will.
fgUpdateHUD();
glMatrixMode( GL_PROJECTION );
glPushMatrix();
glLoadIdentity();
- gluOrtho2D( 0, globals->get_options()->get_xsize(),
- 0, globals->get_options()->get_ysize() );
+ gluOrtho2D( 0, fgGetInt("/sim/startup/xsize"),
+ 0, fgGetInt("/sim/startup/ysize") );
glMatrixMode( GL_MODELVIEW );
glPushMatrix();
glLoadIdentity();
#endif // #ifdef DISPLAY_COUNTER
glViewport( 0, 0,
- globals->get_options()->get_xsize(),
- globals->get_options()->get_ysize() );
+ fgGetInt("/sim/startup/xsize"),
+ fgGetInt("/sim/startup/ysize") );
- if (current_panel != 0)
- current_panel->update();
}