About the gearbox diesel locomotives
#11
Posted 31 August 2015 - 01:06 PM
With initLevel the problem is it's used to check which tables should be filled with default value is not set in .eng (dieselpowertab, dieseltorquetab, etc).
After some testing, i've realized, that even if that IsInitialized method never returns as true, and also creates a warning that says "Diesel engine model has some errors - loading MSTS format", still the advanced parameters are used, and does not fall back to MSTS format, so it seems there are more errors there.
Edit: i think i've found the problem, one flag SettingsFlags.ExhaustColor is added to the initLevel, but the check for it was missing from IsInitialized, that's why the two numbers never could be equal.
So all problems are fixed now, however that parameter checking code requires ALL possible advanced diesel parameters to be present(some are not stated in OR manual), not just the mandatory ones.
But i don't think this will solve the crash with the gearboxed locomotives, that seems to be another problem.
#12
Posted 01 September 2015 - 12:21 AM
can you post here a .patch file of the changes you made, so that I can check it and if OK I can commit it?
#13
Posted 01 September 2015 - 02:03 AM

Number of downloads: 283
However later it needs some changes, to require less paramters.
Now all of these parameters are needed, which are in example (of course the values should be changed to match the locomotive):
KIHA 31 modification:
SIMISA@@@@@@@@@@JINX0D0t______ include ( ../kiha31.eng ) Engine ( ORTSDieselEngines ( 1 Diesel ( IdleRPM ( 150 ) MaxRPM ( 800 ) StartingRPM ( 50 ) StartingConfirmRPM ( 200 ) ChangeUpRPMpS ( 150 ) ChangeDownRPMpS ( 200 ) RateOfChangeUpRPMpSS ( 10 ) RateOfChangeDownRPMpSS ( 20 ) MaximalPower ( 140kW ) IdleExhaust ( 5 ) MaxExhaust ( 20 ) ExhaustDynamics ( 10 ) ExhaustColor ( 00 fe ) ExhaustTransientColor ( 00 00 00 00 ) DieselPowerTab ( 0 0 150 20000 800 140000 ) DieselConsumptionTab ( 0 0 150 10 800 120 ) ThrottleRPMTab ( 0 150 10 150 100 800 ) DieselTorqueTab ( 0 0 150 10000 800 40000 ) MinOilPressure ( 40 ) MaxOilPressure ( 90 ) MaxTemperature ( 120 ) Cooling ( 3 ) TempTimeConstant ( 720 ) OptTemperature ( 70 ) IdleTemperature ( 60 ) ) ) )
- Pressures are in PSI
- Temperatures are in Celsius
- The cooling numbers are NoCooling = 0, Mechanical = 1, Hysteresis = 2, Proportional(default) = 3
- TemptimeConstant is probably a number that controls how fast the oil temperature is changing.
- Power is in Watts in table
- Torque is in Newtons in table
If everything is correct, then the locomotive should start with engine STOPPED, and can be started manually. Else, it will be running from start.
#14
Posted 01 September 2015 - 08:21 AM
Referring to the fact that anyhow it is yet required that all custom parameters are present, it's in fact a questionable thing, but as I am not in the head of the original developer, I will leave as it is for the moment, if no specific comments come out from train physics specialists.
#15
Posted 01 September 2015 - 11:13 AM
Csantucci, on 01 September 2015 - 08:21 AM, said:
Referring to the fact that anyhow it is yet required that all custom parameters are present, it's in fact a questionable thing, but as I am not in the head of the original developer, I will leave as it is for the moment, if no specific comments come out from train physics specialists.
I'd like to remove these requirements, as the first 6 params are enough, but this initLevel flagging thing does not seem to be flexible. Either all of the parameters checked, or none of them.
#16
Posted 01 September 2015 - 03:25 PM
I've been using an include file to modify the .eng, and i saw that the Gearbox parameters which have multiple elements (for example: GearBoxMaxSpeedForGears( 9 25 40 70 ) ), are read wrongly to a List<float>. Once from the main .eng file, then from the include file. So if there are 2 elements in original eng, and there are 4 elements in include, then the list will contain 6 elements, which is wrong.
This isn't a problem with single variables, as these get overwritten by assigning new value. But for lists, Add() method is used. So the lists should be cleared before reading the parameters from the include file. I've fixed this already, by putting a GearBoxMaxSpeedForGearsMpS.Clear() just before the element reading loop. I think this problem should be noted, as there could be other parts in ORTS code, that have this "bug" with includes.
I've also found a conversion problem: as i know, GearBoxMaxSpeedForGears( 9 25 40 70 ) read as Mph unit in MSTS, but in Gearbox.cs it's read as Mps, then converted to Mps from Mph (while it's already Mph, just read as mps). That works, but if i use kph unit, then it's converted to mps, then that mps is converted again to mps, from mph :D
See here:
GearBoxMaxSpeedForGearsMpS.Add(stf.ReadFloat(STFReader.UNITS.Speed, 10.0f));
GearBoxMaxSpeedForGearsMpS[i] = MpS.FromMpH(GearBoxMaxSpeedForGearsMpS[i]);
I think stfreader UNITS.Speed should set to UNITS.SpeedDefaultMPH(all other MSTS speed params are set to this), and the MpS.FromMpH conversion should be removed.
Here is the patch:

Number of downloads: 276
#18
Posted 07 September 2015 - 03:40 AM
#19
Posted 07 September 2015 - 04:37 AM
#20
Posted 07 September 2015 - 05:46 AM
I've attached a docx file with the changes, only the table, and the paragraph just above it has changed.
Attached File(s)
-
changes.zip (6.02K)
Number of downloads: 339
#22
Posted 08 September 2015 - 05:36 AM
I'm trying to gear correctly a 4-speed manual gearbox DMU.
However the gear speeds are greatly surpassed from the "GearBoxMaxSpeedForGears", ie 1st gear is set for 15 mph but continues until 22.5mph. This also applies to the other speeds for gearbox max speed.
Also, im trying to simulate the idle force to be applied, when 1st gear is selected from neutral. Is this simulated in OR ?
One more thing, what is suppose to happen if the manual gear is changed, with power still applied ?
Thanks
#23
Posted 08 September 2015 - 07:58 AM
As far as I remember, if you change gear with throttle>0, nothing terrible happens (as in MSTS).
If you look at the Force HUD, you will notice that motive force is = 0 when you select 1st gear with throttle at 0. So, no idle force seems active.
#24
Posted 08 September 2015 - 08:08 AM
Csantucci, on 08 September 2015 - 07:58 AM, said:
As far as I remember, if you change gear with throttle>0, nothing terrible happens (as in MSTS).
If you look at the Force HUD, you will notice that motive force is = 0 when you select 1st gear with throttle at 0. So, no idle force seems active.
I'm not sure atm what happens in the real world if you try to change gear while in power. Unless the gears are locked when the throttle is open.
The tractive effort in gear does fall, for example, from 15 mph( according to the HUD force ) but its very gradual.
As im testing my DMUs, i can report back, the overspeed for 15 27 41 and 70 mph gearbox speeds on level track.
Thanks
#25
Posted 08 September 2015 - 09:29 AM
Right, with a 54 ton geared DMU - using GearBoxMaxSpeedForGears ( 15 27 41 70 )
15 mph = 22.5 mph
27 mph = 38.0 mph
41 mph = 53.6 mph
70 mph = 75.0* mph
The balancing speed of 75 mph was only because of train weight and resistance. With just the power car of 32 tonnes, this was 85 mph. This should not happen with geared DMUs as the weight should only affect acceleration and not top speed.
Just for reference, the UK Class 101 DMU 2-car can only balance on the level at 65.5 mph, even though its geared for 70 mph because of the one power car( not enough oomph ). A 3-car Class 101 DMU with 2 power cars(power twin) can get to 70mph on the level.
One more thing. I don't think OR can use this cab control while MSTS can:-
Information: Skipped unknown ControlType GEARS_DISPLAY in D:\PROGRAM FILES\MICROSOFT GAMES\TRAIN SIMULATOR\trains\trainset\MEP-Cravens105\CABVIEW\Class105CabView_OR.cvf:line 242
Thanks