Home›Sim Utilities›SR22 tire side force
SR22 tire side force
FlyWithLua script for X-Plane 12 · XP12_TireSideForce.lua
Download (.zip) Download (.lua)
Flown for about a month in the X-Plane 12 SR22. It greatly improves taxiing and the takeoff roll.
The problem
On the ground, the stock X-Plane 12 Cirrus SR22 has weak sideways tire grip. During taxi and on the takeoff or landing roll it drifts and weaves, as if it were sitting on water or ice.
The real SR22 has a free-castering nosewheel. The nosewheel is not connected to the rudder pedals. It swings to follow wherever the airplane goes, and you steer on the ground with differential braking, pressing one toe brake harder than the other. Because the nosewheel does not hold a line, the sideways grip of the tires is what keeps the airplane straight. When that grip is too weak in the sim, nothing stops the slide.
What the script does
While the airplane is on the ground, the script measures how much it is moving sideways compared with where the nose points. It then adds a gentle push back toward the nose direction, plus a small turning force that straightens the airplane and calms a sudden swing. This is a rough imitation of real tire grip. It does not replace X-Plane's own tire model, it adds to it.
The push grows with the airplane's weight and is capped so it cannot spike. When you hold one toe brake much harder than the other, the script backs off, so you can still pivot the airplane around a locked wheel.
Requirements
- X-Plane 12.
- FlyWithLua NG+ for X-Plane 12, free. Download it from its official page on X-Plane.org: FlyWithLua NG+ (Next Generation Plus) Edition for X-Plane 12. A free X-Plane.org account is needed to download.
Install
- Quit X-Plane.
- Install FlyWithLua NG+ if you do not have it. Unzip its download into
X-Plane 12/Resources/plugins/, so you end up with aResources/plugins/FlyWithLua/folder. - Download the script above. If you took the .zip, unzip it.
- Copy
XP12_TireSideForce.luaintoX-Plane 12/Resources/plugins/FlyWithLua/Scripts/. - Start X-Plane. If X-Plane was already running, use Plugins > FlyWithLua > Reload all Lua script files instead.
- Load the SR22 and taxi. If it feels glued, lower
LATERAL_GAIN. If it still feels loose, raise it a little.
To check that it loaded, look in X-Plane 12/Log.txt for XP12_TireSideForce: loaded for this aircraft. On other airplanes it writes loaded, but this aircraft is not in ALLOWED_AIRCRAFT. Idle.
Tuning
Open the .lua file in a text editor. The settings are at the top under USER SETTINGS. Save the file, then reload Lua scripts.
| Setting | Default | What it does |
|---|---|---|
LATERAL_GAIN | 1.0 | Overall strength. Try 0.6 if it feels glued. Try 1.4 to 1.8 if it still weaves. |
MAX_FORCE_N | 8000.0 | Safety cap on the extra side force, in newtons. |
MAX_YAW_NM | 12000.0 | Safety cap on the extra straightening (yaw) force, in newton-meters. |
BRAKE_UNLOCK | 0.55 | When either toe brake is above this, and the two brakes differ, the script fades out so you can pivot on a locked wheel. |
MAX_GS_KTS | 55.0 | Only works below this ground speed, in knots. |
MIN_SLIP_RAD | 0.008 | Ignores tiny sideways slip so the airplane does not twitch while parked. |
LIMIT_TO_LIST | true | true runs only on the airplanes in ALLOWED_AIRCRAFT. false runs on every airplane. |
ALLOWED_AIRCRAFT | "SR22", "Cirrus", "SR20" | Names matched, ignoring case, against the aircraft file name and ICAO type. Add more types if you want the same feel on them. |
When it is active
- Only on the ground, and only when the sim is not paused.
- Only between 0.4 and 55 knots ground speed.
- Not when the parking brake is set (above 0.8).
- It fades when one toe brake is held hard and the two brakes differ by more than 0.25.
- Only on aircraft whose name or ICAO type contains SR22, Cirrus, or SR20, unless you change
LIMIT_TO_LIST.
Uninstall
Delete XP12_TireSideForce.lua from X-Plane 12/Resources/plugins/FlyWithLua/Scripts/, then restart X-Plane or reload Lua scripts. Leave FlyWithLua in place if other scripts use it.
For the flight simulator only. Not for real aircraft.