Skip to content

Commit dda07f5

Browse files
committed
Automatic merge of T1.5.1-687-gd279e384a and 10 pull requests
- Pull request #570 at c59c788: Experimental glTF 2.0 support with PBR lighting - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #865 at 67014b7: Dispatcher window improvements - Pull request #874 at f8dbeab: Dynamic brake controller refactoring - Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #878 at b19b5a1: Implement Polach Adhesion - Pull request #882 at d8a1c4d: Blueprint/train car operations UI window - Pull request #883 at edcc2dd: SwitchPanel disconnect/connect handling - Pull request #885 at c81447b: feat: Add notifications to Menu
12 parents b764585 + d279e38 + c59c788 + d00beb9 + 67014b7 + f8dbeab + 43bf33e + f92de76 + b19b5a1 + d8a1c4d + edcc2dd + c81447b commit dda07f5

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5062,8 +5062,8 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t,
50625062
// Crank Angle - converts the above range to 0 - 180 - 0 - this is the principle reference used so that it lines up with reference
50635063
// tables used to buold this function
50645064
// Normalised Crank Angle - converts the above to a 0 - 360 range, this is used for triggering special steam effects, etc.
5065-
float axlePostionRad = (float)LocomotiveAxles[0].AxlePositionRad;
5066-
float crankAngleRad = (float)(axlePostionRad + WheelCrankAngleDiffRad[i]);
5065+
float LocalAxlePostionRad = (float)LocomotiveAxles[0].AxlePositionRad;
5066+
float crankAngleRad = (float)(LocalAxlePostionRad + WheelCrankAngleDiffRad[i]);
50675067

50685068
crankAngleRad = (float)(MathHelper.WrapAngle(crankAngleRad)); // Ensures that crank angle is in the range 0 - 180 - 0
50695069

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
//
1515
// You should have received a copy of the GNU General Public License
1616
// along with Open Rails. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
// Debug for Adhesion
19+
//#define DEBUG_ADHESION
1720

1821
using System;
1922
using System.IO;
@@ -974,6 +977,29 @@ public virtual void Update(float timeSpan)
974977
axleStaticForceN = AxleWeightN * SlipCharacteristics(0);
975978
}
976979

980+
#if DEBUG_ADHESION
981+
double[] spd = new double[50];
982+
double[] adh = new double[50];
983+
for (int i = 0; i < spd.Length; i++)
984+
{
985+
spd[i] = i / (float)spd.Length;
986+
adh[i] = SlipCharacteristics(spd[i]);
987+
}
988+
for (int i = 0; i < spd.Length; i++)
989+
{
990+
Console.Write(spd[i]);
991+
Console.Write(" ");
992+
}
993+
Console.WriteLine("");
994+
Console.WriteLine("");
995+
for (int i = 0; i < spd.Length; i++)
996+
{
997+
Console.Write(adh[i]);
998+
Console.Write(" ");
999+
}
1000+
Console.WriteLine("");
1001+
#endif
1002+
9771003
motor?.Update(timeSpan);
9781004

9791005
Integrate(timeSpan);

0 commit comments

Comments
 (0)