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.

XML Gauge child rotation ?

Featured Replies

Head scratcher ... Would anyone know or have an idea How it could be possible to have a Child rotation ? To elaborate, think of a Ferris wheel .... It rotates around its centre, No problem,However the "cars" on the Ferris wheel are attached to their own pivots around the circumference of the wheel .. These "Cars" then rotate to stay level with the ground as they are carried around on the wheel. In FSX GAUGE Terms, we are trying to achieve a Digital HSI, where the N S E W and Numerals, stay Upright as they rotate around the edge of the Compass Card.. Told you it was a Head Scratcher :) Anyone ?

Head scratcher ... Would anyone know or have an idea How it could be possible to have a Child rotation ? To elaborate, think of a Ferris wheel .... It rotates around its centre, No problem,However the "cars" on the Ferris wheel are attached to their own pivots around the circumference of the wheel .. These "Cars" then rotate to stay level with the ground as they are carried around on the wheel. In FSX GAUGE Terms, we are trying to achieve a Digital HSI, where the N S E W and Numerals, stay Upright as they rotate around the edge of the Compass Card.. Told you it was a Head Scratcher :) Anyone ?
If they rotate with the parent item then you could add a second rotation to them with the same angle but in the opposite direction.Another option is to not make them child items and use shift to move them around in a circle.

