Skip to content

Conversation

peternewell
Copy link
Contributor

These changes are associated with these changes - https://blueprints.launchpad.net/or/+spec/vacuum-brake-update

@peternewell peternewell added the enhancement New feature or request label Jun 1, 2021
@peternewell peternewell self-assigned this Jun 1, 2021
@peternewell peternewell marked this pull request as draft June 1, 2021 11:17
twpol pushed a commit that referenced this pull request Jun 1, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #392 at 2320462: Blueprint https://blueprints.launchpad.net/or/+spec/trainset-elevator Trainset elevator
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at 721d843: Change alignment of couplers as they travel through curve.
- Pull request #423 at 03989f5: Adjustments to vacuum brake
twpol pushed a commit that referenced this pull request Jun 2, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #392 at 2320462: Blueprint https://blueprints.launchpad.net/or/+spec/trainset-elevator Trainset elevator
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at 721d843: Change alignment of couplers as they travel through curve.
- Pull request #423 at 2427698: Adjustments to vacuum brake
twpol pushed a commit that referenced this pull request Jun 2, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #392 at 2320462: Blueprint https://blueprints.launchpad.net/or/+spec/trainset-elevator Trainset elevator
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at 721d843: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
twpol pushed a commit that referenced this pull request Jun 2, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #392 at 2320462: Blueprint https://blueprints.launchpad.net/or/+spec/trainset-elevator Trainset elevator
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at 721d843: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
twpol pushed a commit that referenced this pull request Jun 3, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #392 at 2320462: Blueprint https://blueprints.launchpad.net/or/+spec/trainset-elevator Trainset elevator
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at 25261e8: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
twpol pushed a commit that referenced this pull request Jun 3, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #392 at 2320462: Blueprint https://blueprints.launchpad.net/or/+spec/trainset-elevator Trainset elevator
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f9fb52a: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
twpol pushed a commit that referenced this pull request Jun 7, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #392 at 2320462: Blueprint https://blueprints.launchpad.net/or/+spec/trainset-elevator Trainset elevator
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at b3d65e1: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
twpol pushed a commit that referenced this pull request Jun 8, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
twpol pushed a commit that referenced this pull request Jun 8, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
- Pull request #425 at 3a906ff: updates Paths and References section
twpol pushed a commit that referenced this pull request Jun 10, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 96b2b3b: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
twpol pushed a commit that referenced this pull request Jun 11, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #419 at 79db234: Revert changes from #415 that only bumped the POT timestamps
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 7a23ba9: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
@peternewell peternewell marked this pull request as ready for review June 11, 2021 05:12
twpol pushed a commit that referenced this pull request Jun 14, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at e8f7541: Animated Clocks recognized by ClockHands without extern Files
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 7a23ba9: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
twpol pushed a commit that referenced this pull request Jun 15, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at eca996f: Animated Clocks recognized by ClockHands without extern Files
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 7a23ba9: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
twpol pushed a commit that referenced this pull request Jun 15, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at eca996f: Animated Clocks recognized by ClockHands without extern Files
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at c41e42a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 7a23ba9: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
- Pull request #429 at 59b5d8e: Czech translations updated by Howky
twpol pushed a commit that referenced this pull request Jun 16, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at eca996f: Animated Clocks recognized by ClockHands without extern Files
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at 595529a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 7a23ba9: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
- Pull request #429 at 59b5d8e: Czech translations updated by Howky
twpol pushed a commit that referenced this pull request Jun 16, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at eca996f: Animated Clocks recognized by ClockHands without extern Files
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #424 at 595529a: Bug fix for https://bugs.launchpad.net/or/+bug/1930630. The web TrainDriving window is not available.
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 7a23ba9: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
- Pull request #429 at f3b1fed: Czech translations updated by Howky
Copy link
Member

@YoRyan YoRyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before approving, I'd like to suggest the following change. It's briefer:

commit 3f4ed29c0f4eae25fd7b470780cd1c373c3b0865 (HEAD -> peternewell-brake_fixes)
Author: Ryan Young <ryan@youngryan.com>
Date:   Wed Jun 16 01:56:31 2021 -0700

    refactor: use Math.Min to clamp brake pressure values

diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs
index 0d1d772f7..3722229bc 100644
--- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs
+++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/VacuumSinglePipe.cs
@@ -488,18 +488,8 @@ public override void Update(float elapsedClockSeconds)
                 {
                     // the following reduces the brake cylinder and vacuum reservoir to 0inHg if the bleed valve is operated
                     float dp = elapsedClockSeconds * MaxApplicationRatePSIpS;
-                    VacResPressurePSIA += dp;
-                    if (VacResPressurePSIA > OneAtmospherePSI)
-                    {
-                        VacResPressurePSIA = OneAtmospherePSI;
-                    }
-
-                    CylPressurePSIA += dp;
-                    if (CylPressurePSIA > OneAtmospherePSI)
-                    {
-                        CylPressurePSIA = OneAtmospherePSI;
-                    }
-
+                    VacResPressurePSIA = Math.Min(VacResPressurePSIA + dp, OneAtmospherePSI);
+                    CylPressurePSIA = Math.Min(CylPressurePSIA + dp, OneAtmospherePSI);
                 }
                 else if (BrakeLine1PressurePSI < VacResPressurePSIA)
                 {

Thoughts? Does this make sense to you?

twpol pushed a commit that referenced this pull request Jun 16, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at eca996f: Animated Clocks recognized by ClockHands without extern Files
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at d05e5e3: Adjustments to vacuum brake
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 7a23ba9: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
- Pull request #428 at 84abbe5: Update to German translation
- Pull request #429 at f3b1fed: Czech translations updated by Howky
twpol pushed a commit that referenced this pull request Jun 20, 2021
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #399 at 03a1d12: Power supply package
- Pull request #408 at e77a86a: Updating RailDriver SDK library to prepare for 64bit mode
- Pull request #412 at 26e29ed: New TCS function to get speed post information (including warning speed posts)
- Pull request #417 at eca996f: Animated Clocks recognized by ClockHands without extern Files
- Pull request #420 at 39843b1: Delete Russian timetable.rst
- Pull request #422 at f4831e5: Change alignment of couplers as they travel through curve.
- Pull request #423 at fbc8e64: Adjustments to vacuum brake
- Pull request #425 at 3a906ff: updates Paths and References section
- Pull request #427 at 7a23ba9: Correct an Issue with Motive Force being incorrectly reduced by wagon braking force.
- Pull request #428 at 84abbe5: Update to German translation
- Pull request #429 at f3b1fed: Czech translations updated by Howky
Copy link
Member

@YoRyan YoRyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving since this has been in unstable for awhile and there have been no reports of breakage.

@YoRyan YoRyan merged commit 0366882 into openrails:master Jun 21, 2021
@peternewell peternewell deleted the brake_fixes branch July 1, 2021 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants