Jump to content

My Flywithlua Script for rudder pedal steering for ini300/310


Umi Akai

Recommended Posts

Hi, as we know, with ini's A300/310, if Nosewheel steering set to Tiller as you have a hardware for it, the rudder pedal would not move nosewheel at all, while IRL the rudder pedal would have 6 degree of control on it, this make high-speed taxi and initial  take off roll extremely hard to control.

ini says they'll look into... but years gone....so I decide made my own one...

Disclaimer:

1. this script does not intended to simulate actually system working, and may not work accurate with all condition (especially with failure), however it's useful as my test for normal high-speed taxi and initial take off roll (especially with some cross wind).

2. you may need some basic skill on Flywithlua and DataRefTool to work with this script, my script almost certain would not work on your system right away.

Here is the code, if you don't know how to use it, probably you'll need get some basic study on "Flywithlua" before try it:

if (PLANE_ICAO ~= "A306" and PLANE_ICAO ~= "A310" and PLANE_ICAO ~= "A3ST") then 
--this is my way to detect airplane, you might use different one, if you have other non-ini's A306/A310/A3ST
do
	return
end
	
else

	dataref("I3_AIRGN", "sim/flightmodel/failures/onground_any", "readonly")
	dataref("I3_RUDDER", "sim/flightmodel/controls/ldruddef", "readonly")
	dataref("I3_NOSEST", "sim/flightmodel2/gear/tire_steer_command_deg", "writable",0)
	dataref("I3_NOSESTW", "sim/joystick/joy_mapped_axis_value", "readonly",37) --this is my joystick map for tiller, it's almost certain you'll have a different one 
	
	
	function I3_RD_NWST()
		if I3_AIRGN == 1 then
			if I3_NOSESTW < 0.03 and I3_NOSESTW > -0.03 then -- I use 0.03 as a "deadzone" for tiller to enable rudder input, you may need different value.
			I3_NOSEST = I3_RUDDER * 0.1935
			end
		end
	end
	
	do_every_frame("I3_RD_NWST()")
end

 

Link to comment
Share on other sites

  • 2 weeks later...

well, after few days of test flying, there are few problems:

1. it'll block better pushback for turning the aircraft, so I had to add another condition for

if I3_RUDDER > 0.03 or I3_RUDDER < -0.03 then

Thus better pushback could works when all controller are neutral

And somehow A3ST have negative rudder output number, so I have to make a separate lua for it with "*-0.1935"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...