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

Trimtab Elevator; multiple Revolutions

Messages
10,149
Country
us-arizona
Hey all,

This beast has always been a burden to me. I could never get this to function the way I want.

What I would like is 4 (or more) revolutions from this elevator trim crank I am doing. But I can never get more then one.

There must be a way......


I have been looking over the code and I just cannot seem to see a way to make the FS Aces part code do this, since its also a core 'thing'.

What if I made a L:var animation on this and based it on the percentage of what the actual part is?


I was looking in the stock FSX Cessna, and the wheel rotation in that is really nice. Why cant mine do this? arrgh.... The most I can get is one full rotation from zero to 100. What I would like is zero through 400, 4 revolutions.


Any idea's?



Here is a typical trimtab from the parts sheet;



Code:
    <PartInfo>
        <Name>trimtab_elevator_key_pct</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>ELEVATOR TRIM PCT</Variable>
                    <Units>percent</Units>
                    <Scale>0.5</Scale>
                    <Bias>50</Bias>
                </Sim>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_GAUGE_PITCH_TRIM</HelpID>
            <TooltipID>TOOLTIPTEXT_PITCH_TRIM</TooltipID>
            <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
            <CallbackJumpDragging>
                <YMovement>
                    <Delta>-3</Delta>
                    <EventIdInc>ELEV_TRIM_DN</EventIdInc>
                    <EventIdDec>ELEV_TRIM_UP</EventIdDec>
                </YMovement>
            </CallbackJumpDragging>
        </MouseRect>
    </PartInfo>
 
This MakeMDL part works on My Stirling in FS2004. Thanks to Fr. Bill I think.

Code:
<part>
    <name>trim_handle_pitch</name>
    	<!-- Stirling  No KFs needed -->
       <copy>trimtab_elevator_key</copy>
    	<animation>
            <rotation>X</rotation>
		<parameter>
			<sim>
				<variable>ELEVATOR TRIM POSITION</variable>
				<units>radians</units>
                		<bias>0</bias>	
				<scale>100</scale>
			</sim>
		</parameter>
	</animation>
</part>

Ted.
 
Bill, the "key to understanding" is to translate the sim variable to the number of keyframes you wish to use!

The default script is set up to accomplish one revolution of the wheel for the entire range of the sim's trim variable:

Code:
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Sim>
          <Variable>ELEVATOR TRIM PCT</Variable>
          <Units>percent</Units>
          <Scale>0.5</Scale>
          <Bias>50</Bias>
        </Sim>
      </Parameter>
    </Animation>
Now I've mentioned many times the critical importance of this basic formula:

SIM: Converts simvar to keyframes: simvar * scale + bias = keyframes

Since the sim variable's units are "percent" obviously it will range from -100 to +100. Taking the low, middle and high values of the variable then and plugging them into the formula we get:

-100 * 0.5 + 50 = frame 0
0 * 0.5 + 50 = frame 50
100 * 0.5 + 50 = frame 100

The <Bias> value is the number of frames needed for the "middle" of the sim variable's range.

So, if you want FOUR revolutions, the new <Bias> value will need to be 200 (one-half of the total keyframes).

All that's left then is to figure out the new <Scale> value required!

Rearranging our formula to solve for <Scale> we get this:

keyframes - bias / simvar = scale

Plugging in our proposed numbers we get:

400 - 200 / 100 = 2

Just to confirm our calculations, consider this table:

-100 * 2 + 200 = frame 0
0 * 2 + 200 = frame 200
100 * 2 + 200 = frame 400

So, now we know that this will provide 4 revolutions of the trim wheel:
Code:
    <AnimLength>400</AnimLength>
    <Animation>
      <Parameter>
        <Sim>
          <Variable>ELEVATOR TRIM PCT</Variable>
          <Units>percent</Units>
          <Scale>2</Scale>
          <Bias>200</Bias>
        </Sim>
      </Parameter>
    </Animation>
 
I had wondered what in the world Bias meant. Thanks so much for explaining this Bill. Bias must strike the center as this uses a center zone for neutral.

Thanks again...



Bill
 
Nothing seems to be working. The part, oddly, will only rotate about 1/8 to 1/4 of an inch. I have tried many things. Traded out MouseRect zones, took out the MouseRect zone altogether, animated rotations every 100 KF's, animated without a center point, animated with two revolutions per 200 KF's instead of 1 every 100 KF's. I just tried using a small cube and that didnt work either.


