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

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I never use the yaw damper.. but will have a look  :cool:

Share this post


Link to post
Share on other sites
Posted (edited)

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

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) }

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

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

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

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!

Share this post


Link to post
Share on other sites
Posted (edited)

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

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!

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