Пример #1
0
 public override void Init()
 {
     base.Init();
     Dtol = LTRJ.Dtol;
     CorrectionTimer.Period = LTRJ.CorrectionTimer;
     StageTimer.action      = () =>
     {
         VSL.ActivateNextStage();
         Message("Have to drop ballast to decelerate...");
     };
     dP_up_timer.action = () =>
     {
         dP_threshold = Utils.ClampL(dP_threshold * 0.9, LTRJ.MinDPressure);
         last_dP      = VSL.vessel.dynamicPressurekPa;
     };
     dP_down_timer.action = () =>
     {
         dP_threshold = Utils.ClampH(dP_threshold * 1.1, LTRJ.MaxDPressure);
         last_dP      = VSL.vessel.dynamicPressurekPa;
     };
     NoEnginesTimer.action = () =>
     {
         landing_stage = LandingStage.HardLanding;
     };
     sim                  = new AtmoSim(VSL);
     Executor             = new ManeuverExecutor(TCA);
     scanner              = new PQS_Scanner(VSL);
     scanner.MaxUnevennes = GLB.LND.MaxUnevenness / 3;
     dP_threshold         = LTRJ.MaxDPressure;
     last_Err             = 0;
     last_dP              = 0;
     Working              = false;
 }
Пример #2
0
 public bool ActivateInactiveEngines()
 {
     if (CFG.AutoStage && NoActiveEngines && HaveNextStageEngines)
     {
         VSL.ActivateNextStage(); return(true);
     }
     return(false);
 }
Пример #3
0
        public bool ActivateNextStageOnFlameout()
        {
//            Log("NoActiveEngines {}, HaveThrusters {}, HaveNextStage {}", NoActiveEngines, HaveThrusters, HaveNextStageEngines);//debug
            if (!CFG.AutoStage || !HaveNextStageEngines)
            {
                return(false);
            }
            var this_engines = All.Where(e => e.Role != TCARole.MANEUVER && e.part.inverseStage >= vessel.currentStage).ToList();

//            Log("this stage engines: {}", this_engines);//debug
            if (this_engines.Count == 0 || this_engines.Any(e => e.engine.flameout))
            {
                VSL.ActivateNextStage(); return(true);
            }
            return(false);
        }
Пример #4
0
 public override void Init()
 {
     base.Init();
     Dtol = LTRJ.Dtol;
     CorrectionTimer.Period = LTRJ.CorrectionTimer;
     StageTimer.action      = () =>
     {
         VSL.ActivateNextStage();
         Message("Have to drop ballast to decelerate...");
     };
     dP_up_timer.action = () =>
     {
         dP_threshold = Utils.ClampL(dP_threshold * 0.9, LTRJ.MinDPressure);
         last_dP      = VSL.vessel.dynamicPressurekPa;
     };
     dP_down_timer.action = () =>
     {
         dP_threshold = Utils.ClampH(dP_threshold * 1.1, LTRJ.MaxDPressure);
         last_dP      = VSL.vessel.dynamicPressurekPa;
     };
     sim      = new AtmoSim(Body, VSL);
     Executor = new ManeuverExecutor(TCA);
 }