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

FSXA Prop Synchronizer: SOLVED!

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I'm trying to figure out how to animate the little "prop synchronizer" and have run into a stone wall. There apparently is no handy-dandy (A:Var,unit) for this device.

I have the spinner object animated 0 to 360 frames and need to find a way to make it spin...
B55_Mindstar000007.jpg
 
I no virtually 0 about this..
But why not built a duplicate of the little prop fins. One for static vis., and the other for the animation. Write a visibility tagged to the A: var of 'PROP SYNC ACTIVE'. Animate the duplicate according to prop_blur (animate it for propeller animation). Then it would spin like a prop, but only be vis when prop sync is true. Otherwise it would show the static. (sync not true)

??

- Joseph
 
Maybe it would look something like;
Of course 'prop_sync_off' would be animated in place, or still for keyframes 0/25/50/75/100, and 'prop_sync_still' would be animated in increments of 90 degrees like a propeller.

Code:
<PartInfo>
        <Name>prop_sync_off</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
            <Variable>PROP ROTATION ANGLE:1</Variable>
          </Sim>
            </Parameter>
        </Animation>
        <Visibility>
            <Parameter>
                <Code>
            (A:PROP SYNC ACTIVE:bool) 0 ==
                </Code>
            </Parameter>
        </Visibility>
    </PartInfo>

<PartInfo>
        <Name>prop_sync_on</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
            <Variable>PROP ROTATION ANGLE:1</Variable>
          </Sim>
            </Parameter>
        </Animation>
        <Visibility>
            <Parameter>
                <Code>
            (A:PROP SYNC ACTIVE:bool) 1 ==
                </Code>
            </Parameter>
        </Visibility>
    </PartInfo>
 
If it does what I think, then it would be good to have (A PROP ROTATION ANGLE, Radians) for each engine index. You could then take the difference(phase) in degrees and feed that with a dnor to the animation.

Another approach would be to calculate the phase based on (A PROP RPM:index, RPM) and set some timer to count upwards in a predetermined time interval (which may vary on every cycle to avoid stutters), then feed counter * phase with a dnor to the animation. If I'm not mistaken here, the phase in degrees should be: phase = 360 * (1 - (A PROP RPM:1)/(A PROP RPM:2)).
 
From FS9 Baron Prop Sync Spinner.xml, it should help.
Code:
         <Rotate>
            <Value Minimum="0" Maximum="210">(A:Prop2 RPM,RPM) (A:Prop1 RPM,RPM) - (*get difference between props*) 0.01 * (*100 rpm -&gt; 1 rpm*) 18 / (*18 frames per sec*) 360 * dgrd (*convert rpm to radian/sec*) (G:var1) + (*add to accumulator*) rnor (*normilze*) d (&gt;G:var1) (*update accumulator*)</Value>
         </Rotate>
 
Or the FSX Baron;

Code:
<Gauge Name="Prop Sync Spinner" Version="1.0">
    <Image Name="Prop_Sync_Bezel.bmp" />
    <Element>
        <Position X="16" Y="16" />
        <Image Name="Prop_Sync_Blades.bmp" PointsTo="East">
            <Axis X="13" Y="13" />
        </Image>
        <Rotate>
            <Value Minimum="0" Maximum="210">(A:Prop2 RPM,RPM) (A:Prop1 RPM,RPM) - (*get difference between props*) 0.01 * (*100 rpm -&gt; 1 rpm*) 18 / (*18 frames per sec*) 360 * dgrd (*convert rpm to radian/sec*) (G:var1) + (*add to accumulator*) rnor (*normilze*) d (&gt;G:var1) (*update accumulator*)</Value>
            <Failures>
                <SYSTEM_ELECTRICAL_PANELS Action="Freeze" />
            </Failures>
        </Rotate>
    </Element>
</Gauge>
 
Fr. Bill,

I achieved a prop sync indicator in my aircraft by first creating the indicator bezel etc... In my case it has a needle sweeping through approx 140 deg. where it remains centered, pointing straight up, when the engines are in sync. In your case its a rotating flag like in a Kingair, so I'm not quite sure if my method will work if modified.

