public override string GetDebugStatus() { var status = new StringBuilder(base.GetDebugStatus()); status.AppendFormat("\t{0}\t\t", Simulator.Catalog.GetParticularString("CircuitBreaker", PowerSupply.CircuitBreaker.State.GetDescription())); status.AppendFormat("{0}\t", PowerSupply.CircuitBreaker.TCSClosingAuthorization ? Simulator.Catalog.GetString("OK") : Simulator.Catalog.GetString("NOT OK")); status.AppendFormat("{0}\t", PowerSupply.CircuitBreaker.DriverClosingAuthorization ? Simulator.Catalog.GetString("OK") : Simulator.Catalog.GetString("NOT OK")); status.AppendFormat("\t{0}\t\t{1}\n", Simulator.Catalog.GetString("Auxiliary power"), Simulator.Catalog.GetParticularString("PowerSupply", PowerSupply.AuxiliaryState.GetDescription())); if (IsSteamHeatFitted && Train.PassengerCarsNumber > 0 && this.IsLeadLocomotive() && Train.CarSteamHeatOn) { // Only show steam heating HUD if fitted to locomotive and the train, has passenger cars attached, and is the lead locomotive // Display Steam Heat info status.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}/{7}\t{8}\t{9}\t{10}\t{11}\t{12}\t{13}\t{14}\t{15}\t{16}\t{17}\t{18:N0}\n", Simulator.Catalog.GetString("StHeat:"), Simulator.Catalog.GetString("Press"), FormatStrings.FormatPressure(CurrentSteamHeatPressurePSI, Pressure.Unit.PSI, MainPressureUnit, true), Simulator.Catalog.GetString("StTemp"), FormatStrings.FormatTemperature(Temperature.Celsius.FromF(SteamHeatPressureToTemperaturePSItoF[CurrentSteamHeatPressurePSI]), IsMetric), Simulator.Catalog.GetString("StUse"), FormatStrings.FormatMass(Frequency.Periodic.ToHours(Mass.Kilogram.FromLb(CalculatedCarHeaterSteamUsageLBpS)), IsMetric), FormatStrings.h, Simulator.Catalog.GetString("WaterLvl"), FormatStrings.FormatFuelVolume(CurrentLocomotiveSteamHeatBoilerWaterCapacityL, IsMetric, IsUK), Simulator.Catalog.GetString("Last:"), Simulator.Catalog.GetString("Press"), FormatStrings.FormatPressure(Train.LastCar.CarSteamHeatMainPipeSteamPressurePSI, Pressure.Unit.PSI, MainPressureUnit, true), Simulator.Catalog.GetString("Temp"), FormatStrings.FormatTemperature(Train.LastCar.CarCurrentCarriageHeatTempC, IsMetric), Simulator.Catalog.GetString("OutTemp"), FormatStrings.FormatTemperature(Train.TrainOutsideTempC, IsMetric), Simulator.Catalog.GetString("NetHt"), Train.LastCar.DisplayTrainNetSteamHeatLossWpTime); } return(status.ToString()); }
public override string GetDebugStatus() { var status = new StringBuilder(base.GetDebugStatus()); status.AppendFormat("\t{0}\t\t{1}", Simulator.Catalog.GetString("Circuit breaker"), Simulator.Catalog.GetParticularString("CircuitBreaker", GetStringAttribute.GetPrettyName(ElectricPowerSupply.CircuitBreaker.State))); status.AppendFormat("\t{0}\t{1}", Simulator.Catalog.GetString("TCS"), ElectricPowerSupply.CircuitBreaker.TCSClosingAuthorization ? Simulator.Catalog.GetString("OK") : Simulator.Catalog.GetString("NOT OK")); status.AppendFormat("\t{0}\t{1}", Simulator.Catalog.GetString("Driver"), ElectricPowerSupply.CircuitBreaker.DriverClosingAuthorization ? Simulator.Catalog.GetString("OK") : Simulator.Catalog.GetString("NOT OK")); status.AppendFormat("\t{0}\t\t{1}\n", Simulator.Catalog.GetString("Auxiliary power"), Simulator.Catalog.GetParticularString("PowerSupply", GetStringAttribute.GetPrettyName(LocomotivePowerSupply.AuxiliaryPowerSupplyState))); if (IsSteamHeatFitted && Train.PassengerCarsNumber > 0 && this.IsLeadLocomotive() && Train.CarSteamHeatOn) { // Only show steam heating HUD if fitted to locomotive and the train, has passenger cars attached, and is the lead locomotive // Display Steam Heat info status.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}/{7}\t{8}\t{9}\t{10}\t{11}\t{12}\t{13}\t{14}\t{15}\t{16}\t{17}\t{18:N0}\n", Simulator.Catalog.GetString("StHeat:"), Simulator.Catalog.GetString("Press"), FormatStrings.FormatPressure(CurrentSteamHeatPressurePSI, PressureUnit.PSI, MainPressureUnit, true), Simulator.Catalog.GetString("StTemp"), FormatStrings.FormatTemperature(C.FromF(SteamHeatPressureToTemperaturePSItoF[CurrentSteamHeatPressurePSI]), IsMetric, false), Simulator.Catalog.GetString("StUse"), FormatStrings.FormatMass(pS.TopH(Kg.FromLb(CalculatedCarHeaterSteamUsageLBpS)), IsMetric), FormatStrings.h, Simulator.Catalog.GetString("WaterLvl"), FormatStrings.FormatFuelVolume(CurrentLocomotiveSteamHeatBoilerWaterCapacityL, IsMetric, IsUK), Simulator.Catalog.GetString("Last:"), Simulator.Catalog.GetString("Press"), FormatStrings.FormatPressure(Train.LastCar.CarSteamHeatMainPipeSteamPressurePSI, PressureUnit.PSI, MainPressureUnit, true), Simulator.Catalog.GetString("Temp"), FormatStrings.FormatTemperature(Train.LastCar.CarInsideTempC, IsMetric, false), Simulator.Catalog.GetString("OutTemp"), FormatStrings.FormatTemperature(CarOutsideTempC, IsMetric, false), Simulator.Catalog.GetString("NetHt"), Train.LastCar.CarNetHeatFlowRateW); } return(status.ToString()); }