コード例 #1
0
 protected override void Reset()
 {
     base.Reset();
     update_limits();
     ToOrbit.Reset();
     inclinationPID.Reset();
     stage = Stage.None;
 }
コード例 #2
0
        public void ControlCallback(Multiplexer.Command cmd)
        {
            translation_pid.Reset();
            needed_thrust_pid.Reset();
            switch (cmd)
            {
            case Multiplexer.Command.Resume:
                RegisterTo <SASBlocker>();
                NeedCPSWhenMooving();
                break;

            case Multiplexer.Command.On:
                VSL.UpdateOnPlanetStats();
                if (CFG.HF[HFlight.Stop])
                {
                    VSL.HorizontalSpeed.SetNeeded(Vector3d.zero);
                    CFG.Nav.Off(); //any kind of navigation conflicts with the Stop program; obviously.
                }
                else if (CFG.HF[HFlight.NoseOnCourse])
                {
                    CFG.BR.OnIfNot(BearingMode.Auto);
                }
                CFG.AT.OnIfNot(Attitude.Custom);
                goto case Multiplexer.Command.Resume;

            case Multiplexer.Command.Off:
                UnregisterFrom <SASBlocker>();
                ReleaseCPS();
                CFG.AT.OffIfOn(Attitude.Custom);
                CFG.BR.OffIfOn(BearingMode.Auto);
                EnableManualThrust(false);
                break;
            }
        }
コード例 #3
0
 public override void Reset()
 {
     base.Reset();
     throttle_correction.Reset();
     throttle_filter.Reset();
     angle2hor_filter.Reset();
     correction_started.Reset();
 }
コード例 #4
0
 public virtual void Reset()
 {
     dApA                  = dArc = -1;
     LaunchUT              = -1;
     ApAUT                 = -1;
     GravityTurnStart      = 0;
     CircularizationOffset = -1;
     ApoapsisReached       = false;
     Target                = Vector3d.zero;
     ErrorThreshold.Reset();
     pitch.Reset();
     throttle.Reset();
     norm_correction.Reset();
 }
コード例 #5
0
 public void Init()
 {
     eStats = VSL.Engines.NoActiveEngines ?
              VSL.Engines.GetNearestEnginedStageStats() :
              VSL.Engines.GetEnginesStats(VSL.Engines.Active);
     pitch.setPID(TargetedToOrbitExecutor.C.TargetPitchPID);
     pitch.Min = -AttitudeControlBase.C.MaxAttitudeError;
     pitch.Reset();
     throttle.setPID(ToOrbitExecutor.C.ThrottlePID);
     throttle.setClamp(0.5f);
     throttle.Reset();
     throttle_correction.setPID(TargetedToOrbitExecutor.C.ThrottleCorrectionPID);
     throttle_correction.Reset();
     correction_started.Reset();
 }
コード例 #6
0
 public void Reset()
 {
     atPID.Reset();
     avPID.Reset();
 }
コード例 #7
0
 public void Reset()
 {
     OD.Reset();
     avActionFilter.Reset();
     pid.Reset();
 }