Board index FlightGear Development Aircraft

AW159 Wildcat update

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: AW159 Wildcat update

Postby Warty » Sun Aug 02, 2020 8:06 pm

This seems to be getting very complicated. I can stabilise most helicopters with a variation on these two simple routines:
Code: Select all
# -------------------------------------------- ALTITUDE damping
var altRate = getprop("/velocities/vertical-speed-fps");
var currentThrottle = getprop("/controls/engines/engine[0]/throttle");   
setprop("/controls/engines/engine[0]/throttle",
currentThrottle + (altRate) * 0.0005);
      
# ------------------------------------------------- YAW damping
if (60 >= getprop("/velocities/groundspeed-kt") ){
   setprop("/autopilot/locks/heading", "");
   var yawRate = getprop("/orientation/yaw-rate-degps");
   speedFactorRudder =  ((60 - getprop("/velocities/groundspeed-kt"))/60);
   var rudderCorrection = -0.2*(yawRate)*speedFactorRudder;
   setprop("/controls/flight/rudder", rudderCorrection );
}

User avatar
Warty
 
Posts: 267
Joined: Sun Mar 29, 2015 6:53 pm
Location: Spain
Callsign: Warty
Version: 2018.3.5
OS: Mac OSX

Re: AW159 Wildcat update

Postby wlbragg » Sun Aug 02, 2020 9:15 pm

Nice, I'm working on a YAW trim button and trim knob for the AFCS. The AirCrane documentation I have doesn't go into detail as to exactly how they work. My questions are, do they act as a hold when the YAW button is pressed and then when you turn the YAW knob it adjusts from there. Or does the YAW button activate the trim knob and it could potentially start trimming if the YAW knob has any previously ticks set?
If I can get all this to work under the fgdata FCS-AFCS nasal space I will add it to fgdata so it can be accessed by any YASim FDM copter.

I was able to modify the WIldcat's altitude hold by passing the BAR hold button and /position/altitude-ft so it holds the current altitude when you press the BAR hold button. So that is a big plus for me, thanks Stuart.

Next I'm going to try to convert that to barometric pressure.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5769
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Previous

Return to Aircraft

Who is online

Users browsing this forum: AhrefsBot [Bot] and 3 guests