• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Default Fly By Wire?

Heretic

Resource contributor
Messages
6,830
Country
germany
Has anyone ever investigated the default fly by wire functionality?

I'd like to know if there are any ways to improve or tweak it for a certain aircraft.

Because as-is, the system is simply junk for non-autopilot control. An empty A320 feels like a fully loaded 747 with broken control surfaces, especially in the pitch domain.
Not to mention the disconnect bug at 100 feet that does not allow you to flare and the awful stall protection behaviour which does not disconnect the TO/GA mode after recovery and simply keeps the throttle firewalled.

I understand what the real FBW is supposed to do and that flying an Airbus or F-16 or any other FBW aircraft feels different to flying a plane with direct (augmented) control surfaces, but what FSX presents as FBW is nowhere near usable.
 

Heretic

Resource contributor
Messages
6,830
Country
germany
This is a gauge to at least fix the stall protection bug. It will simply disconnect and reconnect the Spoilers and Elevator computer after a safe speed has been attained to restore throttle and elevator control.

Code:
<?xml version="1.0" encoding="UTF-8"?>

<SimBase.Document Type="AceXML" version="1,0">
  <Descr>AceXML Document</Descr>
  <Filename>A320_FWB.xml</Filename>
  <SimGauge.Gauge id="Gauge" ArtDirectory=".">
  <FloatPosition>0.000,0.000</FloatPosition>
  <Size>1,1</Size>
  <Update_When_Hidden>True</Update_When_Hidden> 
  <Update id="FBW Stuff">
  <Script>
  (A:Fly By Wire Alpha Protection,bool)
  (A:Airspeed select indicated or true, knots) 145 &gt; and
  (A:FLY BY WIRE SEC SWITCH:1, bool) and
  (L:FBW Alpha Recovery, bool) ! and
  if{ 1 (>K:FLY_BY_WIRE_SEC_TOGGLE) 1 (>L:FBW Alpha Recovery, bool) }
  
  (L:FBW Alpha Recovery, bool)
  (A:FLY BY WIRE SEC SWITCH:1, bool) ! and
  if{ 1 (>K:FLY_BY_WIRE_SEC_TOGGLE) }
  
  (L:FBW Alpha Recovery, bool)
  (A:Airspeed select indicated or true, knots) 150 &gt; and
  (A:FLY BY WIRE SEC SWITCH:1, bool) and
  if{ 0 (>L:FBW Alpha Recovery, bool) }
  </Script>
  </Update>  
  </SimGauge.Gauge>
</SimBase.Document>
 

Heretic

Resource contributor
Messages
6,830
Country
germany
Observations from flight tests with the default FBW in the default A321:

1. If all computers are switched off, there is no control authority at all.
2. The flight augmentation computer switches do not do anything in any of both modes (normal and direct)*.
3. Any of the ELAC and SEC computer switches is enough to enable direct control mode.
4. All three SEC computers and at least one ELAC computer is required for normal control mode.
5. Normal control mode takes control of the yaw damper, hence no rudder authority.

*Normal mode = sluggish, computer controlled, direct mode = direct input to control surfaces
 

cheangjc

Resource contributor
Messages
111
Country
singapore
I have, and its simply unusable from my experience no matter how many tweaks.

You would have much better luck implementing a custom FBW system if you ever need it, as it can be used as part of an custom autopilot if you are at that level.
 

Heretic

Resource contributor
Messages
6,830
Country
germany
I've tried coding a custom PID controller for FBW use, but realized too late that you need to disconnect joystick input from the control surfaces in order to achieve this.
Implementing FBW via autopilot is doable for the pitch domain at least, but there's no "bank hold" mode.

One other workaround that I've tested so far is auto-disconnecting one SEC computer below a certain altitude so that takeoffs and landings can be done in direct control mode without the hard handover from direct to normal at 100 feet. This would require an overhead panel tweak to turn the SEC1 toogle switch into a SEC1 arming switch.
 
Messages
240
Country
germany
can confirm your observations. In normal mode sluggish as hell, but in direct mode it almost feels like a fighter jet..

