Steam Locomotive Additional Features
#71
Posted 08 July 2023 - 12:39 PM
#72
Posted 08 July 2023 - 12:49 PM
#73
Posted 08 July 2023 - 06:15 PM
#74
Posted 08 July 2023 - 06:51 PM
I have to read it.
Like Your approach.
#75
Posted 08 July 2023 - 10:05 PM
Traindude, on 07 July 2023 - 11:48 PM, said:
Traindude, on 07 July 2023 - 11:48 PM, said:
This is related to the changes to code to get multiple engines working. I had a patch to fix the superheat bug, but that has now been upset by the PR clash.
I will need to play with it.
#76
Posted 08 July 2023 - 10:32 PM
cesarbl, on 08 July 2023 - 05:37 AM, said:
Either way, rather then using a % value, I would prefer to see a more prototypical figure that relates to a design specification, etc.
#77
Posted 08 July 2023 - 11:40 PM
The original thought of braked or not braked was simply about animation, should the wheels rotate freely at all times or be locked if the loco starts to skid.
#78
Posted 09 July 2023 - 12:17 AM
Quote
Either way, rather then using a % value, I would prefer to see a more prototypical figure that relates to a design specification, etc.
With more powerful I mean that they are proportional to the wheel weight. My proposal was that, for each axle, total brake force is distributed according to a %. For example, if you have a 4-axle locomotive with MaxBrakeForce=200kN and each axle contributes with a 25%, then MaxBrakeRetardForce=50kN for each axle.
An alternative would be to have different several MaxBrakeShoeForce, CoF and WSP devices for each axle. This is a more complete approach but it requires quite much more code. The % solution is much more simpler, so maybe we can use it for now and then implement the advanced configuration in the future.
Quote
Yes, it's the distribution of total brake force, and must add up to 100%.
Quote
Whether a wheel skids or not depends on the brake force applied to that axle, so physics have to be changed too.
Here's a suggested patch. As you can see, it is really simple, only 10 lines:
diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs index acf5c2d56..ff5509750 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs @@ -2787,7 +2787,7 @@ public virtual void AdvancedAdhesion(float elapsedClockSeconds) foreach (var axle in LocomotiveAxles) { - axle.BrakeRetardForceN = BrakeRetardForceN/LocomotiveAxles.Count; + axle.BrakeRetardForceN = BrakeRetardForceN * axle.BrakeFraction; axle.TrainSpeedMpS = SpeedMpS; //Set the train speed of the axle mod axle.WheelRadiusM = DriverWheelRadiusM; } diff --git a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs index 93d62af32..78a614e1b 100644 --- a/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs +++ b/Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs @@ -233,6 +233,7 @@ public void Initialize() if (axle.DampingNs <= 0) axle.DampingNs = locomotive.MassKG / 1000.0f / AxleList.Count; if (axle.FrictionN <= 0) axle.FrictionN = locomotive.MassKG / 1000.0f / AxleList.Count; if (axle.NumberWheelAxles <= 0) axle.NumberWheelAxles = 1; + if (axle.BrakeFraction < 0) axle.BrakeFraction = 1.0f / AxleList.Count; } axle.Initialize(); } @@ -477,6 +478,10 @@ public float TransmissionEfficiency /// Wheel number /// </summary> public int NumberWheelAxles; + /// <summary> + /// Fraction of total brake force applied + /// </summary> + public float BrakeFraction = -1; /// <summary> /// Static adhesion coefficient, as given by Curtius-Kniffler formula @@ -672,6 +677,9 @@ public void Parse(STFReader stf) case "numberwheelaxles": NumberWheelAxles = stf.ReadIntBlock(null); break; + case "brakefraction": + BrakeFraction = stf.ReadFloatBlock(STFReader.UNITS.None, null); + break; case "(": stf.SkipRestOfBlock(); break; @@ -685,6 +693,7 @@ public void Copy(Axle other) WheelWeightKg = other.WheelWeightKg; AxleWeightN = other.AxleWeightN; NumberWheelAxles = other.NumberWheelAxles; + BrakeFraction = other.BrakeFraction; } /// <summary>
#79
Posted 09 July 2023 - 02:08 AM
cesarbl, on 09 July 2023 - 12:17 AM, said:
If the % implementation and the advanced implementation need different inputs, then I disagree with "using it for now", as we would be creating a "legacy" feature that needs to be managed into the future. Ideally we should only implement the "final" solution.
#80
Posted 09 July 2023 - 02:15 AM
#81
Posted 09 July 2023 - 06:49 PM
I will attempt a rebuild of the PR and reintroduce it when I have some time.
#82
Posted 10 July 2023 - 09:34 PM
Traindude, on 08 July 2023 - 06:15 PM, said:
An excellent paper. The ideas for including lights, special effects and freight anims with the different sections are essential. (Some might also apply to some old time articulated diesel and electric locos!)
I hope the coders find a way to make these work.
Interestingly up until now we have only been allowed one ORTSFreightAnims ( ) block in one eng file - the possibility of more than one block might allow separation of things that belong to a loco (change in mass etc) from things that can change (removable lamps).
#83
Posted 12 July 2023 - 08:29 PM
darwins, on 10 July 2023 - 09:34 PM, said:
I hope the coders find a way to make these work.
Interestingly up until now we have only been allowed one ORTSFreightAnims ( ) block in one eng file - the possibility of more than one block might allow separation of things that belong to a loco (change in mass etc) from things that can change (removable lamps).
Thank you darwins! You're right, there are articulated diesel and electric locomotives that have a combination of driving and idler wheels (before "power trucks" became a thing--the Milwaukee Road's old Boxcab locomotives on the electrified sections of the Pacific Extension come to mind).
I think once we get it working for steam locomotives, then the articulation parameters can be easily adapted to diesel and electric locomotives as well. Cesarbl's recent discussion on grouping wheels for independent wheelslip (see page 7 of the thread) seems to be a step in the right direction. I'm still unsure as to whether the lights, FX, and freight animation information should stay where they currently are within an *.eng file or be included in the ORTSSteamEngines groupings. I'm hoping the coders can use my proposal as a jumping-off point, though...
#84
Posted 13 July 2023 - 12:41 PM
It sounds nice, but every new feature or redesign of systems has to be implemented in such a way it won't require rewriting the thousands of existing .engs and .wags we have in our collections.
#85
Posted 13 July 2023 - 11:59 PM
Jonatan, on 13 July 2023 - 12:41 PM, said:
It sounds nice, but every new feature or redesign of systems has to be implemented in such a way it won't require rewriting the thousands of existing .engs and .wags we have in our collections.
FYI, darwins and I were talking about my proposal for adding new parameters to add articulation to the whole "multiple engines on one locomotive" concept--so no more two-plus-piece models for one locomotive! (See page 8 of this thread for a *.pdf download of my proposal.)
Believe me, I agree that the addition of new features does have the inconvenience of having to edit and re-edit all of our *.eng and *.wag files, but if we're moving toward more realism and doing away with the constraints of MSTS, it's well worth the effort in the long run!