Elvas Tower: Expand potential of TCS scripting - 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.
  • 9 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Expand potential of TCS scripting Rate Topic: -----

#21 User is offline   mrmosky 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 810
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 12 March 2020 - 03:11 PM

That looks very interesting. Good development there.

Geoff

#22 User is offline   FS.E652 091 

  • Conductor
  • Group: Posts: Active Member
  • Posts: 340
  • Joined: 22-April 14
  • Gender:Male
  • Location:Sicily
  • Simulator:ORTS
  • Country:

Posted 13 March 2020 - 03:18 AM

This is a very important step for the incrementation of drive realism!! really impressionant!!!

I hope that the team will add the cruise control as soon possible!!

#23 User is offline   Csantucci 

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

Posted 15 March 2020 - 03:46 AM

If someone is interested in looking at the files or also in trying the SCMT-RSC TCS script, here is what has to be done:
- download and unpack OR_NewYear_MG rev.55.1 from the usual link, that is http://www.interazio..._NewYear_MG.zip
- download, read the readme file and unpack http://www.interazio...SCMT_Rev3.0.zip
- download, read the readme file and unpack http://www.interazio...SCMT_Rev1.0.zip . This last file includes the test activities.

I credit again gpz and Serana for the work done on this field. I could also use (after some adaptations) Serana's script for the part implementing the braking curves.
By the way SCMT foresees that when the overspeed warning threshold (3 Km/h above allowed max speed) is reached, an automatic dynamic braking is started; when the overspeed emergency threshold (5 Km/h above allowed max speed) is reached, the usual emergency braking is started.

15/3/2020 7:18PM: Post updated

#24 User is offline   Haran Banjo 

  • Hostler
  • Group: Posts: Active Member
  • Posts: 55
  • Joined: 12-November 19
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 17 March 2020 - 05:12 AM

I wanted to report something, on the Triveneto scenario, when you put a yellow signal, the scmt does not detect any code and the track monitor signals yellow / green, without having put any deviation.

This occurs on all scenarios with type 1 signaling (Adriatics for example).

#25 User is offline   Csantucci 

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

Posted 26 March 2020 - 09:02 AM

I have replied to you in the trainsimhobby forum.

#26 User is offline   Csantucci 

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

Posted 28 March 2020 - 10:21 AM

A new release of the SCMT-RSC TCS script is available; here is what has to be done from the downloadpage linked in my signature:
- download and unpack OR_NewYear_MG rev.56.1 or later
- download, read the readme file and unpack Pack_SCMT_Rev7.0.zip
- download, read the readme file and unpack Pack_Activity_demo_SCMT_Rev4.0.zip . This last file includes the test activities.

Readme's are also in English.

With OR NewYear MG rev. 56.1 I have added what I think is a useful hook for people writing TCS scripts: it is
            Script.Locomotive = () => Locomotive;

Locomotive is the actual player locomotive.
It looks like a trivial thing, but with this the TCS script may have access to the whole Simulation environment public classes and methods (trainset, player train, signals and so on).
Therefore it is no more needed to add further personalized hooks, and only general use hooks might be added.

#27 User is offline   Csantucci 

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

Posted 30 March 2020 - 10:22 AM

Above downloads are now all available in this small download page http://www.interazio...loads/index.php .

#28 User is offline   cesarbl 

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

Posted 31 March 2020 - 12:42 AM

Hello,
I am a Spanish railroad enthusiast interested in signalling and TCSs. I have previously developed a TCS script for the most used system in Spain, ASFA, which also included a simple implementation of LZB and ETCS (not very well tested). It can be downloaded at http://www.spaintrai...ex.php?dlid=847

Thanks to Carlo's improvement in TCS API, we decided to create a fully functional version of 'ASFA digital', which uses a lot of buttons and displays. To increase realism, we thought that it could be interesting to modify existing Spanish routes to add 'beacons', using for that purpose REPEATER signals, unused in Spanish signal scripts. It is not an elegant solution, but is as much as we can do at the moment.

I know this is a polemical topic, as signalling code might be refactored in the future, so I understand if you decide to not take into account the changes, which I follow to explain.

First of all, I have added an assembly reference in script compiler for 'Orts.Formats.Msts' to access signal enums from the script. I also modified Find_Next_Object_InRoute in Signals.cs so other sigfn types can be looked for. When testing this functionality, I saw that if two DISTANCE signals were in the same TrackCircuit, only first of them was correctly detected. I have corrected this too.