However, this is what I did..... I already had an rpm gauge for each engine with a needle going from 0% to 100%, and the appropriate, working (default) code.
1 Create the sync needle and rotate it so it displays in the centre position, do not animate it.
2 Create a tiny 'dummy' box which is positioned at the sync needles' pivot (hidden behind the gauge structure) and animated it to the same arc of movement that the needle should have - in a clockwise direction and attach the left engine rpm code.
3 Create a second identical tiny 'dummy' box, co-located, but attach the right engine rpm code and animate it the same as the first 'dummy' box but in an anticlockwise direction.
4 Then... parent/child the three parts like this......

...> right engine rpm dummy box
.......> left engine rpm dummy box
..........> sync needle

I'm sure by now you have figured what's gonna happen when either one or both engines are running... and what happens if one engine is running slower than the other.

I do hope this helps, somewhat :)

Skip
 
Thanks for the suggestions. While the 2d Baron XML spinner 'spins', the 3d spinner just 'shivers' instead.

I'm now going to make the 3d object subject to a custom (L:var,unit) and move the calculation to the 'logic gauge'. I suspect putting the script in an <Update> section will work since it's obvious it is failing in the modeldef.xml...

EDIT: five minutes later still not working... <sigh>
 
Last edited:
To put a "period" to this quest, the solution turned out to be fairly simple. I was thinking to use 360 frames. What I found out though is that by lowering the number of frames to 10, i.e, 0, 2, 5, 7, 10 the silly thing spins merrily along.
 
Bill would you be willing to share you working code please.

I was just about to code mine when I discovered the lack of an A:var. I looked at the 2D code too but couldn't find a way of making it work in 3D hence my looking on here.

Thanks.
 
sy.jpg

This is the synchroscope from a Connie.
Code:
<Gauge Name="VN Connie Synchroscope" Version="1.0">
 
    <Macro Name="Accumulator">(A:Prop RPM:@2, RPM) (A:Prop RPM:@1, RPM) - -100 max 100 min (G:Var@2) + 360 % d (&gt;G:Var@2)</Macro>
    <Image Name="PropSync_BG.bmp" ImageSizes="201,201,201,201"/>
    <Element>
        <Position X="100" Y="35"/>
        <Image Name="PropSync_Spinner.bmp" PointsTo="East" ImageSizes="61,15,61,15">
            <Axis X="30.5" Y="7.5"/>
        </Image>
        <Rotate>
            <Value>(L:Propeller sync master select, enum) 2 == if{ @Accumulator(2,2) } els{ @Accumulator(1,2) }</Value>
            <Failures>
                <SYSTEM_ELECTRICAL_PANELS Action="Freeze"/>
            </Failures>
            <Nonlinearity>
                <Item Value="0" Degrees="20"/>
                <Item Value="180" Degrees="200"/>
            </Nonlinearity>
        </Rotate>
    </Element>
    <Element>
        <Position X="44" Y="132"/>
        <Image Name="PropSync_Spinner.bmp" PointsTo="East" ImageSizes="61,15,61,15">
            <Axis X="30.5" Y="7.5"/>
        </Image>
        <Rotate>
            <Value>(L:Propeller sync master select, enum) 2 == if{ @Accumulator(2,3) } els{ @Accumulator(1,3) }</Value>
            <Failures>
                <SYSTEM_ELECTRICAL_PANELS Action="Freeze"/>
            </Failures>
            <Nonlinearity>
                <Item Value="0" Degrees="150"/>
                <Item Value="180" Degrees="330"/>
            </Nonlinearity>
        </Rotate>
    </Element>
    <Element>
        <Position X="156" Y="132"/>
        <Image Name="PropSync_Spinner.bmp" PointsTo="East" ImageSizes="61,15,61,15">
            <Axis X="30.5" Y="7.5"/>
        </Image>
        <Rotate>
            <Value>(L:Propeller sync master select, enum) 2 == if{ @Accumulator(2,4) } els{ @Accumulator(1,4) }</Value>
            <Failures>
                <SYSTEM_ELECTRICAL_PANELS Action="Freeze"/>
            </Failures>
            <Nonlinearity>
                <Item Value="0" Degrees="70"/>
                <Item Value="180" Degrees="250"/>
            </Nonlinearity>
        </Rotate>
    </Element>
    <Macro Name="SyncStr">Synchroscope (PROPELLER @2, %((A:Prop RPM:@2, RPM) (A:Prop RPM:@1, RPM) - near s0 1 &gt;)%{if}DEC RPM TO SYNCHRONIZE%{else}%(l0 -1 &lt;)%{if}INC RPM TO SYNCHRONIZE%{else}SYNCHRONIZED%{end}%{end})</Macro>
    <Mouse>
        <Area Left="70" Right="130" Top="5" Bottom="65">
            <Tooltip>%((L:Propeller sync master select, enum) 2 ==)%{if}@SyncStr(2,2)%{else}@SyncStr(1,2)%{end}</Tooltip>
        </Area>
        <Area Left="14" Right="74" Top="102" Bottom="162">
            <Tooltip>%((L:Propeller sync master select, enum) 2 ==)%{if}@SyncStr(2,3)%{else}@SyncStr(1,3)%{end}</Tooltip>
        </Area>
        <Area Left="126" Right="186" Top="102" Bottom="162">
            <Tooltip>%((L:Propeller sync master select, enum) 2 ==)%{if}@SyncStr(2,4)%{else}@SyncStr(1,4)%{end}</Tooltip>
        </Area>
    </Mouse>