Apart from the single line in the cfg there apparently isn't anything you could do about it as the whole fbw stuff is in a dll.

Maybe this is of any help: http://talk.pafs.wf/viewtopic.php?t=2250
 

ollyau

Resource contributor
Messages
1,026
Country
us-california
I've tried coding a custom PID controller for FBW use, but realized too late that you need to disconnect joystick input from the control surfaces in order to achieve this.

You can do that in SimConnect by masking things like the AXIS_ELEVATOR_SET and AXIS_AILERON_SET events, but it's not exactly the most straightforward thing to do. It's how the FSX Blue Angels Hornet fly-by-wire FCS works, and probably what the program at the Project Airbus forum does as well.
 

Heretic

Resource contributor
Messages
6,830
Country
germany
*Bump*
Spent the last hours banging my head on the desk while trying to wrestle down the FBW. I think what I got in the end is an acceptable workaround.

Attitude hold after reenabling SEC1 is acceptable with minor deviation from the previous, manually held attitude.
Hitting a limiter will cause some ugly shuddering unless the stick is moved in the opposite direction or the plane falls back into the arena on its own.
Hands off recovery by the default AFLOOR function is also possible, but needs to be terminated manually by moving the stick.

Requires XMLTools for the limiters.

Code:
<Gauge Name="A32x FBW Fix" Version="1.0">
<!-- Fly By Wire Fix
Will disengage the default SEC mode to enable more direct aileron and elevator control when the stick is deflected.
When the stick is recentered, SEC will engage again and the plane will try to hold the last pitch and bank angle
Pitch and bank protection modes are implemented
-->
<Macro Name="FBWStickLimit">0.1</Macro><!-- SEC will disengage at this (absolute) stick deflection from center (default: 0.1 = 10%) -->
<Macro Name="FBWBankLimit">30</Macro><!-- Bank Limiter will engage at this bank angle -->
<Macro Name="FBWPitchLimitUp">30</Macro><!-- Pitch Limiter will engage at this upward pitch -->
<Macro Name="FBWPitchLimitDown">15</Macro><!-- Pitch Limiter will engage at this downward pitch -->
<!-- FLY BY WIRE FIX -->
<!-- FLY BY WIRE FIX -->
<!-- FLY BY WIRE FIX -->
<Element>
<Select>
<Value>
<!-- Track stick position -->
(A:YOKE X POSITION,position) abs (>G:Var1)
(A:YOKE Y POSITION,position) abs (>G:Var2)

<!-- Protection modes -->
(A:Autopilot Master,bool) ! if{
<!-- Bank protection. Monitors plane bank and freezes the bank angle at the limiter value, unless corrective action is taken  -->
(A:PLANE BANK DEGREES, radians) rddg abs @FBWBankLimit &gt; (L:A32x FBW Bank Protection, number) 0 == and
if{ 1 (>L:A32x FBW Bank Protection, number) }
(L:A32x FBW Bank Protection, number) 0 !=
if{ (A:PLANE BANK DEGREES, radians) rddg -@FBWBankLimit &lt; (A:YOKE X POSITION,position) 0 &gt; and if{ -@FBWBankLimit (>C:SIMVARS:PLANE BANK DEGREES, degrees) }
   (A:PLANE BANK DEGREES, radians) rddg @FBWBankLimit &gt; (A:YOKE X POSITION,position) 0 &lt; and if{ @FBWBankLimit (>C:SIMVARS:PLANE BANK DEGREES, degrees) }
   (A:PLANE BANK DEGREES, radians) rddg abs @FBWBankLimit &lt;
   (A:PLANE BANK DEGREES, radians) rddg -@FBWBankLimit &lt; (A:YOKE X POSITION,position) 0 &lt; and or
   (A:PLANE BANK DEGREES, radians) rddg @FBWBankLimit &gt; (A:YOKE X POSITION,position) 0 &gt; and or
   if{ 0 (>L:A32x FBW Bank Protection, number) } }

<!-- Pitch protection. Monitors plane pitch and freezes the bank angle at the respective limiter value, unless corrective action is taken -->
(A:PLANE PITCH DEGREES, radians) rddg @FBWPitchLimitDown &gt; if{ 1 (>L:A32x FBW Pitch Protection, number) }
(A:PLANE PITCH DEGREES, radians) rddg -@FBWPitchLimitUp &lt; if{ 2 (>L:A32x FBW Pitch Protection, number) }

(L:A32x FBW Pitch Protection, number) 1 == if{ @FBWPitchLimitDown (>C:SIMVARS:PLANE PITCH DEGREES, degrees) }
(L:A32x FBW Pitch Protection, number) 2 == if{ -@FBWPitchLimitUp (>C:SIMVARS:PLANE PITCH DEGREES, degrees) }

(L:A32x FBW Pitch Protection, number) 1 ==
(A:PLANE PITCH DEGREES, radians) rddg @FBWPitchLimitDown &lt; (A:YOKE Y POSITION,position) 0 &gt; or and if{ 0 (>L:A32x FBW Pitch Protection, number) }
(L:A32x FBW Pitch Protection, number) 2 ==
(A:PLANE PITCH DEGREES, radians) rddg -@FBWPitchLimitUp &gt; (A:YOKE Y POSITION,position) 0 &lt; or and if{ 0 (>L:A32x FBW Pitch Protection, number) }
}

