Elvas Tower: Trying to write a script for the British AWS - Elvas Tower

Jump to content

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

Trying to write a script for the British AWS Rate Topic: -----

#21 User is offline   Csantucci 

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

Posted 03 February 2020 - 02:08 AM

Thank you. In fact I think the best approach is to consider for AWS warning all signals having at least an aspect that is neither STOP nor CLEAR_2. Unfortunately looking for this in a simple way is not something which is implemented in OR now, so I am studying what would do the best way to do it, trying to implement something that could be useful also for other TCSs. As of now in effect there is no possibility for the TCS script to have info about distance signals, and this is an info which is useful also for other TCSs. I will also ask roeter to be a consultant in this.

#22 User is online   darwins 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,560
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 03 February 2020 - 04:29 AM

Finding distant signals (and other warnings) would be vital for most TCS.
If OR can read distant signals then it would also be good to add them to the track monitor. Yes I know I can see all the home signals two miles ahead, but driving steam the distant was usually positioned at what would nowadays be called the braking point - usually about 800 yards before the outer home on level track on fast routes - stopping distance from around 70 mph with vacuum brakes.


#23 User is offline   roeter 

  • Vice President
  • Group: Posts: Elite Member
  • Posts: 2,453
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 03 February 2020 - 05:14 AM

For my general view on this issue, see this post.
As for this particular script, for now I would limit it to NORMAL signals, that would cover all modern continouos block MAS systems.
However, even in these systems not all signals set by OR as NORMAL would have AWS, for instance shunt signals in yards and sidings would not be equiped with AWS. To make this distinction, you could opt for a check on the type of signalhead available in the signal, allthough that would require a list of applicable signalheads to be provided per route one way or the other.

Regards,
Rob Roeterdink

#24 User is offline   Csantucci 

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

Posted 04 February 2020 - 01:39 PM

INSTRUCTIONS TO GET THE ALPHA VERSION OF THE AWS TCS OPERATING

Preparation

Download and install https://www.uktrains...orm_fileid=4488 (NWT150 DMU) into the mep miniroute
Download and install https://www.uktrains...orm_fileid=5692 (cabview for NWT150) into the mep miniroute by Graham Parkin
The NWT150 has been wisely suggested by Coolhand, because it has a usable sunflower. However without the AWS TCS it works unproperly.

Download file mep_AWS_demo_pack.zip Rev.10 from here http://www.interazio...loads/index.php , unpack and install it into your Train Simulator folder for the MEP mini-route install

The pack must be run with OR NewYear MG rev. 53 or later.

For interested people such file includes:
- modified cabview (.cvf file named 2000_aws.cvf), with addition of the animation of the alerter reset button (files are added in the CABVIEW folder of the NWT150)
- AWS bell and beep sounds, and the TCS_AWS_UK.sms file that manages them; the AWS bell sound is the "bing" sound available in https://www.uktrains...orm_fileid=4053 , by James Horgan (files are added in the SOUND folder of the NWT150)
- modified .eng files, located in the OPENRAILS folder within the NWT150 folder; the modified .eng files refer to the new cabview and include a line
Include ( "AWS_eng.inc")
which includes the references to the script files; such AWS_eng.inc file is also included in the pack and resides within the Openrails subfolder. Its content is as follows
ORTSTrainControlSystem( TCS_AWS_UK )
ORTSTrainControlSystemSound( TCS_AWS_UK.sms )
ORTSTrainControlSystemParameters( TCS_AWS_UK.ini )
The first line refers to file TCS_AWS_UK.cs, which is the script file itself, and which resides within the SCRIPT subfolder of the NWT150 folder
The second line is self-explanatory
The third line refers to the file that contains the configuration parameters of the script file.

To run the AWS script file you must use OR NewYear MG rev. 52.4 or higher, which can be downloaded from here http://www.interazio...loads/index.php .
To enable AWS operation you must uncheck general option "Disable TCS scripts"
If you want to have also the speed reduction warning check (which applies if there is a speed reduction of more than 25 mph) you must check general option "Speed Control"
If you want to have also the alerter you must check general option "Alerter in cab"

