SetScale() public method

public SetScale ( double newScale ) : void
newScale double
return void
コード例 #1
0
 public void SetScale(double newScale)
 {
     scale      = newScale;
     scaleRecip = 1d / scale;
     if (rfSolver != null)
     {
         rfSolver.SetScale(scale);
     }
 }
コード例 #2
0
        public override void CreateEngine()
        {
            rfSolver = new SolverRF();
            if (!useAtmCurve)
            {
                atmCurve = null;
            }
            if (!useVelCurve)
            {
                velCurve = null;
            }

            // FIXME quick temp hax
            if (useAtmCurve)
            {
                if (maxEngineTemp == 0d)
                {
                    maxEngineTemp = 2000d;
                }
                if (chamberNominalTemp == 0d)
                {
                    chamberNominalTemp = 950d;
                }
            }
            else
            {
                if (maxEngineTemp == 0d)
                {
                    maxEngineTemp = 3600d;
                }
                if (chamberNominalTemp == 0d)
                {
                    chamberNominalTemp = 3400d;
                }
                if (tempGaugeMin == 0.8d)
                {
                    tempGaugeMin = 0.95d;
                }
            }
            double thrustVariation = varyThrust * RFSettings.Instance.varyThrust;

            chamberNominalTemp *= (1d - thrustVariation);

            rfSolver.InitializeOverallEngineData(
                minFuelFlow,
                maxFuelFlow,
                atmosphereCurve,
                useAtmCurve ? atmCurve : null,
                useVelCurve ? velCurve : null,
                useAtmCurveIsp ? atmCurveIsp : null,
                useVelCurveIsp ? velCurveIsp : null,
                disableUnderwater,
                throttleResponseRate,
                chamberNominalTemp,
                machLimit,
                machHeatMult,
                flowMultMin,
                flowMultCap,
                flowMultCapSharpness,
                thrustVariation,
                (float)part.name.GetHashCode());

            rfSolver.SetScale(scale);

            engineSolver = rfSolver;
        }
コード例 #3
0
 public void SetScale(double newScale)
 {
     scale = newScale;
     rfSolver?.SetScale(scale);
 }
コード例 #4
0
        public override void CreateEngine()
        {
            rfSolver = new SolverRF();
            if(!useAtmCurve)
                atmCurve = null;
            if(!useVelCurve)
                velCurve = null;
            if (!useThrustCurve)
                thrustCurve = null;

            // FIXME quick temp hax
            if (useAtmCurve)
            {
                if (maxEngineTemp == 0d)
                    maxEngineTemp = 2000d;
                if (chamberNominalTemp == 0d)
                    chamberNominalTemp = 950d;
            }
            else
            {
                if (maxEngineTemp == 0d)
                    maxEngineTemp = 3600d;
                if (chamberNominalTemp == 0d)
                    chamberNominalTemp = 3400d;
                if (tempGaugeMin == 0.8d)
                    tempGaugeMin = 0.95d;
            }
            double thrustVariation = varyThrust * RFSettings.Instance.varyThrust;
            chamberNominalTemp *= (1d - thrustVariation);

            rfSolver.InitializeOverallEngineData(
                minFuelFlow,
                maxFuelFlow,
                atmosphereCurve,
                atmCurve,
                velCurve,
                throttleResponseRate,
                chamberNominalTemp,
                machLimit,
                machHeatMult,
                flowMultMin,
                flowMultCap,
                flowMultCapSharpness,
                multFlow,
                thrustVariation,
                (float)part.name.GetHashCode());

            rfSolver.SetScale(scale);

            engineSolver = rfSolver;
        }
コード例 #5
0
        protected bool started = false; // Track start state, don't handle MEC notification before first start.

        #endregion

        #region Overrides
        public override void CreateEngine()
        {
            rfSolver = new SolverRF();
            if (!useAtmCurve)
            {
                atmCurve = null;
            }
            if (!useVelCurve)
            {
                velCurve = null;
            }

            // FIXME quick temp hax
            if (useAtmCurve)
            {
                if (maxEngineTemp == 0d)
                {
                    maxEngineTemp = 2000d;
                }
                if (chamberNominalTemp == 0d)
                {
                    chamberNominalTemp = 950d;
                }
            }
            else
            {
                if (maxEngineTemp == 0d)
                {
                    maxEngineTemp = 3600d;
                }
                if (chamberNominalTemp == 0d)
                {
                    chamberNominalTemp = 3400d;
                }
                if (tempGaugeMin == 0.8d)
                {
                    tempGaugeMin = 0.95d;
                }
            }
            double totalVariation = (1d + localVaryFlow) * (1d + localVaryIsp) - 1d;

            chamberNominalTemp *= (1d - totalVariation);

            rfSolver.InitializeOverallEngineData(
                minFuelFlow,
                maxFuelFlow,
                atmosphereCurve,
                useAtmCurve ? atmCurve : null,
                useVelCurve ? velCurve : null,
                useAtmCurveIsp ? atmCurveIsp : null,
                useVelCurveIsp ? velCurveIsp : null,
                disableUnderwater,
                throttleResponseRate,
                chamberNominalTemp,
                machLimit,
                machHeatMult,
                flowMultMin,
                flowMultCap,
                flowMultCapSharpness,
                localVaryFlow,
                localVaryIsp,
                localVaryMixture,
                isSolid,
                partSeed);

            rfSolver.SetScale(scale);

            engineSolver = rfSolver;
        }