PVE serial output tweaks.
Other minor tweaks.
This commit is contained in:
parent
cea7b4b335
commit
26193c5b19
6 changed files with 12 additions and 10 deletions
|
@ -1063,7 +1063,7 @@ void fgAPInit( fgAIRCRAFT *current_aircraft ) {
|
||||||
|
|
||||||
// Hardwired for now should be in options
|
// Hardwired for now should be in options
|
||||||
// 25% max control variablilty 0.5 / 2.0
|
// 25% max control variablilty 0.5 / 2.0
|
||||||
APData->disengage_threshold = 0.5;
|
APData->disengage_threshold = 1.0;
|
||||||
|
|
||||||
#if !defined( USING_SLIDER_CLASS )
|
#if !defined( USING_SLIDER_CLASS )
|
||||||
MaxRollAdjust = 2 * APData->MaxRoll;
|
MaxRollAdjust = 2 * APData->MaxRoll;
|
||||||
|
|
|
@ -580,7 +580,7 @@ void FGTexInstrument::UpdatePointer(void){
|
||||||
if (alpha < alpha1)
|
if (alpha < alpha1)
|
||||||
alpha = alpha1;
|
alpha = alpha1;
|
||||||
if (alpha > alpha2)
|
if (alpha > alpha2)
|
||||||
alpha = alpha2;
|
alpha -= alpha2;
|
||||||
xglMatrixMode(GL_MODELVIEW);
|
xglMatrixMode(GL_MODELVIEW);
|
||||||
xglPushMatrix();
|
xglPushMatrix();
|
||||||
xglLoadIdentity();
|
xglLoadIdentity();
|
||||||
|
|
|
@ -305,7 +305,7 @@ int fgLaRCsim_2_FGInterface (FGInterface& f) {
|
||||||
// f.set_Velocities_Local_Rel_Airmass( V_north_rel_airmass,
|
// f.set_Velocities_Local_Rel_Airmass( V_north_rel_airmass,
|
||||||
// V_east_rel_airmass, V_down_rel_airmass );
|
// V_east_rel_airmass, V_down_rel_airmass );
|
||||||
// f.set_Velocities_Gust( U_gust, V_gust, W_gust );
|
// 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_rel_wind( V_rel_wind );
|
||||||
// f.set_V_true_kts( V_true_kts );
|
// f.set_V_true_kts( V_true_kts );
|
||||||
|
|
|
@ -447,15 +447,15 @@ public:
|
||||||
|
|
||||||
FG_VECTOR_3 v_wind_body_v; // Wind-relative velocities in body axis
|
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_V_wind_body_v() { return v_wind_body_v; }
|
||||||
// inline double get_U_body() const { return v_wind_body_v[0]; }
|
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_V_body() const { return v_wind_body_v[1]; }
|
||||||
// inline double get_W_body() const { return v_wind_body_v[2]; }
|
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 void set_Velocities_Wind_Body( double u, double v, double w)
|
||||||
{
|
{
|
||||||
v_wind_body_v[0] = u;
|
v_wind_body_v[0] = u;
|
||||||
v_wind_body_v[1] = v;
|
v_wind_body_v[1] = v;
|
||||||
v_wind_body_v[2] = w;
|
v_wind_body_v[2] = w;
|
||||||
} */
|
}
|
||||||
|
|
||||||
double v_rel_wind, v_true_kts, v_rel_ground, v_inertial;
|
double v_rel_wind, v_true_kts, v_rel_ground, v_inertial;
|
||||||
double v_ground_speed, v_equiv, v_equiv_kts;
|
double v_ground_speed, v_equiv, v_equiv_kts;
|
||||||
|
|
|
@ -195,6 +195,7 @@ void guiMotionFunc ( int x, int y )
|
||||||
while (offset > full) {
|
while (offset > full) {
|
||||||
offset -= full;
|
offset -= full;
|
||||||
}
|
}
|
||||||
|
v->set_view_offset(offset);
|
||||||
v->set_goal_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:
|
case MOUSE_YOKE:
|
||||||
break;
|
break;
|
||||||
case MOUSE_VIEW:
|
case MOUSE_VIEW:
|
||||||
|
current_view.set_view_offset( 0.00 );
|
||||||
current_view.set_goal_view_offset( 0.00 );
|
current_view.set_goal_view_offset( 0.00 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -529,7 +529,7 @@ static void send_rul_out( fgIOCHANNEL *p ) {
|
||||||
// First bite: ASCII character "P" ( 0x50 or 80 decimal )
|
// First bite: ASCII character "P" ( 0x50 or 80 decimal )
|
||||||
// Second byte: "roll" value (1-255) 1 being 0* and 255 being 359*
|
// 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*
|
// 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*
|
// 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
|
// 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;
|
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)
|
// scale roll and pitch to output format (1 - 255)
|
||||||
// straight && level == (128, 128)
|
// straight && level == (128, 128)
|
||||||
|
|
Loading…
Add table
Reference in a new issue