Great code snippets guys , As always .. However, I fear a little misunderstanding :) The Code you linked to is fine to a point, BUT ( and here is the head scratcher ) The NUMBERS MUST Remain Upright to the viewer as they rotate ... So for example the "W" when heading is EAST .. should still be upright "W" and not "M" I refer again to my analogy of the Ferris wheel .... Everyone stay in the Cars all the way around the ride because they always stay Upright .. perpendicular to the ground .. I have been struggling with this one for weeks now :(

Hi,We solved that problem already in 2004.There was a post with an attachment of Karl, but probably impossible to recover after the Avsim crash.It was about a Sandel like HSI in a 2 engine Cessna.Maybe fr. Bill still has a copy somewhere?Never used it because in the 767 MFD the cifers turn as in reality (don't stay horizontal)This is a "custom" solution, see Jeroen:Calculated only for 30 and 45 degrees, but one can have as many in the Nonlin. table.Other solutions?<Shift><Value>(A:Plane heading degrees gyro,degrees)</Value><Nonlinearity><Item Value= "0" X= "0" Y= "80"/><Item Value= "30" X= "40" Y= "69"/><Item Value= "45" X= "57" Y= "57"/><Item Value= "60" X= "69" Y= "40"/><Item Value= "90" X= "80" Y= "0"/><Item Value="120" X= "69" Y="-40"/><Item Value="135" X= "57" Y="-57"/><Item Value="150" X= "40" Y="-69"/><Item Value="180" X= "0" Y="-80"/><Item Value="210" X="-40" Y="-69"/><Item Value="225" X="-57" Y="-57"/><Item Value="240" X="-69" Y="-40"/><Item Value="270" X="-80" Y= "0"/><Item Value="300" X="-69" Y= "40"/><Item Value="315" X="-57" Y= "57"/><Item Value="330" X="-40" Y= "69"/><Item Value="360" X= "0" Y= "80"/></Nonlinearity></Shift></Element>Hope it helps,Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hi,We solved that problem already in 2004.There was a post with an attachment of Karl, but probably impossible to recover after the Avsim crash.It was about a Sandel like HSI in a 2 engine Cessna.Maybe fr. Bill still has a copy somewhere?Never used it because in the 767 MFD the cifers turn as in reality (don't stay horizontal)This is a "custom" solution, see Jeroen:Calculated only for 30 and 45 degrees, but one can have as many in the Nonlin. table.Other solutions?<Shift><Value>(A:Plane heading degrees gyro,degrees)</Value><Nonlinearity><Item Value= "0" X= "0" Y= "80"/><Item Value= "30" X= "40" Y= "69"/><Item Value= "45" X= "57" Y= "57"/><Item Value= "60" X= "69" Y= "40"/><Item Value= "90" X= "80" Y= "0"/><Item Value="120" X= "69" Y="-40"/><Item Value="135" X= "57" Y="-57"/><Item Value="150" X= "40" Y="-69"/><Item Value="180" X= "0" Y="-80"/><Item Value="210" X="-40" Y="-69"/><Item Value="225" X="-57" Y="-57"/><Item Value="240" X="-69" Y="-40"/><Item Value="270" X="-80" Y= "0"/><Item Value="300" X="-69" Y= "40"/><Item Value="315" X="-57" Y= "57"/><Item Value="330" X="-40" Y= "69"/><Item Value="360" X= "0" Y= "80"/></Nonlinearity></Shift></Element>Hope it helps,Jan
I found this used in a HSI <Element> <Position X="85" Y="69"/> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="0" Y="53"/> <String>N</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="-25" Y="46"/> <String>3</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="-46" Y="26"/> <String>6</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="-53" Y="0"/> <String>E</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="-46" Y="-26"/> <String>12</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="-25" Y="-46"/> <String>15</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="0" Y="-53"/> <String>S</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="25" Y="-46"/> <String>21</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="46" Y="-26"/> <String>24</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="53" Y="0"/> <String>W</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="46" Y="26"/> <String>30</String> </FormattedText> </Element> <Element> <Position X="0" Y="0"/> <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes"> <Pivot X="25" Y="46"/> <String>33</String> </FormattedText> </Element> <Rotate> <Value>(A:Plane heading degrees gyro, radians) /-/</Value> </Rotate> </Element>PVE

Paul EGLD

Hi,Nice one!Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Moderator
Hi,Nice one!Jan
It is nice, but would have been so MUCH nicer had the script been pasted into a "code" box!See the "<>" icon on the toolbar? Highlight your sample XML script, then click on it......notice how the indented formatting and colors make it easier to read? :( Since the final <Rotate> is clearly part of the Parent <Element>, it makes what it affects very, very obvious, i.e., rotating all of the Child <Element>s!
<Element>  <Position X="85" Y="69"/>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="0" Y="53"/>      <String>N</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="-25" Y="46"/>      <String>3</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="-46" Y="26"/>      <String>6</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="-53" Y="0"/>      <String>E</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="-46" Y="-26"/>      <String>12</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="-25" Y="-46"/>      <String>15</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="0" Y="-53"/>      <String>S</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="25" Y="-46"/>      <String>21</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="46" Y="-26"/>      <String>24</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="53" Y="0"/>      <String>W</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="46" Y="26"/>      <String>30</String>    </FormattedText>  </Element>  <Element>    <Position X="0" Y="0"/>    <FormattedText X="10" Y="10" Font="Arial" FontSize="10" Adjust="Center" Color="White" VerticalAdjust="Center" Bright="Yes">      <Pivot X="25" Y="46"/>      <String>33</String>    </FormattedText>  </Element>  <Rotate>    <Value>(A:Plane heading degrees gyro, radians) /-/</Value>  </Rotate></Element>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

BillMy reply page seems to be broken I have bits missing includung my sig box which never shows anymore. I have to type it each time and chars. that don't show. It might be a problem with the keyboard I'll get my boffin to check it out. Grin!PVEEGLD

Paul EGLD

Hi,Tested the code:Rotation ok.Numbers stay upright!One to save.Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hey there!Only one question here, excuse my intromision. Are those X's And Y's negative pivot values accepted by Flight simulator or they have to be adjusted?. I read once that FS doesn't accept negative values.Javier

  • Moderator
Hey there!Only one question here, excuse my intromision. Are those X's And Y's negative pivot values accepted by Flight simulator or they have to be adjusted?. I read once that FS doesn't accept negative values.Javier
The only instance where FS is intolerant of negative values is in the panel.cfg's placement parameters of XML "gauges" where either X or Y are negative.Within a gauge however, negative values are not a problem.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thank you!, it was very kind of you.Javier

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.