The file includes also the files for two short test activities, that is TESTAWS1 and TESTAWS3. TESTAWS1 operates in a light signals environment, while TESTAWS3 operates in a semaphore environment.
AWS warning acknowledgements occur by pressing the Alerter Reset key or by clicking the AWS reset button with the mouse.

There are uncovered points:
- the AWS braking is stronger than in reality
- shunting NORMAL signals are not excluded (but there are very few)
- the AWS experts could find other flaws.
I am grateful for any comment.
I'm neither sure I manage correctly the case where a speed warning signal is between a speed reduction warning post and the speed reduction post.

You may of course try the pack also in other routes, but you will have to build the test activities by yourself.
You may also play (with some caution) with the configuration parameters of the .ini file.


It is possible to equip other trainsets with the AWS, and therefore to run existing activities using AWS, however if such trainsets don't have Alerter Reset button and operating sunflower there won't be visual cab interaction.

I wish to thank Coolhand and darwins for the many suggestions and explanations. Some support by you is probably still needed.
I credit also gpz and Serana, which developed a well generalized TCS script framework, again Serana for his script for the French TCSs, that I used as guideline to develop my one, and also roeter for his well-organized actual track section structure, that allowed me easily to get the needed data.

#25 User is offline   Coolhand101 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 998
  • Joined: 13-June 15
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 04 February 2020 - 07:53 PM

I have been waiting for this for quite some time. Unfortunately, I am still using XP so cannot test this brilliant addition for OR ATM. I'm sure Darwin will test this 100% and maybe a video demo can show the AWS in action.
Many thanks for making the AWS Carlo. I will speed up the time to get my new PC with windows 10.

Thanks

#26 User is offline   Csantucci 

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

Posted 05 February 2020 - 12:44 AM

There is something not working in the pack I have uploaded. Please wait to test it.

#27 User is offline   Csantucci 

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

Posted 05 February 2020 - 02:53 AM

Should be OK now. Download OR NewYear MG Rel 52.1 and the demo pack rev.1 at the link in the post above.

#28 User is offline   Csantucci 

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

Posted 05 February 2020 - 05:25 AM

View PostCoolhand101, on 04 February 2020 - 07:53 PM, said:

I have been waiting for this for quite some time. Unfortunately, I am still using XP so cannot test this brilliant addition for OR ATM. I'm sure Darwin will test this 100% and maybe a video demo can show the AWS in action.
Many thanks for making the AWS Carlo. I will speed up the time to get my new PC with windows 10.

Thanks

Coolhand,
which OR version are you using?

#29 User is offline   Csantucci 

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

Posted 05 February 2020 - 09:03 AM

mep_AWS_demo_pack updated to rev. 2. Please download it and simply overwrite if you have already installed preceding revisions.

#30 User is offline   Csantucci 

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

Posted 05 February 2020 - 09:38 AM

I tested the use of a real activity.
I selected the Baby Blues activity
The three steps needed are as follows:
1) take folders SCRIPT, SOUND and OPENRAILS from the demo pack and copy them within Trainset\MEP-D5909 (which is the folder where the player locomotive is present).
2) copy the two .eng files from TRAINSET\MEP-D5909 into TRAINSET\MEP-D5909\OPENRAILS .
3) add to both files, within the engine section, line
		Include ( "AWS_eng.inc")


You can start the activity. By the way the cab of the D5909 has a working sunflower too.

Pay attention that, if one of the script files will be improved, you will have to update all your script-equipped trainsets with the improvements, if you want them.
I haven't tested if it works to insert all the script files (and eventually also the sound files) in a TRAINSET\Common.script folder and to modify the references to the files within AWS_eng.inc.

#31 User is offline   Coolhand101 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 998
  • Joined: 13-June 15
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 05 February 2020 - 03:33 PM

