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

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
Hi guys

Has anyone tried the KEY_STEERING_SET event with success and if so what are the requirements for it to operate?

Thanks
JB
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
The problem is that if I use anything other than 180 it has no effect when I want to keep the nosewheel straight.
 
Messages
1,749
Country
unitedstates
Using 180 in the cfg is good for free casting and using 35 45 for example in cfg is good for steerable gear. So i agree you don't want 180 unless your using free cast steering. And if the aircraft is not moving it's already at that event position. So maybe you need a rule to keep that setting alive to make it work. I wonder why that code exists as i can't think of a reason to have it since the steering is always centered unless there is speed and rudder pedals used while on the runway unless you animate it using the rudder which i think is never used.

Just curious what will you use this event for?
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
In some aircraft(mostly military fighters), unless nosewheel steering is active the nosewheel will stay straight and you wont have any steering effect until the rudder kicks in at speed. That's what I want to simulate.
 
Messages
1,749
Country
unitedstates
By default the 2 methods i already use keep the wheel straight until you get moving above 3 knots and have rudder pedal turned. The faster you travel across the runway it moves less. And if your in the air the wheel is locked straight. Rudder has no effect as it moves any time. Do you want a tutorial?
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
No I have an alternative method I am already using. I prevent the rudder inputs from being sent to the sim unless NWS is active. If it is not, I put the rudder inputs into the rudder trim instead to get the yaw moments purely from the airflow over the rudder.
 
Messages
1,749
Country
unitedstates
I like the default method because it uses no rudder input just pedal input and makes the steering act like it should. Then you use the same animation but use 180 for free cast and 35 or 45 for a steerable wheel. So no need for coding to prevent rudder input. I think Bill taught me this when i built my first aircraft and i tried to use the rudder code for steering.o_O
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
All I can say is I think the concept you have of nose wheel steering vs what I needed to achieve are a bit different...
 
Messages
1,749
Country
unitedstates
I am thinking the same thing. I am working on my nose wheel for this Learjet 35A and it has 2 more functions that i have never implemented before. It has steer lock and MSV switches. So i too and going to have to create a way to lock the steering. For taxi you use the steer lock switch and for takeoff you hold the msv switch and then release after takeoff. i am going to have to put on my thinking cap and spend some time to get this working. And i think for the MSV switch the user will have to create a joystick assignment so they can hold the switch. So maybe i can use a spare default switch like the Concord nose up or find another good one.
 

Heretic

Resource contributor
Messages
6,830
Country
germany
Here's code I've written for the Metroliner.
No hydraulic pressure, system off - free castoring, so x-axis velocity sets NWS angle until 40 KIAS when the rudder kicks in
Hyd pressure, system on - work as inteded
"Park" button - center NWS:
Code:
(A:HYDRAULIC PRESSURE:1, psi) 1000 <
  (A:HYDRAULIC PRESSURE:2, psi) 1000 <
  or
  (L:MP_MISC_NWS_Arm_Switch, Enum) 1 !=
  and
  if{ (A:VELOCITY BODY X,feet per second) 0.001 >
  (A:VELOCITY BODY X,feet per second) 0.001 <
  or
  (A:GROUND VELOCITY, knots) 40 <
  and
  (A:SIM ON GROUND, Bool) 0 !=
  and
  if{ (A:VELOCITY BODY X,feet per second) 10 * 16383 * (>K:RUDDER_SET)  }
  
  (L:MP_MISC_NWS_Park_Button, Bool) 0 !=
  (A:GEAR CENTER STEER ANGLE PCT,percent) 0 !=
  and
  if{ 0 (>K:RUDDER_SET) } }

It's a visually rather unpleasant solution, but it was aftermarket after all.
I'm 220% sure that a visually twitching rudder can be avoided with proper communication between modelers and coders.

Nota bene: STEERING_SET and RUDDER_SET do the same as both rudder and NWS are inherently linked in FSX.
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
Yep I resolved the problem by using rudder trim for the rudder effect when on the ground and rudder for NWS.
 
