Skip to content

Commit

Permalink
Merge pull request #227 from YoRyan/webserver2-traindriving
Browse files Browse the repository at this point in the history
#226
EmbedIO web server graphical train driving monitor
  • Loading branch information
cjakeman committed Jul 27, 2020
2 parents 4ca3409 + 6ec1539 commit 8bc130b
Show file tree
Hide file tree
Showing 8 changed files with 1,070 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ public class MSTSSteamLocomotive : MSTSLocomotive
bool FullBoilerHeat = false; // Boiler heat has exceeded max possible heat in boiler (max operating steam pressure)
bool FullMaxPressBoilerHeat = false; // Boiler heat has exceed the max total possible heat in boiler (max safety valve pressure)
bool ShovelAnyway = false; // Predicts when the AI fireman should be increasing the fire burn rate despite the heat in the boiler
bool IsGrateLimit = false; // Grate limit of locomotive exceeded
/// <summary>
/// Grate limit of locomotive exceedeed?
/// </summary>
public bool IsGrateLimit { get; protected set; } = false;
bool HasSuperheater = false; // Flag to indicate whether locomotive is superheated steam type
bool IsSuperSet = false; // Flag to indicate whether superheating is reducing cylinder condenstation
bool IsSaturated = false; // Flag to indicate locomotive is saturated steam type
Expand Down Expand Up @@ -222,9 +225,15 @@ public class MSTSSteamLocomotive : MSTSLocomotive
float IdealFireMassKG; // Target fire mass
float MaxFireMassKG; // Max possible fire mass
float MaxFiringRateKGpS; // Max rate at which fireman or stoker can can feed coal into fire
float GrateLimitLBpFt2 = 150.0f; // Max combustion rate of the grate, once this is reached, no more steam is produced.
/// <summary>
/// Max combustion rate of the grate; once this is reached, no more steam is produced.
/// </summary>
public float GrateLimitLBpFt2 { get; protected set; } = 150.0f;
float MaxFuelBurnGrateKGpS; // Maximum rate of fuel burnt depending upon grate limit
float GrateCombustionRateLBpFt2; // Grate combustion rate, ie how many lbs coal burnt per sq ft grate area.
/// <summary>
/// Grate combustion rate, i.e. how many lbs coal burnt per sq ft grate area.
/// </summary>
public float GrateCombustionRateLBpFt2 { get; protected set; }
float ORTSMaxFiringRateKGpS; // OR equivalent of above
float DisplayMaxFiringRateKGpS; // Display value of MaxFiringRate
public float SafetyValveUsageLBpS;
Expand Down Expand Up @@ -395,14 +404,17 @@ public class MSTSSteamLocomotive : MSTSLocomotive
float BkW_Diff; // Net Energy into boiler after steam loads taken.
float WaterVolL; // Actual volume of water in bolier (litres)
float BoilerHeatOutBTUpS = 0.0f;// heat out of boiler in BTU
float BoilerHeatInBTUpS = 0.0f; // heat into boiler in BTU
/// <summary>
/// Heat into boiler in BTU
/// </summary>
public float BoilerHeatInBTUpS { get; protected set; } = 0.0f;
float BoilerHeatExcess; // Vlaue of excess boiler heat
float InjCylEquivSizeIN; // Calculate the equivalent cylinder size for purpose of sizing the injector.
float InjectorSize; // size of injector installed on boiler

// Values from previous iteration to use in UpdateFiring() and show in HUD
float PreviousBoilerHeatOutBTUpS = 0.0f;
public float PreviousTotalSteamUsageLBpS;
public float PreviousBoilerHeatOutBTUpS { get; protected set; } = 0.0f;
public float PreviousTotalSteamUsageLBpS { get; protected set; }
float Injector1WaterDelTempF = 65f; // Injector 1 water delivery temperature - F
float Injector2WaterDelTempF = 65f; // Injector 1 water delivery temperature - F
float Injector1TempFraction; // Find the fraction above the min temp of water delivery
Expand Down
7 changes: 7 additions & 0 deletions Source/RunActivity/RunActivity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
<Compile Include="Viewer3D\Viewer.cs" />
<Compile Include="Viewer3D\Water.cs" />
<Compile Include="Viewer3D\Weather.cs" />
<Compile Include="Viewer3D\WebServices\TrainDrivingDisplay.cs" />
<Compile Include="Viewer3D\WebServices\WebServer.cs" />
<Compile Include="Viewer3D\Wire.cs" />
<Compile Include="Viewer3D\World.cs" />
Expand Down Expand Up @@ -344,6 +345,12 @@
<Content Include="Viewer3D\WebServices\Web\index.css" />
<Content Include="Viewer3D\WebServices\Web\index.html" />
<Content Include="Viewer3D\WebServices\Web\or_logo.png" />
<Content Include="Viewer3D\WebServices\Web\TrackMonitor\SignalAspects.png" />
<Content Include="Viewer3D\WebServices\Web\TrackMonitor\TrackMonitorImages.png" />
<Content Include="Viewer3D\WebServices\Web\TrainDriving\index.css" />
<Content Include="Viewer3D\WebServices\Web\TrainDriving\index.html" />
<Content Include="Viewer3D\WebServices\Web\TrainDriving\index.js" />
<Content Include="Viewer3D\WebServices\Web\TrackMonitor\index.css" />
<Content Include="Viewer3D\WebServices\Web\TrackMonitor\index.html" />
<Content Include="Viewer3D\WebServices\Web\TrackMonitor\index.js" />
</ItemGroup>
Expand Down

0 comments on commit 8bc130b

Please sign in to comment.