View PostCsantucci, on 05 February 2020 - 05:25 AM, said:

Coolhand,
which OR version are you using?


I'm on X1.3.1-35-g842e626d, which I believe is the very last version to support XP.

Thanks

#32 User is offline   Csantucci 

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

Posted 06 February 2020 - 01:31 AM

Hi Coolhand,
after having made a backup of Orts.Simulation.dll and Orts.Simulation.pdb, replace them in your OR version with the two files included in the attached .zip. That should allow you to run the AWS script, accordingly to the instructions in my post #24
Attached File  Simulation.zip (1.26MB)
Number of downloads: 493

#33 User is online   darwins 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,560
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 06 February 2020 - 05:52 AM

Well that little test posed a number of challenges.


Firstly I could not seem to get a MonoGame update. (Me still with New Year MG - well it is another New Year.)


Searched around could not find a download for Rev .52.1 or higher. Could not find a link in your post either.


Downloaded Rev .4 anyway.


Downloaded the class 150 model and cab.

Do not have Mid East Plus. Downloaded the freeware D5909 which is still aliased to the MSTS GP38 cab an no cabview available to download.


Now a look at the MEP_AWS_demo pack. Well clearly can not use the test activities, paths etc, so will have to make my own test for another route.


Glad I kept the original cab for now. Everything in the trainset folder looks ready to go and I can identify the script file and the important line to add to eng files Include ( "AWS_eng.inc").


In the sound folder the TCS_AWS_UK.sms could easily be edited to use the rather different sounds on older locomotives.


Thanks for providing the Bing and the Buzz.


A quick Explore Route on North West England confirms that my version of MG is too old. But the drive from Blackpool to Preston to Manchester will be nice with both semaphore and MAS.


So now copy and paste your two files from Simulation.zip into a duplicate copy of the latest unstable version of OR U2020.02.06-0551


OpenRails gives a fatal error notice on start up


System.MissingMethodException: Method not found: Microsoft.Xna.Framework.Vector2 ORTS.Common.WorldLocation.GetDistance2D


At this point I am going to stop and await assistance.

#34 User is offline   Csantucci 

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

Posted 06 February 2020 - 06:26 AM

Hi Darwins,
Thank you for having tried and sorry for the inconveniences.
The AWS demo pack works only with OR MG NewYear Rev. 52.1 or higher. It does not work with OR Unstable neither with OR Testing.
OR NewYear MG (name not changed even if we are in 2020, for continuity of naming) Rev 52.2 (which is the latest one) can be downloaded from here http://www.interazio..._NewYear_MG.zip (more about that here http://www.elvastowe...post__p__255502 ). I have now added such download link in the post on how to install the AWS demo pack.
Updates to OR NewYear MG must not be obtained by clicking on the upper right link in the Menu window, but instead by downloading them from the link above.
The NWT150.eng file in the Openrails subfolder already points to the 2000_aws.cvf cabview file. As OR findes .eng files in the Openrails subfolder, it does not consider the original ones in the base folder NWT150.
If your D5909 aliases to the GP38 cab, you obviously won't see the sunflower, so I suggest you to use the AWS150.
The .zip file containing the simulation dll works only with the very old release that Coolhand is using. I have generated it to allow him to test AWS.

I hope this clarified some points. If problems persist, I'm ready to provide support.

#35 User is offline   Coolhand101 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 998
  • Joined: 13-June 15
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 06 February 2020 - 06:31 AM

View PostCsantucci, on 06 February 2020 - 01:31 AM, said:

Hi Coolhand,
after having made a backup of Orts.Simulation.dll and Orts.Simulation.pdb, replace them in your OR version with the two files included in the attached .zip. That should allow you to run the AWS script, accordingly to the instructions in my post #24
Attachment Simulation.zip


Thanks Carlo.
I will be testing this later today.

  • 12 Pages +
  • 1
  • 2
  • 3
  • 4
  • 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