Messages
1,052
Country
australia
Having a look at this tonight and finding as Heretic. If you set the rudder then that sets the gear steer angle and it seems impossible to separate these. If I use STEERING_SET then this will always be overridden by a RUDDER_SET or AXIS_RUDDER_SET event so it makes STEERING_SET to be rather useless.

I can capture the AXIS_RUDDER_SET with simconnect and mask that from the sim so for my purposes I will have to do something like Heretics example where I set the rudder on the ground with RUDDER_SET depending on the speed/velocity body x and to avoid visual problems I set the model of the rudder to display what I capture with AXIS_RUDDER_SET.

Lots of brain work needed here.
 
Messages
1,052
Country
australia
Think I may try a different tack.

As a reminder here are my requirements:

A castoring tail wheel which can be set by the pilot to a limited steering tail wheel during takeoff and landing (about 8 deg steering).

Here is my new plan. In the aircraft.cfg set the tail wheel to be castoring (180 steer angle) and provide a tailwheel lock. Then, when the tailwheel lock is on I will use simconnect to adjust ROTATION VELOCITY BODY Y depending on speed and rudder angle. Should kind of work maybe. Will see how it goes.
 
Messages
1,052
Country
australia
After some work I think I've got something working for me. I required a fully castoring tail wheel (taildragger aircraft) but one which can be set by the pilot to be a limited steering tail wheel during takeoff and landing (+/-9 deg steering while the rudder moves +/- 30 deg).

Here is what I did:
In the aircraft.cfg under [contact_points] set the tail wheel steer angle to 180 ( to make it castoring). Also add tailwheel_lock = 1 to the same section to implement a tailwheel lock.

In a simconnect gauge, if the tailwheel lock is on I read (A:WHEEL RPM:0,rpm) and (A:GEAR ANIMATION POSITION:0,keyframe) . If the rpm is higher than 24 then I assume the plane is moving. Anything below this and the plane is stopped or about to stop, it never stays a value like 23 or 25. This number is probably aircraft dependent. If the animation position is greater than 100 then the wheel is on the ground. Didn't use sim on ground here because the tail wheel might be off the ground with the main gear still on it so animation position would be the most reliable way of knowing if the tail wheel is on the ground.

If the aircraft is moving and the tailwheel is on the ground and the tailwheel lock is on then I use a SimConnect_SetDataOnSimObject to nudge the "ROTATION VELOCITY BODY Y", "Feet Per Second". Rudder_deflection (in radians so the range returned is +/-0.523) / 3 provides the value of the nudge and works for this aircraft.

Finally the modeldef for the display of the tailwheel. This needs to be set so that when the tailwheel lock is on the source of the keyframes is the rudder position appropriately scaled (remember at 30 deg rudder there is 9 deg tailwheel) otherwise it uses the normal tailwheel animation position.

All I need to do know is just scale the nudge a bit when the speed is very low as at the moment it turns just a bit too fast when below a couple of knots.

Otherwise this provides surprisingly good control during takeoff/landing. It's not perfect but then neither is the default FSX steering.
 
Messages
12
Country
ca-ontario
I was looking into this today for my own project. It appears to me that the STEERING_SET is summed with the rudder position, so a statement like "0 (>K:STEERING_SET)", doesn't actually set the steering direction to 0, but rather, sets the offset from the rudder position to 0 (i.e. does nothing). Compare that to something like "5000 (>K:STEERING_SET)" - you'll find your aircraft driving off aggressively to the right, but correctable with pedal input. Bottom line is; it appears that if you use the STEERING_SET key event to counteract the rudder input, you can null out the steering direction. I found this bit of TEST code executed at 18 hz in an <Update> script appeared to do a reasonable job of giving me NWS control:

(L:NWS_on, bool) if{ 0 (>K:STEERING_SET) }
els{ (A:RUDDER PEDAL POSITION, part) 16384 * (>K:STEERING_SET) }

As one would hope, this technique allows steering with brakes and once you've attained some air speed, rudder steering as well. It's not perfect though as there seems to be some sort of slight lag between the pedal steering input and the offsetting assignment that I don't understand that allows a bit of pedal steering input to momentarily leak through when NWS is off.

I'm pretty new at XML gauges, so if you're interested, please confirm my findings and if you have a better way, I'm all ears!
 
Top