(A:Sim On Ground,bool) ! if{
<!-- Disable SEC when stick is deflected or keeps on deflecting and bank and alpha values are within limits -->
(A:YOKE X POSITION,position) abs (G:Var1) !=
(A:YOKE Y POSITION,position) abs (G:Var2) != or
(A:YOKE X POSITION,position) abs @FBWStickLimit &gt; or
(A:YOKE Y POSITION,position) abs @FBWStickLimit &gt; or
(A:Fly By Wire Sec Switch:1,bool) and
if{ 1 (>K:FLY_BY_WIRE_SEC_TOGGLE) }

<!-- Reenable SEC switch if there's no more stick movement or bank or alpha limits have been exceeded -->
(A:YOKE X POSITION,position) abs (G:Var1) ==
(A:YOKE Y POSITION,position) abs (G:Var2) == and
(A:YOKE X POSITION,position) abs @FBWStickLimit &lt; and
(A:YOKE Y POSITION,position) abs @FBWStickLimit &lt; and
(A:Fly By Wire Sec Switch:1,bool) ! and
if{ 1 (>K:FLY_BY_WIRE_SEC_TOGGLE) }
}
</Value>
</Select>
</Element>
</Gauge>
 

Heretic

Resource contributor
Messages
6,830
Country
germany
Forget the above, this one is much more efficient and works much better near the edge of the envelope. The unified code block evaluates much better and SEC1 only disengages when it's supposed to.
XMLTools users also get a hard pitch and bank wall when even the FBW computer can't stop the aircraft from running outside the envelope.

Code:
<Gauge Name="A32x FBW Fix" Version="1.0">
<!-- Fly By Wire Fix
Will disengage the default SEC mode to enable more direct aileron and elevator control when the stick is deflected.
When the stick is recentered, SEC will engage again and the plane will try to hold the last pitch and bank angle
Pitch and bank protection modes are implemented
-->
<Macro Name="FBWStickLimit">0.1</Macro><!-- SEC will disengage at this (absolute) stick deflection from center (default: 0.1 = 10%) -->
<Macro Name="FBWBankLimit">30</Macro><!-- Bank Limiter will engage at this bank angle -->
<Macro Name="FBWPitchLimitUp">30</Macro><!-- Pitch Limiter will engage at this upward pitch -->
<Macro Name="FBWPitchLimitDown">15</Macro><!-- Pitch Limiter will engage at this downward pitch -->
<!-- FLY BY WIRE FIX -->
<!-- FLY BY WIRE FIX -->
<!-- FLY BY WIRE FIX -->
<Element>
<Select>
<Value>
<!-- Track stick position -->
(A:YOKE X POSITION,position) abs (>G:Var1)
(A:YOKE Y POSITION,position) abs (>G:Var2)

