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

landing gear etc. variables

Messages
113
Hi
I use:

-<UseTemplate Name="ASOBO_GEAR_Steering_Template">

<ANIM_NAME>GEAR_Steering</ANIM_NAME>

but cannot find the value within SimvarWatcher.
Many thanks
 
That templates uses (A:GEAR STEER ANGLE:#ID#, degrees). Substitute the #ID# with the contact point index of the nose wheel.
 
I think it's in radians. But 0.05 seems very low even in radians. 2 pi radians is equal to 360 degrees.
 
I've been trying all day to get the Blender animation correct but it's not centered, too fast and more. What values should I enter?
Thanks
 
It's helpful to look at the Asobo model behavior templates to understand what they are expecting of the animation frames.
In the official packages they are at: fs-base-aircraft-common\ModelBehaviorDefs

The file you want is exterior.xml. Here is the template:

XML:
    <Template Name="ASOBO_GEAR_Steering_Template">
        <DefaultTemplateParameters>
            <ANIM_NAME>GEAR_Steering</ANIM_NAME>
            <ID>0</ID>
        </DefaultTemplateParameters>
        <UseTemplate Name="ASOBO_GT_Anim">
            <ANIM_CODE>(A:GEAR STEER ANGLE:#ID#, degrees) dnor</ANIM_CODE>
            <ANIM_LENGTH>360</ANIM_LENGTH>
            <ANIM_WRAP>True</ANIM_WRAP>
        </UseTemplate>
    </Template>

The animation code is (A:GEAR STEER ANGLE:#ID#, degrees) dnor which means take the simvar value of GEAR STEER ANGLE:0 (whatever the ID is) and the dnor means to convert to normalized degrees 0-360.

This is a good documentation page on the RPN style coding: http://www.prepar3d.com/SDKv3/LearningCenter/utilities/scripting/rpn_scripting.html

Your animation should have 360 frames, the wheel facing front at frame 0 and frame 360 at -360 degrees. Make sure the keyframe interpolation is linear.
 
Many thanks, I still haven't managed to get it working. What should I change in Blender as in the screenshot?

sc.jpg
 
I see this going from 18 to -18 but with this animation name in Blender nothing moves. What animation name to use?
Thanks

GEAR CENTER STEER ANGLECenter wheel angle, negative to the left, positive to the right.Percent Over 100N
 
The sdk is rubbish. Like for ex.
GEAR CENTER STEER ANGLECenter wheel angle, negative to the left, positive to the right.Percent Over 100

percent over 100? never heard such.
 
The gear steer angle seems to be a tricky one. I haven't been able to get anything to work with it either. I am suspecting it may be for planes that have a steering tiller. I ended up animating my tailwheel with the rudder deflection values instead.

But if you get values from -18 to 18, you should be able to drive the animation. But you will need to bias the simvar so it is in the range of 0-100 since negative values can't correspond to keyframes.

The simvars can be cast to different units. One of the unit types is percent over 100 which is another way of saying percent divided by 100. This allows simvars in the range of 0-100 to be mapped to 0-1.
 
The goal of the animation code is to have the full range of the simvar being converted to values that correspond to a keyframe number. For the gear steer angle, I posted above that I thought it was in radians, but I think it's decimal degrees. And the value range is probably -180 to 180.

In your Blender screenshot, you have negative keyframe values. That won't work as expected. Make them all on the positive side. For angles, it makes most sense to make your keyframes 0-360 completing a full rotation.

The bias is adding a value to the simvar output that will push it in the positive range so that it will line up with your animation keyframes. So one way is to simply add 180. This takes -180 to 180 and turns it into 0-360. The code for that would be something like (A:GEAR CENTER STEER ANGLE, degrees) 180 +

But for angles, there is already a normalization operator dnor. So the same this is the same thing: (A:GEAR CENTER STEER ANGLE, degrees) dnor.

Try some of that and experiment. In Dev Mode, you can enable the Model Behaviors debug window to see how your animation code is interpreted by the sim.
 
The gear steer angle seems to be a tricky one. I haven't been able to get anything to work with it either. I am suspecting it may be for planes that have a steering tiller. I ended up animating my tailwheel with the rudder deflection values instead.

But if you get values from -18 to 18, you should be able to drive the animation. But you will need to bias the simvar so it is in the range of 0-100 since negative values can't correspond to keyframes.

The simvars can be cast to different units. One of the unit types is percent over 100 which is another way of saying percent divided by 100. This allows simvars in the range of 0-100 to be mapped to 0-1.
I have exactly the same issue

Could you share the code you have defined to enable the animation with the rudder deflection simvar ?
 
I have exactly the same issue

Could you share the code you have defined to enable the animation with the rudder deflection simvar ?
Animating on the rudder is easy enough but doesn't follow the true castering movement of the tailwheel. But in practice, it's hard to really notice.

XML:
<UseTemplate Name="ASOBO_GT_Anim">
    <ANIM_NAME>Tailwheel_caster</ANIM_NAME>
    <ANIM_SIMVAR>RUDDER DEFLECTION PCT</ANIM_SIMVAR>
    <ANIM_SIMVAR_UNITS>percent</ANIM_SIMVAR_UNITS>
    <ANIM_SIMVAR_SCALE>1</ANIM_SIMVAR_SCALE>
    <ANIM_SIMVAR_BIAS>50</ANIM_SIMVAR_BIAS>
</UseTemplate>

I have seen a lot of developers have a problem getting the GEAR CENTER STEER ANGLE to work and due to the complexity of all the contact point parameters, it's hard to pin down. But enough times, there seems to be something related to the CG with respect to the contact point locations. I can't be sure without more testing, but it seems you need to have a minimum amount of weight on the center gear to have it respond to steering commands. Also, the sim reduces steering effectiveness when the ground speed increases. This can be adjusted. That would be another area to look at if you find your plane does not turn well on the ground.
 
Animating on the rudder is easy enough but doesn't follow the true castering movement of the tailwheel. But in practice, it's hard to really notice.

XML:
<UseTemplate Name="ASOBO_GT_Anim">
    <ANIM_NAME>Tailwheel_caster</ANIM_NAME>
    <ANIM_SIMVAR>RUDDER DEFLECTION PCT</ANIM_SIMVAR>
    <ANIM_SIMVAR_UNITS>percent</ANIM_SIMVAR_UNITS>
    <ANIM_SIMVAR_SCALE>1</ANIM_SIMVAR_SCALE>
    <ANIM_SIMVAR_BIAS>50</ANIM_SIMVAR_BIAS>
</UseTemplate>

I have seen a lot of developers have a problem getting the GEAR CENTER STEER ANGLE to work and due to the complexity of all the contact point parameters, it's hard to pin down. But enough times, there seems to be something related to the CG with respect to the contact point locations. I can't be sure without more testing, but it seems you need to have a minimum amount of weight on the center gear to have it respond to steering commands. Also, the sim reduces steering effectiveness when the ground speed increases. This can be adjusted. That would be another area to look at if you find your plane does not turn well on the ground.
Hi

thanks for the example

How many frames are in the animation ?

About your suggestion I have already checked the contact point definition and there is a reasonable weight on the center wheel but nothing happens. If I try the delete the compression factor (as suggested in other threads) the weight becomes zero even if I change the contact position to have the gear on the ground)
 
Back
Top