Planning area of the ETCS DMI
#41
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.
PS: I've filed a PR against your TCS handles branch for tunnel and milepost access.
#42
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.
I solved the problem with the gauge, it was my fault, thank you.
#43
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?
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
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
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
#46
Posted 29 November 2020 - 07:55 AM
César,
I have noticed this: line 347 of CircularSpeedGauge.cs is as follows:
Now let's assume that targetSpeed is == 0. Is it correct that the NeedleColor remains yellow? Shouldn't be the compare of type <=?
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
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.
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
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
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
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.
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
Posted 30 November 2020 - 01:50 AM
cesarbl, 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