Jump to content
Sign in to follow this  
zazaboeing

Yaw Damper

Recommended Posts

Hi guys!

Has anyone noticed the yaw damper switch animation sometimes doesn't correlate in Virtual Cockpit x 2d Panel? And to add it to the confusion, sometimes it's ON when the switch is OFF and vice versa.

Using Ctrl + D shortcut activates and deactivates the YD correctly, but that doesn't mean the switch will position agrees with the system status.

Maybe a mission to @Bert Pieke ?? 😬

 

Regards,

Rafael


___________________________________________________

Rafael Henrique Carelli

Share this post


Link to post
Share on other sites

Yes, there is a bug in the AP code.

I have sent the code to Carenado and hopefully they will include it a future update.

I am looking for a simple fix.. but not sure how to unravel their logic..

If you want to use CTRL-D, the switch as coded does not follow in the VC.. and if you turn off the yaw damper, using the switch, the yaw damper is not actually turned off..

If I come up with a work around, I'll post it here..

Edit: The Yaw Damper is presently a dummy.

As best I can tell, the actual YD is never switched on, and CTRL-D has no effect..

 

Edited by Bert Pieke

Bert

Share this post


Link to post
Share on other sites

OK, without hex editing the model file, the YD cannot operate using both the switches and the CTRL-D shortcut.

So, if you are OK with using only one method:

1. First enable the YD in the aircraft.cfg file:   yaw_damper_gain=              1.0  // was 0

2. To have the switches as master:

Add to an update section:

(L:ASD_C421_SWITCH_YAW_DUMBER,number) (A:AUTOPILOT YAW DAMPER,BOOL) != if{
(>K:YAW_DAMPER_TOGGLE) }

2. To have CTRL-D as master:

Add to an update section:

(L:ASD_C421_SWITCH_YAW_DUMBER,number) (A:AUTOPILOT YAW DAMPER,BOOL) != if{
(A:AUTOPILOT YAW DAMPER,BOOL) (>L:ASD_C421_SWITCH_YAW_DUMBER,number) }

 

 


Bert

Share this post


Link to post
Share on other sites

Now, for the intrepid amongst us.. here is the complete fix:

Open up the interior model file that you are using and search for "damper"

Note: DO NOT insert or delete any characters, only replace, and keep a backup.. it is easy to crash the model file!

If you find this:

...(L:ASD_C421_SWITCH_YAW_DUMBER,........number)  0 ==.......if{ ........1 (>........L:ASD_C421_SWITCH_YAW_DUMBER,number)........ ........(A:AUTOPILOT YAW DAMPER,BOO........L) 0 == if{ (>K:YAW_DAMPER_ON) }...............} .......els{  ........0 (>L:ASD_........C421_SWITCH_YAW_DUMBER,number)................(A:AUTOPILOT YAW DAMPER,BOOL) 0 !=........ if{ (>K:YAW_DAMPER_ON) }........}.

change it to:

.....els{  ........0 (>L:ASD_........C421_SWITCH_YAW_DUMBER,number)................(A:AUTOPILOT YAW DAMPER,BOOL) 0 !=........ if{ 1 (>L:YD_OFF,bool) }........}.

Then add this code to an update section:

<!-- Synchronize YD settings between switches and CTRL-D engagement -->

(L:YD_OFF,bool) if{ (&gt;K:YAW_DAMPER_OFF) 0 (&gt;L:YD_OFF,bool) }

(L:ASD_C421_SWITCH_YAW_DUMBER,number) (A:AUTOPILOT YAW DAMPER,BOOL) != if{
(L:YD_OUT_OF_SYNCH,number) ++ (>L:YD_OUT_OF_SYNCH,number) }
(L:YD_OUT_OF_SYNCH,number) 1 &gt; if{
(A:AUTOPILOT YAW DAMPER,BOOL) (>L:ASD_C421_SWITCH_YAW_DUMBER,number)
0 (>L:YD_OUT_OF_SYNCH,number) }

Now you can use the switches or CTRL-D at will  :cool:

Edited by Bert Pieke
  • Like 1

Bert

Share this post


Link to post
Share on other sites
25 minutes ago, Bert Pieke said:

Now, for the intrepid amongst us.. here is the complete fix:

Open up the interior model file that you are using and search for "damper"

Note: DO NOT insert or delete any characters, only replace, and keep a backup.. it is easy to crash the model file!

If you find this:

