Repository navigation
Conversation
…it or still spooling up
…, not on a staged booster
… the thrusters 10 to 1, the thrusters keep only roll
…s (RP-1 without enough avionics)
… lift off on its RCS
|
👍 |
✅ Build Artifact 🚀MechJeb2-d4dc331.zip (built from 9b787ce) |
|
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
Fixes #2745: the three RCS problems reported there, with the smallest changes found. One commit per change.
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'sConfigNode.LoadObjectFromConfigreads a value whatever itspass, so keeping the old key would have loaded every player's globalrcsThrottle = Trueagain. Existing players therefore start with it off on every craft. Fixes 1 and 2 still apply on a craft where it is turned on.No RCS throttle on the pad.
VesselState.ToggleRCSThrustskips RCS throttle while the vessel isPRELAUNCH(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.ThrustAvailableno longer counts RCS thrust there either. This applies only to vessels with engines (counted inAnalyzeParts' existing parts loop), so an RCS-only craft spawned at a launch site still lifts off on the throttle. A lander on a moon isLANDED, so an RCS-only takeoff there is unchanged.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.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 reusesDisableRcsRotation/RestoreRcsRotationfrom "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:
rcsThrottle = Truein the global fileUnit 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.