October 18, 200619 yr 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 My FS Videos
October 18, 200619 yr 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
October 18, 200619 yr Author 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 regardsEdaka Capt. P[/font color]i[/font color]c[/font color]a[/font color]s[/font color]s[/font color]o[/font color] http://img.photobucket.com/albums/v640/edetroit100/eddd2.jpgMy FS9 Videos] AMD Athlon 64 3500+, 1024Mb PC3200 DDR, 300Gb HD 256Mb DDR Nvidia 7800 GTX PCI-E, Audigy 2 ZSCH Products Yoke, Pedals and Throttle Quadrant[/font color My FS Videos
October 18, 200619 yr 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
October 19, 200619 yr Author 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 My FS Videos
Create an account or sign in to comment