From 5c99b9308c41f0e648f79c262b36e5feaaa9bf85 Mon Sep 17 00:00:00 2001 From: mselig Date: Thu, 22 May 2003 04:34:27 +0000 Subject: [PATCH] Updates to properties for uiuc aircraft --- src/FDM/LaRCsim/LaRCsim.cxx | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/FDM/LaRCsim/LaRCsim.cxx b/src/FDM/LaRCsim/LaRCsim.cxx index 32da763b5..ee90b79ec 100644 --- a/src/FDM/LaRCsim/LaRCsim.cxx +++ b/src/FDM/LaRCsim/LaRCsim.cxx @@ -223,10 +223,10 @@ void FGLaRCsim::update( double dt ) { if ( !strcmp(aero->getStringValue(), "uiuc")) { // surface positions - fgSetDouble("/surface-positions/rudder-pos-norm", fgGetDouble("/controls/flight/rudder")); - fgSetDouble("/surface-positions/elevator-pos-norm", fgGetDouble("/controls/flight/elevator")); // FIXME: ignoring trim - fgSetDouble("/surface-positions/right-aileron-pos-norm", -1 * fgGetDouble("/controls/flight/aileron")); // FIXME: ignoring trim - fgSetDouble("/surface-positions/left-aileron-pos-norm", fgGetDouble("/controls/flight/aileron")); // FIXME: ignoring trim + fgSetDouble("/surface-positions/flight/rudder-pos-norm", fgGetDouble("/controls/flight/rudder")); + fgSetDouble("/surface-positions/flight/elevator-pos-norm", fgGetDouble("/controls/flight/elevator")); // FIXME: ignoring trim + fgSetDouble("/surface-positions/flight/right-aileron-pos-norm", -1 * fgGetDouble("/controls/flight/aileron")); // FIXME: ignoring trim + fgSetDouble("/surface-positions/flight/left-aileron-pos-norm", fgGetDouble("/controls/flight/aileron")); // FIXME: ignoring trim Flap_handle = flap_max * globals->get_controls()->get_flaps(); @@ -237,11 +237,11 @@ void FGLaRCsim::update( double dt ) { // spoilers with transition occurring in uiuc_aerodeflections.cpp if(use_spoilers) { - Spoiler_handle = spoiler_max * fgGetDouble("/controls/spoilers"); + Spoiler_handle = spoiler_max * fgGetDouble("/controls/flight/spoilers"); } // gear with transition occurring here in LaRCsim.cxx if (use_gear) { - if(fgGetBool("/controls/gear-down")) { + if(fgGetBool("/controls/gear/gear-down")) { Gear_handle = 1.0; } else { @@ -287,24 +287,19 @@ void FGLaRCsim::update( double dt ) { else if ( !strcmp(uiuc_type->getStringValue(), "uiuc-sailplane")) { // uiuc sailplane, e.g. asw20 fgSetDouble("/engines/engine/cranking", 0); - // set the wind speed for use in setting wind sound level - fgSetDouble("/velocities/V_rel_wind_kts", (V_rel_wind * 1.274)); } else if ( !strcmp(uiuc_type->getStringValue(), "uiuc-hangglider")) { - // uiuc sailplane, e.g. asw20 + // uiuc hang glider, e.g. airwave fgSetDouble("/engines/engine/cranking", 0); } else if ( !strcmp(uiuc_type->getStringValue(), "uiuc-ornithopter")) { - // mechanical flapping wings - // flapping wings (using seahawk for now) + // flapping wings fgSetDouble("/canopy/position-norm", 0); fgSetDouble("/wing-phase/position-norm", sin(flapper_phi - 3 * LS_PI / 2)); - // fgSetDouble("/wing-phase/position-norm", fgGetDouble("/controls/rudder")); fgSetDouble("/wing-phase/position-deg", flapper_phi*RAD_TO_DEG); fgSetDouble("/wing-phase/position-one", 1); fgSetDouble("/thorax/volume", 0); fgSetDouble("/thorax/rpm", 0); - // fgSetDouble("/wing-phase/position-norm", ((1+cos(flapper_phi - LS_PI/2))/2 -.36 )); // fgSetDouble("/thorax/volume", ((1+sin(2*(flapper_phi+LS_PI)))/2)); // fgSetDouble("/thorax/rpm", ((1+sin(2*(flapper_phi+LS_PI)))/2)); } @@ -314,14 +309,14 @@ void FGLaRCsim::update( double dt ) { // add Gamma_horiz_deg to properties, mss 021213 if (use_gamma_horiz_on_speed) { if (V_rel_wind > gamma_horiz_on_speed) { - fgSetDouble("/orientation/Gamma_horiz_deg", (Gamma_horiz_rad * RAD_TO_DEG)); + fgSetDouble("/orientation/gamma-horiz-deg", (Gamma_horiz_rad * RAD_TO_DEG)); } else { - fgSetDouble("/orientation/Gamma_horiz_deg", fgGetDouble("/orientation/heading-deg")); + fgSetDouble("/orientation/gamma-horiz-deg", fgGetDouble("/orientation/heading-deg")); } } else { - fgSetDouble("/orientation/Gamma_horiz_deg", fgGetDouble("/orientation/heading-deg")); + fgSetDouble("/orientation/gamma-horiz-deg", fgGetDouble("/orientation/heading-deg")); } ls_update(multiloop);