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 9: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: 378
Joined: Sun Mar 29, 2015 7:53 pm
Location: Spain
Callsign: Warty
Version: 2020.4.0
OS: Mac OS 13

Re: AW159 Wildcat update

Postby wlbragg » Sun Aug 02, 2020 10: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 and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Previous

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 2 guests