Railway Challenge
/
challenge-ChaiUpdated-AutostopTest-30Throttle
This is a test from 30%Throttle to stop, using full service brake
Diff: challenge.cpp
- Revision:
- 33:8286cc0ebfaf
- Parent:
- 23:c25af9a7db8d
--- a/challenge.cpp Mon Jun 20 09:49:27 2022 +0000 +++ b/challenge.cpp Mon Jun 20 09:55:35 2022 +0000 @@ -26,7 +26,7 @@ autoStopInProgress = false; // Flag if auto-stop track-side sensor has been detected and auto-stop is in progress autoStopCruiseSpeed = 0; // Speed of loco at time of auto-stop trackside sensor triggering so loco can maintain this speed without operator input autoStopThrottle = 0; // Throttle rate applied at the time of triggering autostop - targetDistance = 25.00f; // How far in meters to bring the loco to a stop + targetDistance = 7.50f; // How far in meters to bring the loco to a stop remainingDistance = targetDistance; // How far the loco has left to go before reaching target distance decelerationGradient = 0; // Gradient of y=mx+c linear speed-distance curve that is used in this auto-stop version requiredSpeed = 0; // How fast the loco should be going according to y=mx+c line