I attach a diff file with suggested changes.

Thanks in advance

Attached File(s)

  • Attached File  diff.txt (2.75K)
    Number of downloads: 597


#29 User is offline   Csantucci 

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

Posted 31 March 2020 - 03:03 AM

I'm happy that you can use what OR offers to generate a script for Spain.
I have added your diffs in the source code of OR NewYear MG and uploaded them, and I have uploaded OR NewYear MG REv 56.2 , which includes your improvements. Thank you also for spotting the bug.
I will have an interested look at your ETCS script, and will allow myself to use parts of it if you agree, as I have the intention to work on it for Italian HSTs, so, if I can spare work, that's welcome :)

#30 User is offline   Serana 

  • Conductor
  • Group: Posts: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 31 March 2020 - 04:09 AM

View PostCsantucci, on 28 March 2020 - 10:21 AM, said:

With OR NewYear MG rev. 56.1 I have added what I think is a useful hook for people writing TCS scripts: it is
            Script.Locomotive = () => Locomotive;

Locomotive is the actual player locomotive.
It looks like a trivial thing, but with this the TCS script may have access to the whole Simulation environment public classes and methods (trainset, player train, signals and so on).
Therefore it is no more needed to add further personalized hooks, and only general use hooks might be added.


Originally, it was not accepted to give access to the simulator data structures in order not to have scripts do weird things with the simulator.
That's why we isolated the scripts as much as it is currently.

#31 User is offline   cesarbl 

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

Posted 31 March 2020 - 04:44 AM

 Csantucci, on 31 March 2020 - 03:03 AM, said:

I'm happy that you can use what OR offers to generate a script for Spain.
I have added your diffs in the source code of OR NewYear MG and uploaded them, and I have uploaded OR NewYear MG REv 56.2 , which includes your improvements. Thank you also for spotting the bug.
I will have an interested look at your ETCS script, and will allow myself to use parts of it if you agree, as I have the intention to work on it for Italian HSTs, so, if I can spare work, that's welcome :)

I wrote that script years ago, when I did not know much about coding, so it looks like a mess. Anyway, you can use it you find it helpful. I also have a work-in-progress C++ implementation of ETCS following ERA SRS. Everything can be found in my github page https://github.com/cesarBLG/

#32 User is offline   Csantucci 

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

Posted 31 March 2020 - 04:59 AM

Hi César,
thank you for the link and your authorization!

Hi Cédric,
I studied about this, however this bad case would occur only to people using such scripts, and the script execution can be inhibited by simply checking the related general option.It wouldn't corrupt OR as such, and for sure it is more sure than adding buggy functions to the OR main code. The advantage is that you haven't to add this and the other hook to cover all particularities that the different TCS offer. I was a bit uncomfortable at adding hooks that have very particular usages. So I think that advantages are bigger than disadvantages. But I am open to discuss this.

#33 User is offline   Serana 

  • Conductor
  • Group: Posts: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 31 March 2020 - 06:03 AM

 Csantucci, on 31 March 2020 - 04:59 AM, said:

Hi Cédric,
I studied about this, however this bad case would occur only to people using such scripts, and the script execution can be inhibited by simply checking the related general option.It wouldn't corrupt OR as such, and for sure it is more sure than adding buggy functions to the OR main code. The advantage is that you haven't to add this and the other hook to cover all particularities that the different TCS offer. I was a bit uncomfortable at adding hooks that have very particular usages. So I think that advantages are bigger than disadvantages. But I am open to discuss this.


I am not against the idea, I am just reminding why it was chosen to do it like this. ;)

#34 User is offline   cesarbl 

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

Posted 07 April 2020 - 01:23 AM

Hi Carlo,
One of my TCS script beta-testers noticed that when using a rear cab, DISTANCE signals are not read properly. NextDistanceSignalAspect() and NextDistanceSignalDistanceM() functions still return information related to forward train direction, instead of reading backwards. I have tried to find a solution, but I don't really understand signalling code, so I haven't succeeded.

Kind regards,
César

#35 User is offline   Csantucci 

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

Posted 07 April 2020 - 07:52 AM

Hi César,
I must admit I didn't bother about reverse direction. In which case do you need it? Explore mode? Or activity mode running from rear cab? Or something else?

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

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