Elvas Tower: Planning area of the ETCS DMI - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 10 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Planning area of the ETCS DMI Rate Topic: ***** 2 Votes

#41 User is offline   cesarbl 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 582
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 27 November 2020 - 01:57 AM

You can use the generic SetCurrentSpeedLimitMpS() call or ETCSStatus.AllowedSpeedMpS for the gauge limits, but I don't know why it has stopped working for you. Could you please show me the TCS code you are using?

PS: I've filed a PR against your TCS handles branch for tunnel and milepost access.

#42 User is offline   Csantucci 

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

Posted 27 November 2020 - 06:09 AM

I've merged your PR, which is now part of mine.
I solved the problem with the gauge, it was my fault, thank you.

#43 User is offline   Csantucci 

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

Posted 27 November 2020 - 11:22 PM

César's code is now merged into OR NewYear MG rev. 82.

César, I intend now to generate the indication speed curve. Can you tell me what mathematical relationship I can use between warning speed curve (that I have) and the indication speed curve?

#44 User is offline   cesarbl 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 582
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 28 November 2020 - 12:03 AM

The ETCS braking curves don't define speed limits, but rather distance limits that, when reached, cause an specific action (i.e. emergency brake application). This has the advantage of being able to have different deccelerations at different locations (e.g. due to gradient changes or inhibition of regenerative brake in neutral sections). This curves are pretty safe, but still provide the best braking performances. However, the calculations are complex.

I suppose you don't have the intention of generating the full curves, so you can use this approximation using speed curves which should work well. Having as a reference the service brake intervention curve calculated with the SpeedCurve() function, you can calculate the rest of curves by adjusting the "DelayS" parameter:
Warning curve: 2 seconds
Permitted curve: 4 seconds
Indication curve: 13 seconds

#45 User is offline   Csantucci 

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

Posted 28 November 2020 - 12:18 AM

Thanks César, that's perfect!

#46 User is offline   Csantucci 

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

Posted 29 November 2020 - 07:55 AM

César,
I have noticed this: line 347 of CircularSpeedGauge.cs is as follows:
                else if (status.CurrentMonitor == Monitor.TargetSpeed || status.CurrentMonitor == Monitor.ReleaseSpeed) NeedleColor = currentSpeed < targetSpeed ? ColorGrey : ColorYellow;

Now let's assume that targetSpeed is == 0. Is it correct that the NeedleColor remains yellow? Shouldn't be the compare of type <=?

#47 User is offline   Luis 

  • Hostler
  • Group: Status: First Class
  • Posts: 83
  • Joined: 08-January 18
  • Gender:Male
  • Simulator:MSTS/ORTS
  • Country:

Posted 29 November 2020 - 09:13 AM

Hello everybody.
how many thanks for the new possibilities with ETCS genial!!
I have a question here, how can I adapt the ECTS interface to the driver's cab on a display?
I want to adjust the height and width,
thanks for the help.
You are great.

#48 User is offline   cesarbl 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 582
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 29 November 2020 - 12:11 PM

It's not yet decided what the final cabview control will be, but at the moment it is rendered using the already existing "circular speed gauge". The location and dimensions are defined in the .cvf with the Position(x y w h) token, as usual.

#49 User is offline   Csantucci 

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

Posted 30 November 2020 - 01:36 AM

Hi César,
I built the complete gradient profile using signal altitudes and that worked. However I started getting random crashes due to duplicate key at line 233 of PlanningWindow.cs
                gradientRectangles.Add(new Point(minp, maxp), e.GradientPerMille < 0);

I analyzed this a bit and noticed that this happens when the locomotive is very near to a signal. I suppose that what occurs is that two very near gradient segments are generated there, une starting from the locomotive and one starting from the signal. Due to rounding to integer and to downscaling I assume that the two segments get the same maxp value, which generates the crash. I tried to avoid this by disabling the creation of a segment if it is smaller than 20 meters (heuristic value). I wonder however if you could insert a check in your code.

#50 User is offline   Luis 

  • Hostler
  • Group: Status: First Class
  • Posts: 83
  • Joined: 08-January 18
  • Gender:Male
  • Simulator:MSTS/ORTS
  • Country:

Posted 30 November 2020 - 01:50 AM

View Postcesarbl, on 29 November 2020 - 12:11 PM, said:

It's not yet decided what the final cabview control will be, but at the moment it is rendered using the already existing "circular speed gauge". The location and dimensions are defined in the .cvf with the Position(x y w h) token, as usual.



Hi Cesar

Yes, you are right, I adjusted the CVF file there.

Thankyou!

regards
Luis

#51 User is offline   cesarbl 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 582
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 30 November 2020 - 02:27 AM

Re the needle color, according to the specs it should be yellow if train speed is above or equal to target speed, even if it is zero. I found an example in the specification:
Attached Image: yellowneedle.jpg

I'll change the way the gradient items are added so no exception is raised, thanks for investigating that.

#52 User is offline   Csantucci 

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

Posted 30 November 2020 - 02:57 AM

Thanks, César.

#53 User is offline   Csantucci 

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

Posted 30 November 2020 - 04:25 AM

Hi César,
I wanted to start with the indication distance and marker. I set the indication distance only and got a "System.InvalidOperationException: Nullable object must have a value." crash here at line 323 of PlanningWindow.cs
                bool im = (IndicationMarkerDistanceM??-1) > 0 && IndicationMarkerTarget.Value.Equals(cur);

So it seems that the target and distance must be defined together. Is this conceptually necessary?

By the way some day ago you also wrote about developing the braking bar and the text area. If numbers and strings would be visible (I increased a bit the size in the versions I have) I'm interest in using them: in my braking bar I couldn't implement the above square that increases its dimension, and also the text area I implementes is quite elementary (I display .ace files directly and not strings). What I'd need is that two parts should again be freely and separately selectable.

#54 User is offline   cesarbl 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 582
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 30 November 2020 - 05:23 AM

The indication target (which is shown in yellow instead of grey) is the one which the driver must obey first, because it has the nearest indication supervision limit. The indication marker (the yellow horizontal line in the planning area) shows the distance to the point were the driver should start braking. At that point, the ETCS enters in Target Speed Monitoring, where no indication target exists, so all targets are shown in grey. Anyway, the code you are showing is pretty stupid and I will change it. If the script wants to display the indication marker without indication target or vice-versa, I wont stop it from doing it.

I'm making slow progress with the distance to target and the colored square. I'll try to find more time to finish it, and then I will start with the message area.
For the font size, I'll add a check such that if the DMI size is small, it will be increased a bit. I know what a pain is creating text messages with .ace files. A few years ago I created an ETCS script (not as accurate as the one I have now) and I had to do combinations of ALERTER_DISPLAY, ASPECT_DISPLAY and other controls to display messages, as no ORTS_TCS controls were available at that moment (thank you Carlo for adding them).

Edit: Use this line instead of the previous one
bool im = IndicationMarkerTarget.Equals(cur);


#55 User is offline   Csantucci 

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

Posted 30 November 2020 - 06:00 AM

Thanks, that works so.
Re small chars, also the gradients in the planning area are hardly readable.

  • 10 Pages +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • 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