Skip to content

RCS: no RCS throttle on the pad or on a separated booster; gimbals before RCS (#2745) - #2753

Open
sarbian wants to merge 6 commits into
devfrom
fix/rcs-annoyances
Open

sarbian wants to merge 6 commits into
devfrom
fix/rcs-annoyances

Conversation

@sarbian

@sarbian sarbian commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2745: the three RCS problems reported there, with the smallest changes found. One commit per change.

  1. RCS throttle is per craft and off by default (from the review). KSP's own "Fore by Throttle" on the RCS parts is the usual way to thrust forward on RCS; this setting stays as a fallback for a craft built without it, and Smart RCS says so under the toggle while it is on. It is saved per vessel and per craft name (Pass.LOCAL | Pass.TYPE) under a new key, rcsThrottlePerCraft: KSP's ConfigNode.LoadObjectFromConfig reads a value whatever its pass, so keeping the old key would have loaded every player's global rcsThrottle = True again. Existing players therefore start with it off on every craft. Fixes 1 and 2 still apply on a craft where it is turned on.

  2. No RCS throttle on the pad. VesselState.ToggleRCSThrust skips RCS throttle while the vessel is PRELAUNCH (KSP keeps that until 2.5 m/s surface speed or until it leaves the ground): before staging, on the clamps, and while the engines spool up after ignition. ThrustAvailable no longer counts RCS thrust there either. This applies only to vessels with engines (counted in AnalyzeParts' existing parts loop), so an RCS-only craft spawned at a launch site still lifts off on the throttle. A lander on a moon is LANDED, so an RCS-only takeoff there is unchanged.

  3. A separated booster with its own MechJeb leaves its RCS alone. RCS throttle applies only on the active vessel, or when an autopilot drives this vessel's throttle (Users.Count > 1; the controller pins itself as the first user), so a future boostback autopilot keeps it.

  4. Gimbals before RCS (new setting in Smart RCS, on by default, threshold 0.1). While MechJeb's attitude control is on and the engines produce thrust, if the gimbals out-torque the RCS more than 10 to 1 on both pitch and yaw, the thrusters' pitch and yaw flags go off and roll stays on. Everything comes back when the engines stop, and while another mod has taken MechJeb's controls (DeactivateControl, RP-1 without enough avionics). It reuses DisableRcsRotation/RestoreRcsRotation from "Use RCS for rotation", which already saves the thrusters' own flags across saves, staging and undocking. The decision is held until the engines stop, because the RCS torque reads 0 once the flags are off. The toggle and the threshold are also info items.

Flown in KSP 1.12.5 (stock + 3.2x), dev against this branch, on a Kerbal X with its own MechJeb (RCS throttle turned on for it) and aft-firing RCS on the core booster:

dev this branch
Pad, full throttle before staging RCS fires 3.4 kN none
Engines staged, on the clamps 3.4 kN none
Separated booster, 6 s its MechJeb drives Z = -1: 8 kN, 43.8 kN s into the upper stage 0.00 kN
20 s ascent burn, MechJeb attitude RCS pitches and yaws throughout, 1.91 units of monoprop roll only, 0.70 units, same 0.0 deg pointing error
Controls taken / given back mid-burn all three axes back in 0.01 s / pitch and yaw off again in 0.01 s
After cutoff all three axes back in 0.03 s
Engineless craft (DockTug-light) on the pad, RCS throttle turned on still RCS-throttled: Z = -1, 3.39 kN
RCS throttle on a craft never set, with rcsThrottle = True in the global file on off
Turned on in one flight, the same craft launched again on

Unit tests: 15373 passed.

Not handled: gimbals that can roll, and the gimbals' response delay against the RCS's (the threshold is the knob). A core that stops being the vessel's master MechJeb mid-burn (a docking) keeps its thrusters' pitch and yaw off until it is unloaded, as "Use RCS for rotation" already did.

@lamont-granquist

Copy link
Copy Markdown
Collaborator

👍

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Artifact 🚀

MechJeb2-d4dc331.zip (built from 9b787ce)

@lamont-granquist

Copy link
Copy Markdown
Collaborator

So one thing to consider here is that rcsThrottle likely predates fore-by-throttle being added to KSP in the RCS tweakables.

The better solution might be to just turn that off by default. Push users to correctly configuring their RCS to be fore-by-throttle if they expect their RCS to be used as engines and not just attitude control. Then #1 and #2 sort of go away. The rcsThrottle then remains as a bit of a footgun and it might be good to make it something that only binds to certain ships/RCS engines and make it less likely for users to turn it back on globally and leave it on. More of hack to work around having forgotten to enable fore-by-throttle (although "you didn't build your rocket correctly; enjoy the learning experience" is part of the game...).

… the RCS parts is the usual way to thrust forward on RCS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Several RCS annoyances

2 participants