Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Newbie in XML Gauges

Featured Replies

Hi to all: I am a newbie in programming XML of gauges and I have made some easy works where alone it was necessary to modify small things. Now my project is a little but complex and its somebody of you would need he can help me. I am modifing the RMI of the Beech Baron for one that is single RMI of VOR (VOR1 and 2). I have added him 2 flags of OFF every time that not this present a sign been worth of VOR. All this works well. Now the question comes I need that the needles move to the position of 3 o

  • Author

Hi Jose,If I understood you right, you need to add an if / else condition tothe value - element that defines the needle's rotation.It could be something like this:Value>(A:NAV1 signal,bool)if{ (A:Plane heading degrees gyro,radians) /-/ } els{ 1.57 }1.57 is 0.5 pi, so 90 degrees right. But maybe for your gauge an other value like 0 fits better.You might also try to substitute the NAV1 signal bool by a minimumsignal strenght of the NAV1 like this:Value>(A:NAV1 signal, number) abs 10 > if { (A:Plane heading degrees gyro,radians) /-/ } els{ 1.57 }I hope this helps.Herbert

I will check your help. I need two condition IF. One , when the signal is OFF. The gauge display the "OFF" flag and the needle go to 90 deg. The second condition is when a ILS frec is selected. The flag is out of view, but the needle go 90 deg too.I try with your help. Thank You Very much.Jose Olliver

  • Author

So try this one:Value>(A:HSI GSI needle valid, bool)(A:NAV1 signal, number) abs 10 < || if { 1.57 } els{ (A:Plane heading degrees gyro,radians) /-/ }This causes a rotation value of 1.57 either when a glidescope signal is available or the NAV1 signal strenght < 10.Hope this helps,Herbert

Hello Herbert: after several days working in my cockpit, I could prove your help but I have not been able to make it work. I am very inexpert in programming XML and I am surely making bad something. Sorry for the caused nuisances. Here, I copy part of the original code of the RMI in the part "Element" needle 2 (A:NAV2 Radial,radians) (A:Plane heading degrees gyro,radians) - pi 2 / + And this it is the code that I have modified according to your help. Can You check that I am writing bad (A:NAV2 Radial,radians) (A:Plane heading degrees gyro,radians) - pi 2 / + If (A:NAV2 SIGNAL, bool) 1 {(A:Plane heading degrees gyro,radians) /-/ } els{ 1.57 } Lastly to the second code I should add it this condition too (A:NAV1 has localizer, bool)Thank You very muchJose

  • Author

Hi Jose,XML is not really difficult, you just need to get used to it...The general syntax for if - then conditions in elements is:(condition) if { (what to do when condition is true) } els{ (what to do else) }If there are two conditions, that both need to be true:(condition1) (condition2) && if { (what to do when conditions are true) } els{ (what to do else) }The && means that both conditions have to be true. Use || ifone OR the other condition needs to be true.Pay attention to add spaces or no spaces befor and after the { } brackets like in the description above.So your code should be:(A:NAV2 signal,bool) 1 > if{ (A:NAV2 Radial,radians) (A:Plane heading degrees gyro,radians) - pi 2 / + } els{ 1.57 }And with the addition of the localizer condition:(A:NAV2 signal,bool) 1 > (A:NAV1 has localizer, bool) && if{ (A:NAV2 Radial,radians) (A:Plane heading degrees gyro,radians) - pi 2 / + } els{ 1.57 }I'd higly recommend to use a XML editor instead of notepad or other text editors. I prefer a freeware from Peter Reynolds (www.iol.ie/~pxe) I use his version 1.1.1 which has some minor problems but I like it better than his newer versions or even MS's XML editor.I hope this helps!Herbert

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.