Elvas Tower: About the gearbox diesel locomotives - Elvas Tower

Jump to content

  • 4 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

About the gearbox diesel locomotives Rate Topic: -----

#11 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 31 August 2015 - 01:06 PM

Yeah i've saw that single ReadInt, and changing it to ReadIntBlock fixed that problem.

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 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 September 2015 - 12:21 AM

Hi disc,
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 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 01 September 2015 - 02:03 AM

Here Attached File  DieselEngine.cs.zip (923bytes)
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 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 September 2015 - 08:21 AM

OK, the patch seems reasonable. I have uploaded it in x.3231. disc, thank you.
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 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 01 September 2015 - 11:13 AM

View PostCsantucci, on 01 September 2015 - 08:21 AM, said:

OK, the patch seems reasonable. I have uploaded it in x.3231. disc, thank you.
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 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 01 September 2015 - 03:25 PM

I've found another bug in GearBox.cs (which may also have caused those crashes with automatic gearboxes):
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: Attached File  GearBox.cs.zip (474bytes)
Number of downloads: 276

#17 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 02 September 2015 - 02:07 AM

Thanks for the patch. Fixed in x.3239.

#18 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 07 September 2015 - 03:40 AM

I've tried to reduce the required parameters, and the parameter checking worked well, but the simulation isn't. Perhaps the manual should be modified, as those things that are written there about ORTSDieselEngines, are never worked.

#19 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 07 September 2015 - 04:37 AM

You could prepare a revised version of the related pages of the manual, and then we can clean up the English and insert them in the nex release of the manual.

#20 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 07 September 2015 - 05:46 AM

The changes are in 8.2.1.4 ORTS Specific Diesel Engine Definition section.

I've attached a docx file with the changes, only the table, and the paragraph just above it has changed.

Attached File(s)



#21 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 07 September 2015 - 11:46 AM

disc, thank you.

#22 User is offline   Coolhand101 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 998
  • Joined: 13-June 15
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 08 September 2015 - 05:36 AM

Hi

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 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,450
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 08 September 2015 - 07:58 AM

I have also noticed that, unlike MSTS, speed increases above GearBoxMaxSpeedForGears.
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 User is offline   Coolhand101 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 998
  • Joined: 13-June 15
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 08 September 2015 - 08:08 AM

View PostCsantucci, on 08 September 2015 - 07:58 AM, said:

I have also noticed that, unlike MSTS, speed increases above GearBoxMaxSpeedForGears.
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 User is offline   Coolhand101 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 998
  • Joined: 13-June 15
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 08 September 2015 - 09:29 AM

OR version X3243

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

  • 4 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users