From 26193c5b19fdb9522e6f40ff98fd5589c87fb92a Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 1 Oct 1999 20:07:44 +0000 Subject: [PATCH] PVE serial output tweaks. Other minor tweaks. --- src/Autopilot/autopilot.cxx | 2 +- src/Cockpit/panel.cxx | 2 +- src/FDM/LaRCsim.cxx | 2 +- src/FDM/flight.hxx | 10 +++++----- src/GUI/gui.cxx | 2 ++ src/Main/fg_serial.cxx | 4 ++-- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/Autopilot/autopilot.cxx b/src/Autopilot/autopilot.cxx index f2b8b46ae..a3d91db1e 100644 --- a/src/Autopilot/autopilot.cxx +++ b/src/Autopilot/autopilot.cxx @@ -1063,7 +1063,7 @@ void fgAPInit( fgAIRCRAFT *current_aircraft ) { // Hardwired for now should be in options // 25% max control variablilty 0.5 / 2.0 - APData->disengage_threshold = 0.5; + APData->disengage_threshold = 1.0; #if !defined( USING_SLIDER_CLASS ) MaxRollAdjust = 2 * APData->MaxRoll; diff --git a/src/Cockpit/panel.cxx b/src/Cockpit/panel.cxx index d1a4382c0..90c1dd331 100644 --- a/src/Cockpit/panel.cxx +++ b/src/Cockpit/panel.cxx @@ -580,7 +580,7 @@ void FGTexInstrument::UpdatePointer(void){ if (alpha < alpha1) alpha = alpha1; if (alpha > alpha2) - alpha = alpha2; + alpha -= alpha2; xglMatrixMode(GL_MODELVIEW); xglPushMatrix(); xglLoadIdentity(); diff --git a/src/FDM/LaRCsim.cxx b/src/FDM/LaRCsim.cxx index d6a3be07d..db8c352c7 100644 --- a/src/FDM/LaRCsim.cxx +++ b/src/FDM/LaRCsim.cxx @@ -305,7 +305,7 @@ int fgLaRCsim_2_FGInterface (FGInterface& f) { // f.set_Velocities_Local_Rel_Airmass( V_north_rel_airmass, // V_east_rel_airmass, V_down_rel_airmass ); // f.set_Velocities_Gust( U_gust, V_gust, W_gust ); - // f.set_Velocities_Wind_Body( U_body, V_body, W_body ); + f.set_Velocities_Wind_Body( U_body, V_body, W_body ); // f.set_V_rel_wind( V_rel_wind ); // f.set_V_true_kts( V_true_kts ); diff --git a/src/FDM/flight.hxx b/src/FDM/flight.hxx index fe238a11a..2e3d79394 100644 --- a/src/FDM/flight.hxx +++ b/src/FDM/flight.hxx @@ -447,15 +447,15 @@ public: FG_VECTOR_3 v_wind_body_v; // Wind-relative velocities in body axis // inline double * get_V_wind_body_v() { return v_wind_body_v; } - // inline double get_U_body() const { return v_wind_body_v[0]; } - // inline double get_V_body() const { return v_wind_body_v[1]; } - // inline double get_W_body() const { return v_wind_body_v[2]; } - /* inline void set_Velocities_Wind_Body( double u, double v, double w) + inline double get_U_body() const { return v_wind_body_v[0]; } + inline double get_V_body() const { return v_wind_body_v[1]; } + inline double get_W_body() const { return v_wind_body_v[2]; } + inline void set_Velocities_Wind_Body( double u, double v, double w) { v_wind_body_v[0] = u; v_wind_body_v[1] = v; v_wind_body_v[2] = w; - } */ + } double v_rel_wind, v_true_kts, v_rel_ground, v_inertial; double v_ground_speed, v_equiv, v_equiv_kts; diff --git a/src/GUI/gui.cxx b/src/GUI/gui.cxx index bd5d15764..fb4eb19ed 100644 --- a/src/GUI/gui.cxx +++ b/src/GUI/gui.cxx @@ -195,6 +195,7 @@ void guiMotionFunc ( int x, int y ) while (offset > full) { offset -= full; } + v->set_view_offset(offset); v->set_goal_view_offset(offset); } @@ -221,6 +222,7 @@ void guiMouseFunc(int button, int updown, int x, int y) case MOUSE_YOKE: break; case MOUSE_VIEW: + current_view.set_view_offset( 0.00 ); current_view.set_goal_view_offset( 0.00 ); break; } diff --git a/src/Main/fg_serial.cxx b/src/Main/fg_serial.cxx index fe65893fd..59fbb1735 100644 --- a/src/Main/fg_serial.cxx +++ b/src/Main/fg_serial.cxx @@ -529,7 +529,7 @@ static void send_rul_out( fgIOCHANNEL *p ) { // First bite: ASCII character "P" ( 0x50 or 80 decimal ) // Second byte: "roll" value (1-255) 1 being 0* and 255 being 359* // Third byte: "pitch" value (1-255) 1 being 0* and 255 being 359* -// Fourth byte: "heave" value (or forward acceleration) +// Fourth byte: "heave" value (or vertical acceleration?) // // So sending 80 127 127 to the two axis motors will position on 180* // The RS- 232 port is a nine pin connector and the only pins used are @@ -572,7 +572,7 @@ static void send_pve_out( fgIOCHANNEL *p ) { pitch_deg -= 360; } - int heave = (int)(f->get_U_dot_body() * 3.0); + int heave = (int)(f->get_W_body()); // scale roll and pitch to output format (1 - 255) // straight && level == (128, 128)