From: david Date: Mon, 4 Mar 2002 01:28:17 +0000 (+0000) Subject: Add fake control-surface positions for 3D model animation. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f75e1b4d7b67b4ec3aef12704e52b397b88730f8;p=flightgear.git Add fake control-surface positions for 3D model animation. --- diff --git a/src/FDM/LaRCsim.cxx b/src/FDM/LaRCsim.cxx index 9d70641cb..54e948b17 100644 --- a/src/FDM/LaRCsim.cxx +++ b/src/FDM/LaRCsim.cxx @@ -102,6 +102,22 @@ void FGLaRCsim::update( int multiloop ) { // update engine model eng.update(); + // Fake control-surface positions + fgSetDouble("/surface-positions/flap-pos-norm", + fgGetDouble("/controls/flaps")); + // FIXME: ignoring trim + fgSetDouble("/surface-positions/elevator-pos-norm", + fgGetDouble("/controls/elevator")); + // FIXME: ignoring trim + fgSetDouble("/surface-positions/left-aileron-pos-norm", + fgGetDouble("/controls/aileron")); + // FIXME: ignoring trim + fgSetDouble("/surface-positions/right-aileron-pos-norm", + -1 * fgGetDouble("/controls/aileron")); + // FIXME: ignoring trim + fgSetDouble("/surface-positions/rudder-pos-norm", + fgGetDouble("/controls/rudder")); + // copy engine state values onto "bus" fgSetDouble("/engines/engine/rpm", eng.get_RPM()); fgSetDouble("/engines/engine/mp-osi", eng.get_Manifold_Pressure());