Simulation Instruments

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.

SR22 taxi, screenshot coming soon

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

Install

  1. Quit X-Plane.
  2. Install FlyWithLua NG+ if you do not have it. Unzip its download into X-Plane 12/Resources/plugins/, so you end up with a Resources/plugins/FlyWithLua/ folder.
  3. Download the script above. If you took the .zip, unzip it.
  4. Copy XP12_TireSideForce.lua into X-Plane 12/Resources/plugins/FlyWithLua/Scripts/.
  5. Start X-Plane. If X-Plane was already running, use Plugins > FlyWithLua > Reload all Lua script files instead.
  6. 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.

SettingDefaultWhat it does
LATERAL_GAIN1.0Overall strength. Try 0.6 if it feels glued. Try 1.4 to 1.8 if it still weaves.
MAX_FORCE_N8000.0Safety cap on the extra side force, in newtons.
MAX_YAW_NM12000.0Safety cap on the extra straightening (yaw) force, in newton-meters.
BRAKE_UNLOCK0.55When 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_KTS55.0Only works below this ground speed, in knots.
MIN_SLIP_RAD0.008Ignores tiny sideways slip so the airplane does not twitch while parked.
LIMIT_TO_LISTtruetrue 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

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.