MechJeb2

MechJeb2

4M Downloads

RCS keeps getting enabled when toggling autopilot and when staging

Gouvernathor opened this issue ยท 31 comments

commented

I didn't find any option to disable that in the ascent autopilot settings.
This is using my RCS reserves without asking for permission, kinda rude.

When I'm on the landing pad, the mod doesn't even allow me to deactivate RCS !

commented

Would one of you two mind posting your logs when you've been in flight mode long enough for this to happen?

Which log file(s) exactly? KSP.log? And, I assume, with AutoRCSUllaging = True?

commented

@Sinomen Narrow that down to Real Fuels which you can have installed independently of RO or RSS. That is what is being looked for.
That said, it should only ever trigger if commanded throttle is > 0 and there is unstable ullage, so it's clearly missing some checks. There's only 4 files where AutoRCSUllaging is referenced so it shouldn't be too hard to find.

commented

No Real Fuels installed here.
Which 4 files are referencing AutoRCSUllaging ?

commented

If you don't even have RF installed then that is definitely a problem, but it should make it easier to track down. I'm on my phone so I'll have to wait until I'm back on my PC to comment further.

commented

No Real Fuels either on my side.

commented

if (InverseStageHasUnstableEngines(Vessel.currentStage - 1) && Core.Thrust.AutoRCSUllaging && Vessel.hasEnabledRCSModules() &&

if (!Core.Thrust.AutoRCSUllaging)

public bool AutoRCSUllaging = true;

I am leaning towards this being in the thrust controller but it could be a bit deeper where it actually checks ullage. Without RF installed, all ullage checks are supposed to be assumed stable but I don't like the way that's implemented at that level. There's no sanity check and it depends on an update to actually SET the field as stable, and that leads to race conditions.

(I said 4 but this last one is just ascent guidance settings, it doesn't touch RCS itself)

Core.Thrust.AutoRCSUllaging = true;

commented

Would one of you two mind posting your logs when you've been in flight mode long enough for this to happen?

commented

I should have said flight scene which includes the pad, prelaunch, landed, etc.

Logs are in the KSP folder and they're always generated.

I can make a pull request that might fix this but I won't be able to build it and test it myself because I'm not set up for it. But it might not be enough which is why I'd like to check someone's log for some things.

commented

I don't know how to generate logs, but in any case the bug happens on the launchpad so you don't need to wait "in flight mode" to see it.

commented

RCS is always active when enabling MJ, be it Ascent Guidance, be it Node Execution. No Kopernicus/RO/RSS installed. This bug is persistent since build #1344.

commented

Sounds like RCS auto mode is on. There is a setting for that in the attitude adjustment window.

(and the landing guidance window has a similar RCS control for killing lateral motion)

commented

Reminds me of Autostaging issue #1658: changes were made, things went broke.

commented

Would one of you two mind posting your logs when you've been in flight mode long enough for this to happen?

Which log file(s) exactly? KSP.log? And, I assume, with AutoRCSUllaging = True?

Yes and yes.

commented

The "RCS auto mode" is disabled in the attitude adjustment window, which I never opened before.
The one in landing guidance is still enabled, but I suppose (as it did before) that that setting only changes anything for specific moments during the landing autopilot, and not to unrelated modules (ascent guidance or auto maneuver for example).

commented

Sounds like RCS auto mode is on. There is a setting for that in the attitude adjustment window.

(and the landing guidance window has a similar RCS control for killing lateral motion)

RCS auto mode is off, never was on. As I said, the issue came up with #1344, never before, and is persistent since.

Workaround: in GameData\MechJeb2\Plugins\PluginData\MechJeb2 delete all vessel specific config files if required.. Edit mechjeb_settings_global.cfg, change AutoRCSUllaging from True to False, provided you don't need that RCS Ullage.

Said RCS Ullage setting should only be active using RO or RSS, yet it is even active in vanilla.

commented

still enables itself on its own when executing a maneuver burn.

Do you somehow have "RCS Burn" checked in the maneuver planner?

commented

Nope.

commented

Never mind the log. I made new install with just MJ/MM and I didn't see what I was looking for.

I could only partially replicate it though. It happened anytime I tried to throttle up but not when staging or using other autopilot functions. And enabling the auto RCS in attitude adjustment didn't turn RCS off reliably. I don't think that's related to this bug though.

commented

For me, it definitely happens using the Ascent Guidance and the Node Execution, other MJ functions I only use rarely. Enabling the Ascent Guidance, the RCS thrusters are becoming active immediately while the vessel is still on the launch pad.

commented

For me, it happens not only when you throttle up (manually), but also maybe one second ahead of firing the engine when executing a maneuver node.

Maybe we can send our saved settings to you, it could be related ?

commented

It's the ship I tested with. While technically stageable, it didn't have multiple stages. That was why it didn't happen for me at first.

commented

For me, it happens ... maybe one second ahead of firing the engine when executing a maneuver node.

Which totally makes sense, the problem is the forced RCS ullaging, imo.

commented

The pull request I made was merged in. Try the latest dev build.

commented

Nope, RCS is still enabled and impossible to deactivate when on the launchpad. RCS still enables itself around 1s before starting a maneuver node.

commented

Nope, RCS is still enabled and impossible to deactivate when on the launchpad. RCS still enables itself around 1s before starting a maneuver node.

I concur.

commented

It is now possible to deactivate RCS while on the launchpad. However, it is still enabled by default, and still enables itself on its own when executing a maneuver burn.

commented

#1876 should fix the node executor RCS issue but i didn't test.

commented

#1877 may fix the rest of it

commented

@lamont-grandquist @Starwaster any news ?

commented

That seems to finally work !!

commented

It also triggers during landing guidance, whenever the thrust is very low, it seems. I have to spend a lot of time just shutting off the RCS, it's very annoying and borders unplayable.