• 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.

FSX Swashplate/Rotorhead animation tutorial for helicoptors

Messages
1,749
Country
unitedstates
I decided i would design a working swash plate variable now that my coding is getting good. I can never find a code online. And maybe room for improvement by creating a smaller code. Any help on improvements one be awesome.
Besides the code being long for setting values the animation is exact real world operational.
Stoked!:stirthepo:laughing:

This tutorial shows the butterfly mechanism and linkages to the rotor blades. Normally the splash plate is visible and would use this system as well. But the Moquito XE3 does not have a visible splash plate but rather a swivel joint and it uses internal push rods rather than external. So just use the same variable to animate your splash plate.

For joystick controls use the default fore/aft L/R controls....up to the splash plate then from there all parts would use the collective and the new custom variable.

Use the default collective A: variable:
lever_collective_arm

and this new swash plate L: variable.
Code:
<PartInfo>
        <Name>lever_stick_swashplate</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>
           (L:SWASHPLATE, Position) 50 * 50 +
            </Code>
            </Parameter>
        </Animation>
    </PartInfo>


Create an xml gauge and add entry to the panel CFG. Use the first VC cockpit entry so it always loads...
Gauge00=SWASHPLATE FOLDER!Update Swashplate, 0,0,2,2
Code:
<Update>
(A:ROTOR ROTATION ANGLE:1, Degrees) 0 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 180 &lt; and if{
(A:YOKE X POSITION, Position) (>L:POSITION1, Position) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 180 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 360 &lt; and if{
(A:YOKE X POSITION, Position) - (>L:POSITION1, Position) }

(A:ROTOR ROTATION ANGLE:1, Degrees) 90 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 270 &lt; and if{
(A:YOKE Y POSITION, Position) - (>L:POSITION2, Position) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 270 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 360 &lt; and if{
(A:YOKE Y POSITION, Position) (>L:POSITION2, Position) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 0 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 90 &lt; and if{
(A:YOKE Y POSITION, Position) (>L:POSITION2, Position) }

(L:POSITION1, Position) (>L:YOKE L/R POSITION, Position)
(L:POSITION2, Position) (>L:YOKE F/B POSITION, Position)

(A:ROTOR ROTATION ANGLE:1, Degrees) 0 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)   5 &lt; and if{ 0.9 (>L:VALUEA, Number) 0.0 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees)  5 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  15 &lt; and if{ 0.8 (>L:VALUEA, Number) 0.1 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 15 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  25 &lt; and if{ 0.7 (>L:VALUEA, Number) 0.2 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 25 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  35 &lt; and if{ 0.6 (>L:VALUEA, Number) 0.3 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 35 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  45 &lt; and if{ 0.5 (>L:VALUEA, Number) 0.4 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 45 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  55 &lt; and if{ 0.4 (>L:VALUEA, Number) 0.5 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 55 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  65 &lt; and if{ 0.3 (>L:VALUEA, Number) 0.6 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 65 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  75 &lt; and if{ 0.2 (>L:VALUEA, Number) 0.7 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 75 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  85 &lt; and if{ 0.1 (>L:VALUEA, Number) 0.8 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 85 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  95 &lt; and if{ 0.0 (>L:VALUEA, Number) 0.9 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 95 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 105 &lt; and if{ 0.1 (>L:VALUEA, Number) 0.8 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 105 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 115 &lt; and if{ 0.2 (>L:VALUEA, Number) 0.7 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 115 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 125 &lt; and if{ 0.3 (>L:VALUEA, Number) 0.6 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 125 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 135 &lt; and if{ 0.4 (>L:VALUEA, Number) 0.5 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 135 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 145 &lt; and if{ 0.5 (>L:VALUEA, Number) 0.4 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 145 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 155 &lt; and if{ 0.6 (>L:VALUEA, Number) 0.3 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 155 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 165 &lt; and if{ 0.7 (>L:VALUEA, Number) 0.2 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 165 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 175 &lt; and if{ 0.8 (>L:VALUEA, Number) 0.1 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 175 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 185 &lt; and if{ 0.9 (>L:VALUEA, Number) 0.0 (>L:VALUEB, Number) }

(A:ROTOR ROTATION ANGLE:1, Degrees) 185 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 195 &lt; and if{ 0.8 (>L:VALUEA, Number) 0.1 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 195 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  205 &lt; and if{ 0.7 (>L:VALUEA, Number) 0.2 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 205 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  215 &lt; and if{ 0.6 (>L:VALUEA, Number) 0.3 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 215 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  225 &lt; and if{ 0.5 (>L:VALUEA, Number) 0.4 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 225 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  235 &lt; and if{ 0.4 (>L:VALUEA, Number) 0.5 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 235 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  245 &lt; and if{ 0.3 (>L:VALUEA, Number) 0.6 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 245 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  255 &lt; and if{ 0.2 (>L:VALUEA, Number) 0.7 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 255 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  265 &lt; and if{ 0.1 (>L:VALUEA, Number) 0.8 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 265 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  275 &lt; and if{ 0.0 (>L:VALUEA, Number) 0.9 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 275 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  285 &lt; and if{ 0.1 (>L:VALUEA, Number) 0.8 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 285 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 295 &lt; and if{ 0.2 (>L:VALUEA, Number) 0.7 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 295 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 305 &lt; and if{ 0.3 (>L:VALUEA, Number) 0.6 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 305 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 315 &lt; and if{ 0.4 (>L:VALUEA, Number) 0.5 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 315 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 325 &lt; and if{ 0.5 (>L:VALUEA, Number) 0.4 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 325 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 335 &lt; and if{ 0.6 (>L:VALUEA, Number) 0.3 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 335 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 345 &lt; and if{ 0.7 (>L:VALUEA, Number) 0.2 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 345 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees) 355 &lt; and if{ 0.8 (>L:VALUEA, Number) 0.1 (>L:VALUEB, Number) }
(A:ROTOR ROTATION ANGLE:1, Degrees) 355 &gt; (A:ROTOR ROTATION ANGLE:1, Degrees)  360 &lt; and if{ 0.9 (>L:VALUEA, Number) 0.0 (>L:VALUEB, Number) }

(L:YOKE L/R POSITION, Position) (L:VALUEB, Number) * (>L:VALUE1, Position)
(L:YOKE F/B POSITION, Position) (L:VALUEA, Number) * (>L:VALUE2, Position)

(L:VALUE1, Position) (L:VALUE2, Position) + (>L:SWASHPLATE, Position)
</Update>

This shows what parts get animated and which parts share both variables! You need to use keys 0 thru 100 then i create a key at 150 just to re center the parts then starting from key 200 is left and 250 is center with right being frame key 300. Assign both tags to the shared parts from the animation manager with keys 0-100 and 200-300
SWASH%20PLATE%20TUTORIAL.jpg

I used a test window to get the exact numbers to make the magic work!
swashplate.jpg
 
Last edited:
Need some help...Trying to get this to work. I cannot for the life of me get the animation to work. I did everything in this tutorial, but no joy in sim.
 
Back
Top