</Gauge>
 
Bill would you be willing to share you working code please.

I was just about to code mine when I discovered the lack of an A:var. I looked at the 2D code too but couldn't find a way of making it work in 3D hence my looking on here.

Thanks.
In modeldef.xml file:
Code:
  <PartInfo>
    <Name>KA300_Prop_Synchronizer</Name>
    <AnimLength>10</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:PropSync,enum)
        </Code>
      </Parameter>
    </Animation>
  </PartInfo>

In a logic gauge <Update> section:
Code:
    <!-- PROP SYNCHRONIZER -->
    (A:Prop2 RPM,RPM) (A:Prop1 RPM,RPM) - (*get difference between props*)
    0.01 * (*100 rpm -&gt; 1 rpm*) 18 / (*18 frames per sec*) 10 *
    dgrd (*convert rpm to radian/sec*) (L:PropSync,enum) + (*add to accumulator*) rnor (*normalze*) d (>L:PropSync,enum)) (*update accumulator*)
 
Thanks for the code Bill, I just tried it but it would appear that I am having some issues.

The disc does rotate in sim but it is very slow and when it reaches the end of its animation it snaps back to the start position before rotating again which makes it look very jerky and odd.

I've tried animating the disc in a CW direction over 90° and also 360° in the space of 10 frames with little difference (the 360° was a little faster but still jerky).

Here is the 2D logic gauge I created in case the fault lies in the way I created it (2D gauges are not my forte):

Code:
<Gauge Name="Mallard_Logic" Version="1.0">



<Update>
  <!-- PROP SYNCHRONIZER -->
    (A:Prop2 RPM,RPM) (A:Prop1 RPM,RPM) - (*get difference between props*)
    0.01 * (*100 rpm -&gt; 1 rpm*) 18 / (*18 frames per sec*) 10 *
    dgrd (*convert rpm to radian/sec*) (L:PropSync,enum) + (*add to accumulator*) rnor (*normalze*) d (>L:PropSync,enum)) (*update accumulator*)
</Update>
</Gauge>

Any suggestions?
 
Try changing the scalar from 10 * to 360 *

The 'blades' should spin a full 360 degrees in either direction. When 'synch' is turned on, the 'blades' should gradually slow to a full stop as the two props become synchronized.
 
Thanks Bill, I had to animate it through 360° in the CCW direction to get it to look right (spins toward the slower engine) but the scalar change worked wonders. :)

Thanks to all the others who commented too. I really like that swinging needle idea and may try that if I ever work on a twin again.
 
I see that this thread is a bit old. Not sure when they become an archive. I was making a TQ selector and I wanted to add to see that the props were in-sync. I looked at the beech baron's XML and I could see the "blades" ever-so-slightly jumping; showing that something was not symmetrical for the full rotation. I saw that the image was 16x16 and the axis was 8,8 so I decided to color one of the blades and I noticed that the blades only rotate 0 to pi (or 0 - 180 deg). Since the bmp is near symmetrical, it's not too detectable, but there is a slight jump. The question is, why doesn't the bmp rotate 0 - 2pi (0 -360 deg)? What math can correct this? I did try to no avail yet. Also, is it a practice in the real world to sync all props on a 4-engine aircraft?

Solved the rotation issue, just removed the "rnor". Also changed the "360" to "90" and it slows the rotation rate, which I found out I prefer it slower.
 
Last edited:
Back
Top