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.

Making a Map Gauge in XML

Featured Replies

I am making a Gauge which shows the Flight plan and Navaids etc, and have been for the last month or so making bit maps, I now have the bit maps I need but am having problems with the HSI Range Switch. When I first load the gauge the switch for the HSI Range is not there but when I move the mouse pointer over the area and click the switch appears and set the range to 80, but will not switch to any other range. I always seem to have problems with the mouse click section and have been trying to work it out all day so now I am getting a bit mad with it, so if someone could help me I would be most greatful.This is the XML code I am using.(L:HSI RANGE, number)HSI Switch(L:HSI RANGE, number) 20 ==if { 10 (>L:HSI RANGE, number) } (L:HSI RANGE, number) 40 ==if { 20 (>L:HSI RANGE, number) } (L:HSI RANGE, number) 80 ==if { 40 (>L:HSI RANGE, number) } (L:HSI RANGE, number) 160 ==if { 80 (>L:HSI RANGE, number) } (L:HSI RANGE, number) 320==if { 160 (>L:HSI RANGE, number)}(L:HSI RANGE, number) 160 ==if { 320 (>L:HSI RANGE, number) } (L:HSI RANGE, number) 80 ==if { 160 (>L:HSI RANGE, number) } (L:HSI RANGE, number) 40 ==if { 80 (>L:HSI RANGE, number) } (L:HSI RANGE, number) 20 ==if { 40 (>L:HSI RANGE, number) } (L:HSI RANGE, number) 10==if { 20 (>L:HSI RANGE, number)}

Hi,The spaces between == if{ ?Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Commercial Member

Why not simplify it a little bit so it's a little easier to manage and more efficient as well. Jan is right about the =={if probably breaking it, but try this:HSI Switch(L:HSI RANGE, number) 0.5 * 10 max (>L:HSI RANGE, number)(L:HSI RANGE, number) 2 * 320 min (>L:HSI RANGE, number)Just set the initial somevalue (>L:HSI RANGE, number) when the gauge loads, and you're all set.--Jon

Thanks Jan and Jon. If I have got this right then it should look like this:(L:HSI RANGE, number) 20 ==if{ 10 (>L:HSI RANGE, number) }Jon have tried yours and works ok, but does not show up in panel untill you click on it.Will try Jans and then I know 2 ways to do the mouse clicks.

  • Commercial Member

>>Jon have tried yours and works ok, but does not show up in>>panel untill you click on it.Well you have to set the initial value when the gauge loads, otherwise it's going to be zero. In your gauge, before you do anything else, insert a startup block like so. You can use it to initialize variables like your HSI scale.(L:Startup, bool) ! if{ 20 (>L:HSI RANGE, number) 1 (>L:Startup, bool) }

Realised what you meant about: Just set the initial somevalue (>L:HSI RANGE, number) whenthe gauge loads, and you're all set.Thanks for the reply anyway and thanks for the help.Thanks also Jan.

After Looking at the code, There is one thing I can not understand. Why 0.5 and 2.0 ???(L:HSI RANGE, number) 0.5 * 10 max (>L:HSIRANGE, number)Click>(L:HSI RANGE, number) 2 * 320 min (>L:HSIRANGE, number)

  • Commercial Member

Because all your values were multiples of 2. 160 * 2 = 320, etc. I used 0.5 * instead of 2 / for reducing the scale because it's more efficient in terms of processing, but it's really insignificant particularly in a state-based role.I mean why have a bunch of if{ blocks if all the values are just half or double the previous value:)--Jon

Jon I got this scrolling my ECAM pages 1 to 9 on a single button click. How can get it to reset to 1 after 9 and go round again, Is it possible? Paul

Paul EGLD

I have now made a HSI Mode Switch. So all the value go up by one. This is the code :(L:HSI MODE, number)(L:Startup, bool) ! if{ 1 (>L:HSI MODE, number) 1 (>L:Startup, bool) }HSI Mode Switch(L:HSI MODE, number) 1 - 1 max (>L:HSI MODE, number)(L:HSI MODE, number) 1 + 6 max (>L:HSI MODE, number)Now what happens is when I UpArrow Click goes straight to 6 but when I DownArrow click it works as it should do goes from 6 to 1. Have tried * - / in the UpArrow click but with no success.

Hi Try (L:HSI MODE, number) 1 + 6 min (>L:HSI MODE,number)(L:HSI MODE, number) 1 - 1 max (>L:HSI MODE,number) Paul

Paul EGLD

It now goes from 1 to 6, and then 6 to 1 like it should, but does not show up in the panel untill clicked on.

Hi,This is my working code for the HSI Switch:(L:HSI STARTUP,enum) 0 == if{ 4 (>L:hsi,enum) 1 (>L:HSI STARTUP,enum) } (L:hsi,enum)Plan --> Rose Ils(L:hsi,enum) 1 - 0 max (>L:hsi,enum)Rose Ils --> Plan(L:hsi,enum) 1 + 5 min (>L:hsi,enum)At startup always at position 4.May be it helps,Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hi,This should work:One single click, round from 1 to 9(LVar) d 9 != * 1 + (>LVar)Tom

Tom Thanks, I works great Paul

Paul EGLD

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.