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.

Whiskey Compass from a different perspective

Featured Replies

Hi all,I am trying to replicate a Sila-type compass (one which has a horizontal compas card, not a vertical one - picture attached)...... and have come across a problem.here's my code:<Gauge Name="Silva_Compass" Version="1.0"> <Image Name="Silva_Background_Real.bmp" ImageSizes="600,600"/> <Element> <MaskImage Name="Silva_Small_Mask.bmp" ImageSizes="600,600"> <Axis X="300" Y="500"/> </MaskImage> <Position X="0" Y="0"/> <Image Name="Silva_Small_Ring.bmp" ImageSizes="600,600"> <Axis X="300" Y="300" PointsTo="East"/> </Image> <Rotate> <Value>(A:Wiskey compass indication degrees, radians) </Value> </Rotate> </Element> <Element> <MaskImage Name="Silva_Large_Mask.bmp" ImageSizes="600,600"> <Axis X="300" Y="25"/> </MaskImage> <Position X="0" Y="0"/> <Image Name="Silva_Large_Ring.bmp" ImageSizes="800,800"> <Axis X="400" Y="400" PointsTo="East"/> </Image> <Rotate> <Value>(A:Wiskey compass indication degrees, radians) </Value> </Rotate> </Element> <Mouse> <Tooltip ID="TOOLTIPTEXT_WHISKEY_COMPASS"/> </Mouse></Gauge>What I am doing is having two separate, vertical, compass cards, masked so that only a portion of each one is showing. This gives an optical illusion which is similar to the 'ellipse we see when looking at a horizontal card on this type of compass. The top of one card shows as the back of the elipse, the bottom of another shows the front of the elipse (image attached)...All is good, except that it goes the wrong way!I know to reverse the rotation I must introduce a Nonlinearity table (thanks Nick), but I do not know the values. A full circle is 2*pi radians, so I tried 0 to 6.284, but everything went crazy!I have tried degrees, as in: <Value>(A:Wiskey compass indication degrees, degrees) </Value>and: <Value>(A:Wiskey compass indication degrees) </Value>... and then introducing the following nonlinearity table (The bitmap is 600 x 600): <Nonlinearity> <Item Value="360" X="300" Y="10"/> <Item Value="315" X="90" Y="90"/> <Item Value="270" X="10" Y="300"/> <Item Value="225" X="90" Y="510"/> <Item Value="180" X="300" Y="590"/> <Item Value="135" X="510" Y="510"/> <Item Value="90" X="590" Y="300"/> <Item Value="45" X="510" Y="90"/> </Nonlinearity> This didn't work. There are four permutations of the data here - the X and Y co-ordinates can run from top to bottom or be reversed, and the Values can do the same.I've tried all of them but to no avail.I am clearly missing something obvious! But what?Many thanks in advance,Roger.

  • Moderator

Try:

<Value>(A:Wiskey compass indication degrees,degrees) /-/</Value>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thanks Bill.Tried that, it locked the two bitmaps upright.Then I tried:<Value>(A:Wiskey compass indication degrees,degrees) /-/</Value>The gauge appeared, but the bitmaps didn't!Eventually I tried:<Value>(A:Wiskey compass indication degrees,radians) /-/</Value>Works a treat! Finally.Thanks so much for the guidance.All I have to do now is to work out how to lay a semi-translucent bitmap ove the front of the compass to simulate the perspex dome, and I'll be happy!I think I understand how to produce the bitmap with the Aplpha Channel (although how an 8-bit, greyscale image retains the information I don't know), but I'm not sure of the syntax or Element descriptions to use - Alpha="yes", Translucency="0.2" or suchlike, in the xml file.As Benny Hill used to say - learning all ze time!Cheers,Roger.

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.