MechJeb2

MechJeb2

4M Downloads

Question: am I the only one facing oversteering in multiple engines design?

TrogloGeek opened this issue ยท 4 comments

commented

When designing a lifter having multiple surface attached engines but no central engine (the bottom of this design being a docking ring), each time MechJeb has to realign the vessel with engine being in use I face an oversteer oscillation situation with slowly growing amplitude. I think I tried every enabling state of the tuple { RCS, Gimbal, SAS torque } (except having the three of them disabled...) but the problem remains.

I thought it was an issue with another module (TweakScale and TCA being my main suspects) but I tried such a design with a fresh Steam install and only MechJeb2 installed using CKAN installer but the problem remains.

The thing that I find weird is that the stock SAS guidance on the same maneuver node does not have the same oversteering issue. This is still annoying for me because I intend to use such vessel with autolanding guidance (this ship is designed do land my Mun base modules, and take this base produced fuels to orbit).

MJTest.zip

I guess this is a PEBKAC issue so feel free to tell me what I'm doing wrong relative to MechJeb2 paradigms.

commented

You have to use the Attitude Adjustment window. Try use the KOS or Hybrid controllers. If that fails you need to start playing around with PID tuning (I don't have any good suggestions about what to do there)

commented

I created a personal patch to overcome this:
https://www.dropbox.com/s/8qrgvmzqxedl2az/zzz_useGimbalReponseTime.cfg?dl=1

or

@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[~gimbalResponseSpeed[]]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]
	{
		%useGimbalResponseSpeed = true
		%gimbalResponseSpeed = 6
	}
}

@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#gimbalRange[>0]],@MODULE[ModuleEngines]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]
	{
		temp = #$gimbalRange$
		@gimbalRange /= #$/mass$
		tempa = #$gimbalRange$
		tempb = #$/MODULE[ModuleEngines]/maxThrust$
		@gimbalRange /= #$tempb$
		@gimbalRange *= 500
		@gimbalRange /= #$tempa$
		@gimbalRange *= #$/mass$
		tempc = 0
		@tempc += #$gimbalRange$
		@tempc -= #$temp$
		@gimbalResponseSpeed /= #$/mass$
	}
}

@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#tempc[>0]],@MODULE[ModuleEngines]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]
	{
		@gimbalRange = #$temp$
	}
}
	
@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#gimbalRange[>0]],@MODULE[ModuleEnginesFX]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]
	{
		temp = #$gimbalRange$
		@gimbalRange /= #$/mass$
		tempa = #$gimbalRange$
		tempb = #$/MODULE[ModuleEnginesFX]/maxThrust$
		@gimbalRange /= #$tempb$
		@gimbalRange *= 500
		@gimbalRange /= #$tempa$
		@gimbalRange *= #$/mass$
		tempc = 0
		@tempc += #$gimbalRange$
		@tempc -= #$temp$
		@gimbalResponseSpeed /= #$/mass$
	}
}

@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#tempc[>0]],@MODULE[ModuleEnginesFX]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]
	{
		@gimbalRange = #$temp$
	}
}
	
@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#gimbalResponseSpeed[>15]]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]
	{
		@gimbalResponseSpeed = 15
	}
}

@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#gimbalResponseSpeed[<6]]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]
	{
		@gimbalResponseSpeed = 6
	}
}
	
@PART[*]:HAS[@MODULE[ModuleGimbal]:HAS[#temp[*]|#tempa[*]|#tempb[*]|#tempc[*]],@MODULE[ModuleEngines*]]:NEEDS[!RealismOverhaul]:FINAL
{
	@MODULE[ModuleGimbal]
	{
		!temp = delete
		!tempa = delete
		!tempb = delete
		!tempc = delete
	}
}

// Ferram Aerospace Research
//
// ATTENTION:
// You have to delete the following config:
// GameData\FerramAerospaceResearch\stockEngineGimbalIncrease.cfg
//
// @PART[*]:HAS[@MODULE[ModuleGimbal]]:NEEDS[!RealismOverhaul,FerramAerospaceResearch]:FINAL
// {
	// @MODULE[ModuleGimbal]
	// {
		// @gimbalResponseSpeed *= 1.5
	// }
// }

commented

@Gordon-Dry thank you for the patch, works very well.

commented

closing for #1050