Jump to content
Sign in to follow this  

Recommended Posts

Hello guru's , I would like a little help with a Nav (or VOR) auto tune XML gauge for FS9.First on my pedestal I have : (A:Circuit general panel on, bool) (L:AUTO, bool) ! and%((@c:NearestVorCurrentFrequency,MHz) 100 * near d 100 div)%!03d!.%(100 %)%!02d!...plus a normal radio: (A:Circuit general panel on, bool)%((A:NAV1 ACTIVE FREQUENCY, MHz) abs)%!4.2f!Now for the RMI DME's one can use %((@c:NearestVorCurrentDistance,nmiles))%!4.1f!%but my problem is : the VOR needle indicators....what to use for them?At present for NAV1 I use : (L:nav1needle, bool) 0 == if{ (A:NAV1 Radial,radians) (A:Plane heading degrees gyro,radians) - pi 2 / + } els{ (A:ADF1 Radial,radians) pi 2 / - } It would be nice if something like this worked but it doesn't: C:fs9gps(A:GPS POSITION LAT, Radians) (>@c:NearestVorCurrentLatitude, Radians) (A:GPS POSITION LON, Radians) (>@c:NearestVorCurrentLongitude, Radians) 9 (>@c:NearestVorMaximumItems) 200 (>@c:NearestVorMaximumDistance, NMiles) 0 (>@c:NearestVorCurrentLine)(L:n1needle, bool) 0 == if{ (@c:NearestVorCurrent,radians) (A:Plane heading degrees gyro,radians) - pi 2 / + } els{ (A:ADF1 Radial,radians) pi 2 / - } I did find this post but could not get it to work.http://forums.avsim.net/dcboard.php?az=sho...ing_type=searchregardsEd

Share this post


Link to post
Share on other sites

Hi Ed Here is my working gauge (with help from Tom & Jan) C:fs9gpsC:fs9gps(A:GPS WP NEXT LAT, Radians) (>@c:NearestVorCurrentLatitude, Radians) (A:GPS WP NEXT LON, Radians) (>@c:NearestVorCurrentLongitude, Radians) 1 (>@c:NearestVorMaximumItems) 50 (>@c:NearestVorMaximumDistance, NMiles)3 sp0 :0 l0 d (>@c:NearestVorRemoveVorType) ++ s0 6 <= if{ g0 }(A:GPS WP NEXT LAT, Radians) (>@c:NearestNdbCurrentLatitude, Radians) (A:GPS WP NEXT LON, Radians) (>@c:NearestNdbCurrentLongitude, Radians) 1 (>@c:NearestNdbMaximumItems) 100 (>@c:NearestNdbMaximumDistance, NMiles)(P:Absolute time, seconds) (L:Navtune, seconds) > if{ 0 (>L:AutoTune, bool) }(L:AutoTuneSwitch, bool) (A:GPS WP DISTANCE, nmiles) 4 < & if{ 1 (>L:AutoTune, bool) (P:Absolute time, seconds) 10 + (>L:Navtune, seconds) }(L:AutoTune, bool) if{ (@c:NearestVorCurrentFrequency, Frequency BCD16) (>K:NAV2_RADIO_SET) } (L:AutoTune, bool) if{ (@c:NearestNdbCurrentFrequency, Frequency ADF BCD32) (>K:ADF_COMPLETE_SET) }


Paul EGLD

Share this post


Link to post
Share on other sites

Thankyou PVE,I'll give it a try ...although just looking at it ..it looks like it autotunes NAV 2 and the ADF 1.What I would like to do is autotune the nav1/nav2 needles w/o tuning the normal A:NAV1/2 ACTIVE FREQUENCYBTW what does BCD16 mean :-hmmm

Share this post


Link to post
Share on other sites

Hi Ed Just change the ADF line to (@c:NearestVorCurrentFrequency, Frequency BCD16) (>K:NAV1_RADIO_SET) this sets the active frequency If you want to change the stanby use (>K:NAV1_STBY_SET}. Not strong on maths but I think BCD is the hex value that FS accepts for frequencies. Maybe another boffin will comment!


Paul EGLD

Share this post


Link to post
Share on other sites

Thankyou PVE, you have been a great help. It may interest some to know that by using (>@c:NearestVorCurrentLine)I can select which nearest VOR will tune in where ...for example the nearest VOR on NAV1 and the next nearest VOR on NAV 2 C:fs9gps(A:GPS POSITION LAT, Radians) (>@c:NearestVorCurrentLatitude, Radians) (A:GPS POSITION LON, Radians) (>@c:NearestVorCurrentLongitude, Radians) 2 (>@c:NearestVorMaximumItems) 200 (>@c:NearestVorMaximumDistance, NMiles) (L:Auto, bool) ! 0 (>@c:NearestVorCurrentLine) if{(@c:NearestVorCurrentFrequency, Frequency BCD16)(>K:NAV1_RADIO_SET) }(L:Auto2, bool) ! 1 (>@c:NearestVorCurrentLine) if{(@c:NearestVorCurrentFrequency, Frequency BCD16)(>K:NAV2_RADIO_SET) }regardsEd

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