<!-- 
Yoke X: Deflect to right for a positive value
Yoke Y: Pull for positive value
Plane Bank: Positive when banking to the left
Plane Pitch: Positive when nose points down 
-->

<!-- Check for yoke deflection. If none, enable SEC1 if disabled.
If any, determine if plane is outside of envelope limits with control action that would put it farther out. Yes: Enable SEC1, if disabled and implement hard stops by blocking any further pitch or bank at limit value + 5. No: Disable SEC1, if enabled. -->
(A:YOKE X POSITION,position) abs (G:Var1) !=
(A:YOKE Y POSITION,position) abs (G:Var2) != or
(A:YOKE X POSITION,position) abs @FBWStickLimit &gt; or
(A:YOKE Y POSITION,position) abs @FBWStickLimit &gt; or
if{ (A:PLANE BANK DEGREES, radians) rddg -@FBWBankLimit &lt; (A:YOKE X POSITION,position) 0 &gt; and
   (A:PLANE BANK DEGREES, radians) rddg @FBWBankLimit &gt; (A:YOKE X POSITION,position) 0 &lt; and or
   (A:PLANE PITCH DEGREES, radians) rddg -@FBWPitchLimitUp &lt; (A:YOKE Y POSITION,position) 0 &gt; and or
   (A:PLANE PITCH DEGREES, radians) rddg @FBWPitchLimitDown &gt; (A:YOKE Y POSITION,position) 0 &lt; and or
   if{ (A:Fly By Wire Sec Switch:1,bool) ! if{ 1 (>K:FLY_BY_WIRE_SEC_TOGGLE) }
   (A:PLANE BANK DEGREES, radians) rddg -@FBWBankLimit 5 - &lt; if{ -@FBWBankLimit 5 - (>C:SIMVARS:PLANE BANK DEGREES, degrees) }
   (A:PLANE BANK DEGREES, radians) rddg @FBWBankLimit 5 + &gt; if{ @FBWBankLimit 5 + (>C:SIMVARS:PLANE BANK DEGREES, degrees) }
   (A:PLANE PITCH DEGREES, radians) rddg -@FBWPitchLimitUp 5 - &lt; if{ -@FBWPitchLimitUp 5 - (>C:SIMVARS:PLANE PITCH DEGREES, degrees) }
   (A:PLANE PITCH DEGREES, radians) rddg @FBWPitchLimitDown 5 + &gt; if{ @FBWPitchLimitDown 5 + (>C:SIMVARS:PLANE PITCH DEGREES, degrees) } }
   els{ (A:Fly By Wire Sec Switch:1,bool) if{ 1 (>K:FLY_BY_WIRE_SEC_TOGGLE) } } }
els{ (A:Fly By Wire Sec Switch:1,bool) ! if{ 1 (>K:FLY_BY_WIRE_SEC_TOGGLE) } }
</Value>
</Select>
</Element>
</Gauge>
 
Messages
35
Country
argentina
Forget the above, this one is much more efficient and works much better near the edge of the envelope. The unified code block evaluates much better and SEC1 only disengages when it's supposed to.

XMLTools users also get a hard pitch and bank wall when even the FBW computer can't stop the aircraft from running outside the envelope.

Sorry for necroing, but I wanna say "thank you very much", Heretic: I was able to add FBW for the CLS Airbus (A330/A340/A340 NG) in FS9, using a method similar to what Project Airbus used for their A380 (luckily, both use Ken Mitchell gauges). However, with your code, adding FBW to the CLS Buses (in FSX, of course), is a lot easier. I've just copied, pasted, and saved it, and then added a line that disarmed Autothrust at 100 ft AGL if it was still armed. No variable changes required at all, and I can disengage autopilot with my joystick :)

in direct mode it almost feels like a fighter jet..

