public List <AtmosphericConditions> GetAtmosphericCurve(double dT, double endUT = -1) { if (!Body.atmosphere) { return(null); } var atmoR = Body.Radius + Body.atmosphereDepth; var startUT = StartPos.magnitude < atmoR? StartUT : TrajectoryCalculator.NearestRadiusUT(Orbit, atmoR, StartUT); if (endUT < 0) { endUT = BrakeEndUT; } if (startUT > endUT) { return(null); } var samples = (int)Math.Ceiling((endUT - startUT) / dT) + 1; var curve = new List <AtmosphericConditions>(samples); dT = (endUT - startUT) / samples; for (int i = 1; i <= samples; i++) { var cond = new AtmosphericConditions(Orbit, startUT + dT * i); cond.Duration = dT; curve.Add(cond); } return(curve); }
protected double final_temp(double start_T, AtmosphericConditions cond) { if (cond.ShockTemperature < start_T) { return(start_T); } var K = VSL.Physics.MMT_ThermalMass > cond.ConvectiveCoefficient? -cond.ConvectiveCoefficient / VSL.Physics.MMT_ThermalMass : -1; return(cond.ShockTemperature + (start_T - cond.ShockTemperature) * Math.Exp(K * LTRJ.HeatingCoefficient * cond.Duration)); }