#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/math/polar3d.hxx>
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/math/polar3d.hxx>
sprintf( buf, "%d/%d/%4d %d:%02d:%02d",
p->tm_mon+1, p->tm_mday, 1900 + p->tm_year,
p->tm_hour, p->tm_min, p->tm_sec);
sprintf( buf, "%d/%d/%4d %d:%02d:%02d",
p->tm_mon+1, p->tm_mday, 1900 + p->tm_year,
p->tm_hour, p->tm_min, p->tm_sec);
- // 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);
+ // Curt dont comment this and return zero. - Ranga
+ // Please remove comments from get_V_..() function in flight.hxx
+ float Vxx = current_aircraft.fdm_state->get_V_north_rel_ground();
+ return Vxx;
- // 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);
+ // Curt dont comment this and return zero. - Ranga
+ // Please remove comments from get_V_..() function in flight.hxx
+ float Vyy = current_aircraft.fdm_state->get_V_east_rel_ground();
+ return Vyy;
- // 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);
+ // Curt dont comment this and return zero. - Ranga
+ // Please remove comments from get_V_..() function in flight.hxx
+ float Vzz = current_aircraft.fdm_state->get_V_down_rel_ground();
+ return Vzz;
- FG_LOG( FG_COCKPIT, FG_DEBUG,
- "Cockpit: code " << ac_cockpit->code() << " status "
- << ac_cockpit->status() );
+ SG_LOG( SG_COCKPIT, SG_DEBUG,
+ "Cockpit: code " << ac_cockpit->code() << " status "
+ << ac_cockpit->status() );
- int iwidth = globals->get_options()->get_xsize();
- int iheight = globals->get_options()->get_ysize();
- float width = iwidth;
- float height = iheight;
+ static const SGPropertyNode * xsize_node = fgGetNode("/sim/startup/xsize");
+ static const SGPropertyNode * ysize_node = fgGetNode("/sim/startup/ysize");
+ static const SGPropertyNode * hud_visibility_node
+ = fgGetNode("/sim/hud/visibility");
- if ( globals->get_options()->get_hud_status() ) {
+ int iwidth = xsize_node->getIntValue();
+ int iheight = ysize_node->getIntValue();
+ float width = iwidth;
+ // float height = iheight;
+
+ // FIXME: inefficient
+ if ( hud_visibility_node->getBoolValue() ) {
- float fps = get_frame_rate();
-// float tris = fps * get_vfc_tris_drawn();
-// float culled = fps * get_vfc_tris_culled();
-// sprintf(buf,"%-4.1f %7.0f %7.0f", fps, tris, culled);
+ float fps = get_frame_rate();
sprintf(buf,"%-5.1f", fps);
glMatrixMode( GL_PROJECTION );
glPushMatrix();
glLoadIdentity();
sprintf(buf,"%-5.1f", fps);
glMatrixMode( GL_PROJECTION );
glPushMatrix();
glLoadIdentity();
- gluOrtho2D( 0, globals->get_options()->get_xsize(),
- 0, globals->get_options()->get_ysize() );
+ gluOrtho2D( 0, iwidth, 0, iheight );
- glViewport( 0, 0,
- globals->get_options()->get_xsize(),
- globals->get_options()->get_ysize() );
-
+ glViewport( 0, 0, iwidth, iheight );