Well, it happens because the MS A321 (and the PA A380) have too much control authority (i.e., elevators and ailerons in Aircraft.cfg too big for the PA plane, or very small inertias for the MS A321 in the CFG). CLS Airbus'control authority is lower, I had to change this:

Code:
[flight_tuning]
elevator_effectiveness=3.0//1.500
aileron_effectiveness=3.0//1.500
pitch_stability=2.0//1.500
roll_stability=2.0//1.000

I had to modify stability because I did not like the oscillations I got while testing. But well, now my Airbus flies more like an Airbus than a Boeing (based on the need for trimming) :):cool: Now to control the thrust levers...
 
Last edited:

Heretic

Resource contributor
Messages
6,830
Country
germany
Thanks for the kind words.

You do mean FSX instead of FS9, right?
FS9, AFAIR, doesn't have a fly by wire implementation.
 
Messages
113
Country
unitedstates
No, there's not, AFAIK.
Having said that, there's a third-party add-on you can use to simulate FBW in FS9, and in my experience, it works pretty well. It's not perfect, but it's decent, especially for the tubes. Not for the fighter jets.
Anyway, it's freeware, called easyFBW by the Stall Flyers Design Team . I found it on Avsim. File name is easyfbw.zip , if you're interested.
It has a .cfg file you can use to fine tune it for an individual plane, but the main program file is a .EXE type file.

Hope this is some help...
Pat☺
 

Heretic

Resource contributor
Messages
6,830
Country
germany
This should also work in FSX. Might be a more organic way to implement FBW other than my gauge based override.
 

gfxpilot

Resource contributor
Messages
370
Country
unitedkingdom
Here's one of the updates for the 321. The aircraft config file was updated because we suffered the zero to wrap speed on take off with hardly any throttle open. It also adjusted some of t he dynamics as well to make the a.c. More in keeping with the real life effect.
See if this is something in line with what you are looking for
I've used it to a great effect and it's made handling more positive

https://flyawaysimulation.com/downloads/files/3215/fsx-default-a321-fixes-and-new-sounds/
 

Heretic

Resource contributor
Messages
6,830
Country
germany
Here's one of the updates for the 321. The aircraft config file was updated because we suffered the zero to wrap speed on take off with hardly any throttle open. It also adjusted some of t he dynamics as well to make the a.c. More in keeping with the real life effect.
See if this is something in line with what you are looking for
I've used it to a great effect and it's made handling more positive

https://flyawaysimulation.com/downloads/files/3215/fsx-default-a321-fixes-and-new-sounds/

That doesn't deal with any improvements to the FBW system.
 
Messages
35
Country
argentina
Thanks for the kind words.

You do mean FSX instead of FS9, right?
FS9, AFAIR, doesn't have a fly by wire implementation.

You're welcome, Heretic. I did it for both sims:
- FS9: I ported the Project Airbus A380 FBW system into the CLS Airbus. I had to change some autopilot variables for allowing this to happen.
- FSX: I used your method. I did nothing else to the autopilot.

Does EasyFBW work in anything other than Windows XP? I tried it in Win7 and Win10 (both 64-bit), all I got were stuck elevators...
 
Messages
113
Country
unitedstates
Does EasyFBW work in anything other than Windows XP? I tried it in Win7 and Win10 (both 64-bit), all I got were stuck elevators...
Well, I use Win7 Home Pro (64 bit), and it works fine on mine.
Did you try changing the config file for it? Did you install it as the Readme says, exactly?
I know there's a trick to the whole stuck elevator problem, but I'll be darned if I recall what it is, drat it.

I never fly tubes, and mostly in FSX since SE came out, and it's worked so well I haven't had to mess with it in so long, I don't recall the little tricks it has...
Wish I could be more help...
Pat☺
 
Messages
113
Country
unitedstates
Certainly!
No really huge changes on my system. It just...worked.
Hope this helps, somehow. I diddled with it for a short time, but, as I say, it just worked "out of the box", as they say.
Pat☺
 

Attachments

  • FBW Cfg.txt
    145 bytes · Views: 464
Top