One of those days.


Crazy enough, at a certain point just before 360 degrees, the part jumps 180 degrees backwards.. ???


Gmax must have heard that I wanted Max and is trying to ruin my day.
 
It just occurred to me... What if the 'percent' field is using the maximum travel of the trim surface via the config file.

That would mean its rotating 7 deg either way, which would explain its movement issue no matter what I try with it.


Off to experiment...




Bill
 
2 1/2 days trying to get this to work, lol... Maybe I will leave the trim crank out. This is crazy. I have tried every trick in the book to make this work, nothing is working.

Right now, I am back to having a dummy cube be the animated part, the handle is linked to it, using your code Bill, and it moves a maximum of 1/4 of a turn total, and seems to jump to the point.

No attach point/mouserect is attached, just the animation. I also had changed it to ELEVATOR TRIM INDICATOR instead of ELEVATOR TRIM PCT. That gave me a full quarter turn more, instead of just a quick movement.

:S


Gmax... FSX SDK... sigh...
 
Evidently my scene is corrupt and will not allow this to work from parts I make. (I even created a new scene and merged all the parts over, which also didnt work). I Merged the trim wheel from the Robin over to this project, attached the handle to that, and it works fine, except only one full rotation total, and I am happy with that. After almost 3 days, it has been a terrible waist of time for just one common part that should work. Crazy crazy crazy...


Bill
 
This morning, I remembered one of the guys here talking about how he could connect several parts with the same animation to make it spin moderately. I think it may have been the same animation, the elevator crank or wheel.

I tried this (in FSX) this morning, and believe it or not, it didnt work. But I then connected the 3 series of animated elevator cranks to dummy parts, so it was linked like this;

* Crank
**Animated lever
***Dummy
****Animated lever
*****Dummy
******Animated Lever



This worked. :) I now have 3 rotations in my elevator crank. (I might add another). Glad I got this working....

Day 4... 8-0)))
 
So.... In retrospect, I 'speculate' that this is a bug and a core issue, and that it involves the animation of a Trimtab for the elevator to not exceed 1 revolution, not to go over 360 degrees rotation.

I ended up using the 'trimtab_elevator_key' animation, which works fine in how I did this.


It would be interesting to know if its possible to create an L:var that runs off of degrees of trim where one could animate a 4 to 8 rotation part via L:var animation based on elevator trim. I think that would side step this bug.



But, again, it could be only my issue of Gmax and my rig that is doing this. You guys might be able to get it to work fine. The one code near the top that I tried didnt work in FSX. (The code was converted to FSX format but still didnt work).


Anyhow, for future thoughts on this when others stumble on this issue, here are my findings above... and sweat.. and shed gray eyebrow hairs... no tears this time. :S



Bill
 
I never got this to work without multiple linked parts. The position info in the keyframes apparently cannot be repeated multiple times with the same part.
 
The script I posted works for me. I animated the wheel for 4 revs/100 frames, for a total of 400 frames. This gives me 16 revs of the wheel, lock to lock.
 
The key to success lies in creating keys every 90º of rotation... :cool:

Simply keying 0 - 180 - 360 will not work, and the wheel will simply "jump" from key to key... :eek:
 
Hey Bill,

You must be doing something different. I tried everything to make it work. I animated every 90 degrees.

I ended up using a stack of like 6 parts, all attached, that were all animated, and this gave me the number of revolutions I needed to get the handle to function correctly.

Another odd mystery.




Bill
 
Hey Bill,

You must be doing something different. I tried everything to make it work. I animated every 90 degrees.
I've done nothing beyond what I've already described...

I have sixteen revolutions over a 400 frame range, which is enough for my needs.

I am however now experiencing something I've never encountered before...

...whenever I try to compile the interior model of the 737-200 Adv/COMBI, the animated parts of the left wing are being detatched from their pivot points, rotated wildly, and B L O W N U P into HUGE parodies of their actual mesh.

I'm beginning to suspect that it may be a result of "mesh overload" though, since if I leave out enough parts (such as the cabin interior, seats, etc.) it will compile without the displaced/detached/blown up parts... <sigh> :eek:
 
Back
Top