...(L:ASD_C421_SWITCH_YAW_DUMBER,........number)  0 ==.......if{ ........1 (>........L:ASD_C421_SWITCH_YAW_DUMBER,number)........ ........(A:AUTOPILOT YAW DAMPER,BOO........L) 0 == if{ (>K:YAW_DAMPER_ON) }...............} .......els{  ........0 (>L:ASD_........C421_SWITCH_YAW_DUMBER,number)................(A:AUTOPILOT YAW DAMPER,BOOL) 0 !=........ if{ (>K:YAW_DAMPER_ON) }........}.

change it to:

.....els{  ........0 (>L:ASD_........C421_SWITCH_YAW_DUMBER,number)................(A:AUTOPILOT YAW DAMPER,BOOL) 0 !=........ if{ 1 (>L:YD_OFF,bool) }........}.

Then add this code to an update section:

<!-- Synchronize YD settings between switches and CTRL-D engagement -->

(L:YD_OFF,bool) if{ (&gt;K:YAW_DAMPER_OFF) 0 (&gt;L:YD_OFF,bool) }

(L:ASD_C421_SWITCH_YAW_DUMBER,number) (A:AUTOPILOT YAW DAMPER,BOOL) != if{
(L:YD_OUT_OF_SYNCH,number) ++ (>L:YD_OUT_OF_SYNCH,number) }
(L:YD_OUT_OF_SYNCH,number) 1 &gt; if{
(A:AUTOPILOT YAW DAMPER,BOOL) (>L:ASD_C421_SWITCH_YAW_DUMBER,number)
0 (>L:YD_OUT_OF_SYNCH,number) }

Now you can use the switches or CTRL-D at will  :cool:

Bert, you're a genius!! I will certainly try this one and post back the results!

The whole FS community is always thankful to you!

 

Best regards,

 

Rafael


___________________________________________________

Rafael Henrique Carelli

Share this post


Link to post
Share on other sites
2 hours ago, Bert Pieke said:

If you find this:

...(L:ASD_C421_SWITCH_YAW_DUMBER,........number)  0 ==.......if{ ........1 (>........L:ASD_C421_SWITCH_YAW_DUMBER,number)........ ........(A:AUTOPILOT YAW DAMPER,BOO........L) 0 == if{ (>K:YAW_DAMPER_ON) }...............} .......els{  ........0 (>L:ASD_........C421_SWITCH_YAW_DUMBER,number)................(A:AUTOPILOT YAW DAMPER,BOOL) 0 !=........ if{ (>K:YAW_DAMPER_ON) }........}.

change it to:

.....els{  ........0 (>L:ASD_........C421_SWITCH_YAW_DUMBER,number)................(A:AUTOPILOT YAW DAMPER,BOOL) 0 !=........ if{ 1 (>L:YD_OFF,bool) }........}.

You mean change the whole upper section for this lower one? This will decrease the file size (characters) is that correct? Or just change from els on?

2 hours ago, Bert Pieke said:

Then add this code to an update section:

<!-- Synchronize YD settings between switches and CTRL-D engagement -->

(L:YD_OFF,bool) if{ (&gt;K:YAW_DAMPER_OFF) 0 (&gt;L:YD_OFF,bool) }

(L:ASD_C421_SWITCH_YAW_DUMBER,number) (A:AUTOPILOT YAW DAMPER,BOOL) != if{
(L:YD_OUT_OF_SYNCH,number) ++ (>L:YD_OUT_OF_SYNCH,number) }
(L:YD_OUT_OF_SYNCH,number) 1 &gt; if{
(A:AUTOPILOT YAW DAMPER,BOOL) (>L:ASD_C421_SWITCH_YAW_DUMBER,number)
0 (>L:YD_OUT_OF_SYNCH,number) }

Where do I add this? To the interior MDL file (where?) or create an xml gauge?

Thanks once again Bert!


___________________________________________________

Rafael Henrique Carelli

Share this post


Link to post
Share on other sites

In the interior model file, you are only changing the last bit..

(>K:YAW_DAMPER_ON)  becomes  1 (>L:YD_OFF,bool)

same number of characters.

(>K:YAW_DAMPER_OFF)  does not fit (unfortunately..)

 

BTW, you also need to make the identical change to the popup autopilot  (Gauge_AUTOPILOT_C421).

 

The xml code gets added to an update section in an existing or new gauge, your choice.

Send me a PM with your email address and I can send you the new panel folder.

The model file is too big to send via email.. hence the hex editing at your end.

Edited by Bert Pieke

Bert

Share this post


Link to post
Share on other sites

Managed to make it work now Bert, although the airplane still too "yaw unstable" to my liking, it's working beautifully!

Thanks a lot again!


___________________________________________________

Rafael Henrique Carelli

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...