Planning area of the ETCS DMI
#41
Posted 27 November 2020 - 01:57 AM
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 solved the problem with the gauge, it was my fault, thank you.
#43
Posted 27 November 2020 - 11:22 PM
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
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
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
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
#49
Posted 30 November 2020 - 01:36 AM
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:
Hi Cesar
Yes, you are right, I adjusted the CVF file there.
Thankyou!
regards
Luis
#51
Posted 30 November 2020 - 02:27 AM
#53
Posted 30 November 2020 - 04:25 AM
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
Posted 30 November 2020 - 05:23 AM
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
Posted 30 November 2020 - 06:00 AM
Re small chars, also the gradients in the planning area are hardly readable.