From f75e1b4d7b67b4ec3aef12704e52b397b88730f8 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 4 Mar 2002 01:28:17 +0000 Subject: [PATCH] Add fake control-surface positions for 3D model animation. --- src/FDM/LaRCsim.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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());