• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Rotation frustration

Messages
17
Country
unitedkingdom
Hi gauge gurus.

I am having a frustrating evening trying to do something one would expect to be very simple. I have a NAV flag which needs to be able to rotate 45 degrees around its top right corner.

The flag should "hang" vertically down when HSI CDI needle valid is false and swing 45 degrees to the left when HSI CDI needle valid is true.

Code is:

Code:
   <Element>
         <Position X="259" Y="158"/>
         <Image Name="narco hsi nav flag.bmp">
            <Axis X="20" Y="0"/>
         </Image>
         <Rotate>
             <Value>
                 (A:HSI CDI needle valid,bool)
             </Value>
             <Nonlinearity>
                 <Item Value="0" Degrees="0"/>
                 <Item Value="1" Degrees="-45"/>
             </Nonlinearity>
             <Delay DegreesPerSecond="-90" />
         </Rotate>
   </Element>

I can't understand why the "1" position is -45 not +45, frustratingly flag will rotate the wrong way unless I set delay to -90 but then FS does not effect the delay.

Kind regards, Dave.
 
If <Axis X="20" Y="0"/> then your flag is "hanging" from the top.

Try using <Image Name="narco hsi nav flag.bmp" PointsTo="South"> and then use the normal 0="0" and 1="45" values, plus "90" for the Delay

Tom
 
This is why the frustration

Hi Tom, that was what I first tried as the most obvious way to code it, doing that the needle starts off correct, hanging vertically down but instead of rotating clockwise (swinging to the left) it rotates anti-clockwise (swings to the right outside the gauge). See pic.

I assume default "PointsTo" is "North", I have tried "West" and "East" and with west the needle incorrectly hangs up from the axis and rotates anti-clockwise, using east it does same as with south. If I use "North" then the flag appears horizontal to the left with the value = 0 and still rotates anticlockwise (to correct position) when value = 1. So all "PointsTo" options tried and with all of them the flag incorrectly rotates anti-clockwise. So frustrating.

So far the code I put in my first post is the only code that seems to work but with the exception that the delay doesn't work.

What I am going to try next is double the height of the bitmap with the top half invisible (maks color) and rotate it around its centre with 0 = 180 deg and 1 = 270 deg - perhaps that will give expected results (incidentally I have experimented with those values with various PointsTo without success with the axis at the top of the bitmap).
 
Solution - remove nonlinearity

Thanks guys,

Solution was simple - drop using nonlinearity. Code is less "transparent" but then it works fine. Seems to me that a lot of these strange rotation issues can be solved by using a macro to derive the value and avoid using nonlinearity.
 
Back
Top