private void RecordSteamPerformance() { MSTSSteamLocomotive steamloco = viewer.PlayerLocomotive as MSTSSteamLocomotive; double steamspeedMpH = Speed.MeterPerSecond.ToMpH(steamloco.SpeedMpS); if (steamspeedMpH >= previousLoggedSteamSpeedMpH + 5) // Add a new record every time speed increases by 5 mph { previousLoggedSteamSpeedMpH = (int)steamspeedMpH; // Keep speed records close to whole numbers dataLog.Data($"{Speed.MeterPerSecond.FromMpS(steamloco.SpeedMpS, false):F0}"); dataLog.Data($"{Time.Second.ToM(steamloco.SteamPerformanceTimeS):F1}"); dataLog.Data($"{steamloco.ThrottlePercent:F0}"); dataLog.Data($"{steamloco.Train.MUReverserPercent:F0}"); dataLog.Data($"{Dynamics.Force.ToLbf(steamloco.MotiveForceN):F0}"); dataLog.Data($"{steamloco.IndicatedHorsePowerHP:F0}"); dataLog.Data($"{steamloco.DrawBarPullLbsF:F0}"); dataLog.Data($"{steamloco.DrawbarHorsePowerHP:F0}"); dataLog.Data($"{Dynamics.Force.ToLbf(steamloco.LocomotiveCouplerForceN):F0}"); dataLog.Data($"{Dynamics.Force.ToLbf(steamloco.LocoTenderFrictionForceN):F0}"); dataLog.Data($"{Dynamics.Force.ToLbf(steamloco.TotalFrictionForceN):F0}"); dataLog.Data($"{Mass.Kilogram.ToTonsUK(steamloco.TrainLoadKg):F0}"); dataLog.Data($"{steamloco.BoilerPressurePSI:F0}"); dataLog.Data($"{steamloco.LogSteamChestPressurePSI:F0}"); dataLog.Data($"{steamloco.LogInitialPressurePSI:F0}"); dataLog.Data($"{steamloco.LogCutoffPressurePSI:F0}"); dataLog.Data($"{steamloco.LogReleasePressurePSI:F0}"); dataLog.Data($"{steamloco.LogBackPressurePSI:F0}"); dataLog.Data($"{steamloco.MeanEffectivePressurePSI:F0}"); dataLog.Data($"{steamloco.CurrentSuperheatTempF:F0}"); dataLog.Data($"{Frequency.Periodic.ToHours(steamloco.CylinderSteamUsageLBpS):F0}"); dataLog.Data($"{Frequency.Periodic.ToHours(steamloco.WaterConsumptionLbpS):F0}"); dataLog.Data($"{Mass.Kilogram.ToLb(Frequency.Periodic.ToHours(steamloco.FuelBurnRateSmoothedKGpS)):F0}"); dataLog.Data($"{steamloco.SuperheaterSteamUsageFactor:F2}"); dataLog.Data($"{steamloco.CumulativeCylinderSteamConsumptionLbs:F0}"); dataLog.Data($"{steamloco.CumulativeWaterConsumptionLbs:F0}"); dataLog.Data($"{steamloco.CutoffPressureDropRatio:F0}"); dataLog.Data($"{steamloco.HPCylinderMEPPSI:F0}"); dataLog.Data($"{steamloco.LogLPInitialPressurePSI:F0}"); dataLog.Data($"{steamloco.LogLPCutoffPressurePSI:F0}"); dataLog.Data($"{steamloco.LogLPReleasePressurePSI:F0}"); dataLog.Data($"{steamloco.LogLPBackPressurePSI:F0}"); dataLog.Data($"{steamloco.CutoffPressureDropRatio:F0}"); dataLog.Data($"{steamloco.LPCylinderMEPPSI:F0}"); dataLog.EndLine(); } }