Skip to content

Commit

Permalink
Increase Pos deadband to 0.002
Browse files Browse the repository at this point in the history
This is 20x higher and is equivalent to 0.1 degrees.  Helps to
stabilize an Atlas-Centaur from Nazfib.

If this needs to go any direction it should probably go down since
20x might have been aggressive.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed Jun 18, 2023
1 parent 66836f5 commit 1f51064
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MechJeb2/AttitudeControllers/BetterController.cs
Expand Up @@ -15,7 +15,7 @@ internal class BetterController : BaseAttitudeController
private readonly EditableDouble PosKp = new EditableDouble(1.98);

[Persistent(pass = (int)(Pass.Type | Pass.Global))]
private readonly EditableDouble PosDeadband = new EditableDouble(0.0001);
private readonly EditableDouble PosDeadband = new EditableDouble(0.002);

[Persistent(pass = (int)(Pass.Type | Pass.Global))]
private readonly EditableDouble VelKp = new EditableDouble(10);
Expand Down Expand Up @@ -74,7 +74,7 @@ internal class BetterController : BaseAttitudeController
private void Defaults()
{
PosKp.val = 1.98;
PosDeadband.val = 0.0001;
PosDeadband.val = 0.002;
VelKp.val = 10;
VelKi.val = 20;
VelKd.val = 0.425;
Expand All @@ -89,7 +89,7 @@ private void Defaults()
maxStoppingTime.val = 2;
minFlipTime.val = 120;
rollControlRange.val = 5;
_version = 4;
_version = 5;
}

private readonly PIDLoop[] _pid = { new PIDLoop(), new PIDLoop(), new PIDLoop() };
Expand Down

0 comments on commit 1f51064

Please sign in to comment.