Jump to content
Sign in to follow this  
Seat*

"10-degree heading bug" and the ability to use scripts for C

Recommended Posts

I used your excellent tip to get rid of "10-degree heading bug. I used the script you suggested and it worked great. Thanks for that.
(A: AUTOPILOT HEADING LOCK DIR, Degrees) 1 + (> K: HEADING_BUG_SET)

(A: AUTOPILOT HEADING LOCK DIR, Degrees) 0 == if {359} els {(A: AUTOPILOT HEADING LOCK DIR, Degrees) 1 -} (> K: HEADING_BUG_SET)
My question now is if a similar script could be used to change the HSI course in 1 step instead of 10 as now. If possible, what would such a script look like?

 

/thomas


Thomas ( Sundsvall, ESNN, Sweden)
P3D V5.3 HF1, Intel 9 9900K Oc 5 GHZ 16MB, Corsair Hydro H150i PRO RGB 360mm, ASUS GeForce RTX 2080 SUPER 8GB ROG, 2 Corsair Force M2 MP600 1TB+500Gb, ASUS ROG MAXIMUS XI HERO Z390 MB, Corsair 32GB (2x16GB) DDR4 3200Mhz CL16, Fractal Design Define S2 Vision, Win 10 Home, BenQ 32" PD3200U 4K IPS monitor

A2A, Majestic Q400, Leonardo Maddog, IFly B737

Share this post


Link to post
Share on other sites

Hello Thomas,

those scripts were too complicated. They can be shortened to this (dnor makes sure that the value stays in the 0-360 degree range):

(A:AUTOPILOT HEADING LOCK DIR, Degrees) 1 + dnor (>K:HEADING_BUG_SET)

(A:AUTOPILOT HEADING LOCK DIR, Degrees) 1 - dnor (>K:HEADING_BUG_SET)

and for the course:

(A:NAV1 OBS, Degrees) 1 + dnor (>K:VOR1_SET)

(A:NAV1 OBS, Degrees) 1 - dnor (>K:VOR1_SET)

I hope these are correct. When in doubt, take a look into the Event-IDs and Simulator Variables of the SDK documentation, it's all in there. Any SDK doc will do for these basic events, even the one from FSX.

 

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post
Share on other sites

Thank you, works without problems.

 

/Thomas


Thomas ( Sundsvall, ESNN, Sweden)
P3D V5.3 HF1, Intel 9 9900K Oc 5 GHZ 16MB, Corsair Hydro H150i PRO RGB 360mm, ASUS GeForce RTX 2080 SUPER 8GB ROG, 2 Corsair Force M2 MP600 1TB+500Gb, ASUS ROG MAXIMUS XI HERO Z390 MB, Corsair 32GB (2x16GB) DDR4 3200Mhz CL16, Fractal Design Define S2 Vision, Win 10 Home, BenQ 32" PD3200U 4K IPS monitor

A2A, Majestic Q400, Leonardo Maddog, IFly B737

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...