Elvas Tower: LocomotiveAxles.Count as used in Forces HUD - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

LocomotiveAxles.Count as used in Forces HUD Why only one axle in HUD Force Information? Rate Topic: -----

#1 User is offline   C44-9W 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 13
  • Joined: 18-March 23
  • Gender:Male
  • Simulator:Openrails
  • Country:

Posted 27 April 2024 - 03:03 PM

HUDWindows.cs has a loop over LocomotiveAxles.Count. This adds the value for each axle for the rows like "Wheel slip" and "Axle drive force". However, the axle count always seems to be 1 (one), at least for the diesel locomotives I have tried.

Does anybody have an explanation for this?

My specifc context is the Forces HUD in the browser. I would like to improve the column alignment. For that I need to know if the axle-related rows have multiple value columns.

The specific code block:

            var mstsLocomotive = Viewer.PlayerLocomotive as MSTSLocomotive;
            ...
                        for (int i = 0; i < mstsLocomotive.LocomotiveAxles.Count; i++)
                        {
                            table.CurrentRow = row0;
                            var axle = mstsLocomotive.LocomotiveAxles[i];
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}% ({1})", axle.SlipSpeedPercent, FormatStrings.FormatVeryLowSpeedDisplay((float)axle.WheelSlipThresholdMpS, mstsLocomotive.IsMetric));
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}%", mstsLocomotive.AdhesionConditions * 100.0f);
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})", FormatStrings.FormatForce(axle.DriveForceN, mstsLocomotive.IsMetric), FormatStrings.FormatPower(axle.DriveForceN * mstsLocomotive.AbsTractionSpeedMpS, mstsLocomotive.IsMetric, false, false));
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0}", FormatStrings.FormatForce(axle.BrakeRetardForceN, mstsLocomotive.IsMetric));
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}", axle.NumOfSubstepsPS);
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}%  ({1:F0}%)", axle.WheelAdhesion * 100, axle.MaximumPolachWheelAdhesion * 100);
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})", FormatStrings.FormatForce(axle.AxleForceN, mstsLocomotive.IsMetric),
                            FormatStrings.FormatPower(axle.AxleForceN * mstsLocomotive.AbsTractionSpeedMpS, mstsLocomotive.IsMetric, false, false));
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})",
                            FormatStrings.FormatForce(axle.CompensatedAxleForceN, mstsLocomotive.IsMetric),
                            FormatStrings.FormatPower(axle.CompensatedAxleForceN * mstsLocomotive.AbsTractionSpeedMpS, mstsLocomotive.IsMetric, false, false));
                            TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})", FormatStrings.FormatSpeedDisplay((float)axle.AxleSpeedMpS, mstsLocomotive.IsMetric), FormatStrings.FormatVeryLowSpeedDisplay(axle.SlipSpeedMpS, mstsLocomotive.IsMetric));

                            if (HUDEngineType == TrainCar.EngineTypes.Steam && (HUDSteamEngineType == TrainCar.SteamEngineTypes.Compound || HUDSteamEngineType == TrainCar.SteamEngineTypes.Simple || HUDSteamEngineType == TrainCar.SteamEngineTypes.Unknown))
                            {
                                TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:N0}º", axle.AxlePositionRad * 180 / Math.PI + 180);
                            }
                        }


#2 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 7,013
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 27 April 2024 - 09:50 PM

Hello and thanks for care: bad alignment looks very unpleasant, so good luck with solving that!

#3 User is offline   C44-9W 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 13
  • Joined: 18-March 23
  • Gender:Male
  • Simulator:Openrails
  • Country:

Posted 06 May 2024 - 11:23 AM

View PostWeter, on 27 April 2024 - 09:50 PM, said:

... so good luck with solving that!

I was too ambitious. I ended up only doing a minor improvement to the Force Info on the browser. PR: https://github.com/o...nrails/pull/940

#4 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 7,013
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 06 May 2024 - 01:36 PM

Hello.
IMO, not bad anyway.

#5 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 354
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 06 May 2024 - 04:14 PM

The axle count always defaulting to 1 is a quirk of keeping simulation performance sensible. The axle simulation handles just about everything adhesion related and is fairly complicated to compute. Without multithreading it likely won't be practical to simulate each "actual" axle individually, and it wouldn't be worth doing unless each axle would behave differently (different levels of grip, different tractive effort in each motor) but right now adding more axles only has a noticeable effect for duplex steam engines I believe (and in that case, each "axle" is actually just the set of all connected wheels lumped together as one).

As we get more in depth simulation of locomotive transmissions (ie: a model that actually knows what an electric motor is) it may become worthwhile to simulate every axle of diesel locomotives too.

#6 User is online   steamer_ctn 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,890
  • Joined: 24-June 11
  • Gender:Male
  • Country:

Posted 07 May 2024 - 08:39 PM

To get multiple axle groups in the HuD you would need to set up multiple axle groups in the ENG file (though I am not certain whether diesels will cope with this at the moment).

It can be done for steam locomotives, see the Duplex PRR T1 locomotive, which has three axle groupings. Setting the axle count in the ENG file will give the most accurate outcome as OR when it does its axle count, doesn't know how the axles should be grouped.

#7 User is offline   Laci1959 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 950
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 07 May 2024 - 10:38 PM

Quote

It can be done for steam locomotives, see the Duplex PRR T1 locomotive, which has three axle groupings. Setting the axle count in the ENG file will give the most accurate outcome as OR when it does its axle count, doesn't know how the axles should be grouped.


Hello.

Couldn't this somehow be transferred to diesel and electric locomotives? I don't mean the physics, although that is important, but the sight. This is a major attraction for many.
The electric locomotive shown in the picture has two running (not driven) wheels and four driven wheels embedded in the main frame. Like a steam locomotive with a 2-8-2 axle arrangement. This is no accident. The drive wheels are connected by a rod. The torque of the 3-meter-diameter engine is transferred to the wheels by a drive rod called the Kandó triangle.
Unfortunately, at the moment all the wheels are spinning when the locomotive slips. This is very illusion destroying.
Another similarity to the steam locomotive is that the diameter of the running wheels is smaller than that of the driving wheel, and there are no braked wheels like many steam locomotives manufactured in the Budapest Ganz Mávag factory.
In Hungary, electric traction with a voltage of 50Hz started with this type.
https://kephost.net/p/MTIxMjI4OA.png

We have vehicles with only one axle driven, the other axle is not driven. It is not the classic single axle drive with an electric motor, because a diesel engine drives the wheels through a 4 (or 5) speed electro-pneumatic gearbox with the intervention of an electro-pneumatic automatic clutch.
In the five-axle motor car, two axles of the three-axle bogie are driven, not by means of a linkage but by a cardan shaft. The other bogie did not drive.

I respectfully ask Peter to implement this if it does not cause too much trouble. The Duplex PRR T1 can be a good starting point.

	ORTSAdhesion (
		ORTSCurtius_Kniffler ( 7.5 44 0.17 0.7 )
		Axle (
			ORTSInertia ( 2342 )
			ORTSRadius ( 0.375m )
			AnimatedParts ( "WHEELLS11, WHEELLS12, WHEELLS1, ROD1, ROD2, TRIGON1, TRIGON2, WHEELLS2, WHEELLS3, WHEELLS4" )
			Weight ( 62.6t )
              		NumberWheelsetAxles ( 4 )
		)
	)

I'm thinking of something like this.

Sincerely, Laci1959

Page 1 of 1
  • 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