#include "hud.hxx"
#include "panel.hxx"
-
+#include <Main/viewer.hxx>
// FIXME
extern float get_roll(void);
if (fgGetBool("/sim/hud/enable3d", true) && HUD_style == 1)
factor = 640.0 / 55.0;
- SG_LOG(SG_INPUT, SG_INFO, "Done reading HudLadder instrument"
+ SG_LOG(SG_INPUT, SG_BULK, "Done reading HudLadder instrument"
<< node->getStringValue("name", "[unnamed]"));
if (!width_units)
alpha = get_aoa();
pla = get_throttleval();
-#ifdef ENABLE_SP_FMDS
+#ifdef ENABLE_SP_FDM
int lgear, wown, wowm, ilcanclaw, ihook;
- ilcanclaw = get_iaux2();
- lgear = get_iaux3();
- wown = get_iaux4();
- wowm = get_iaux5();
- ihook = get_iaux6();
+ ilcanclaw = fgGetInt("/fdm-ada/iaux2", 0);
+ lgear = fgGetInt("/fdm-ada/iaux3", 0);
+ wown = fgGetInt("/fdm-ada/iaux4", 0);
+ wowm = fgGetInt("/fdm-ada/iaux5", 0);;
+ ihook = fgGetInt("/fdm-ada/iaux6", 0);
#endif
float pitch_value = current_ch1() * SGD_RADIANS_TO_DEGREES;
//****************************************************************
//velocity vector reticle - computations
if (velocity_vector) {
- Vxx = get_Vx();
- Vyy = get_Vy();
- Vzz = get_Vz();
- Axx = get_Ax();
- Ayy = get_Ay();
- Azz = get_Az();
+ Vxx = fgGetDouble("/velocities/north-relground-fps", 0.0);
+ Vyy = fgGetDouble("/velocities/east-relground-fps", 0.0);
+ Vzz = fgGetDouble("/velocities/down-relground-fps", 0.0);
+ Axx = fgGetDouble("/accelerations/ned/north-accel-fps_sec", 0.0);
+ Ayy = fgGetDouble("/accelerations/ned/east-accel-fps_sec", 0.0);
+ Azz = fgGetDouble("/accelerations/ned/down-accel-fps_sec", 0.0);
psi = get_heading();
if (psi > 180.0)
glVertex2f(vel_x, vel_y + 6);
glEnd();
-#ifdef ENABLE_SP_FMDS
+#ifdef ENABLE_SP_FDM
// OBJECT MOVING RETICLE
// TYPE LINE
// ATTRIB - ON CONDITION
// TYPE - SQUARE_BRACKET
// ATTRIB - ON CONDITION
// alpha bracket
-#ifdef ENABLE_SP_FMDS
+#ifdef ENABLE_SP_FDM
if (alpha_bracket && ihook == 1) {
glBegin(GL_LINE_STRIP);
glVertex2f(vel_x - 20 , vel_y - (16 - alpha) * factor);
// OBJECT STATIC RETICLE
// TYPE LINE
// ATTRIB - ON CONDITION
-#ifdef ENABLE_SP_FMDS
+#ifdef ENABLE_SP_FDM
if (energy_worm && ilcanclaw == 1) {
glBegin(GL_LINE_STRIP);
glVertex2f(-15, -134);
// TYPE LINE
// ATTRIB - ON CONDITION
// draw appraoch glide slope marker
-#ifdef ENABLE_SP_FMDS
+#ifdef ENABLE_SP_FDM
if (glide_slope_marker && ihook) {
Line(-half_span + 15, (glide_slope-actslope) * factor,
-half_span + hole, (glide_slope - actslope) * factor);
//*************************************************************
//*************************************************************
-#ifdef ENABLE_SP_FMDS
+#ifdef ENABLE_SP_FDM
if (waypoint_marker) {
//waypoint marker computation
float fromwp_lat, towp_lat, fromwp_lon, towp_lon, dist, delx, dely, hyp, theta, brg;
fromwp_lon = get_longitude() * SGD_DEGREES_TO_RADIANS;
fromwp_lat = get_latitude() * SGD_DEGREES_TO_RADIANS;
- towp_lon = get_aux2() * SGD_DEGREES_TO_RADIANS;
- towp_lat = get_aux1() * SGD_DEGREES_TO_RADIANS;
+ towp_lon = fgGetDouble("/fdm-ada/ship-lon", 0.0) * SGD_DEGREES_TO_RADIANS;
+ towp_lat = fgGetDouble("/fdm-ada/ship-lat", 0.0) * SGD_DEGREES_TO_RADIANS;
dist = acos(sin(fromwp_lat) * sin(towp_lat) + cos(fromwp_lat)
* cos(towp_lat) * cos(fabs(fromwp_lon - towp_lon)));