Elvas Tower: Station clocks - Elvas Tower

Jump to content

  • 6 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic

Station clocks Creating clocks to synchronize with simulation Rate Topic: -----

#51 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 11 April 2020 - 05:09 AM

View Postvitro, on 11 April 2020 - 04:32 AM, said:

The interval clocks itself can be done right now throw Check_Timing_Trigger() function.
Is the Check_Timing_Trigger() function an OR signal script function? I ask because I do not know it from MSTS. (But I am rarely involved with signal scripts at the moment either)

View Postvitro, on 11 April 2020 - 04:32 AM, said:

... Interval clock turns off after 9:59, and turns on again when train passes exit signal at station...
Does the interval Clock really switch off when 9:59 minute is reached? Is this how it works in reality, for example in the Moscow Metro? ...sorry for my not knowing.

#52 User is offline   vitro 

  • ORTS Content creator
  • Group: Posts: Switchman
  • Posts: 11
  • Joined: 09-December 14
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 11 April 2020 - 08:25 AM

View Postjonas, on 11 April 2020 - 05:09 AM, said:

Is the Check_Timing_Trigger() function an OR signal script function? I ask because I do not know it from MSTS. (But I am rarely involved with signal scripts at the moment either)

Yes, it is recently added or-specific function.

View Postjonas, on 11 April 2020 - 05:09 AM, said:

Does the interval Clock really switch off when 9:59 minute is reached? Is this how it works in reality, for example in the Moscow Metro? ...sorry for my not knowing.

It depends on how Clock is set. After 9:59 it can switch off, or begin from 0:00. In Novosibirsk Metro it start counting only minutes on two right digit positions. Here's example of first case: https://www.instagra.../p/BTthroOFGuy/

#53 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 11 April 2020 - 08:44 AM

Actually an interesting video - thank you for providing it!

Thought about the expecting OR game experience some more: In an activity lasting longer than 10 minutes, in OR/MSTS such an interval signal would always be dark when the player train is approaching, because there are no trains ahead whitch had reset the signal to zero and more than 10 minutes have already passed since actitity begin.
When the player train has passed such always dark signal it would reset to 0 and then count up to 9:59. All this "in the back sight" of the player train, the player would rarly see the count up, because he is already on his way to the next station. There he meets again a dark interval signal and so on.
vitro, how do you imagine the experience of such an interval signal for the player in OR? Maybe I am missing something?

#54 User is offline   eugenR 

  • Conductor
  • Group: Posts: Contributing Member
  • Posts: 472
  • Joined: 15-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 11 April 2020 - 09:07 AM

see here in Post #13:
http://www.elvastowe...ng/page__st__10
But I don't know how tu use this Functions
Regards
EugenR

#55 User is offline   vitro 

  • ORTS Content creator
  • Group: Posts: Switchman
  • Posts: 11
  • Joined: 09-December 14
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 11 April 2020 - 11:19 AM

View Postjonas, on 11 April 2020 - 08:44 AM, said:

vitro, how do you imagine the experience of such an interval signal for the player in OR? Maybe I am missing something?


I expect that there is more than one train in activity or multiplayer. It is cool sometimes to follow a train with minimal interval, observing signals switching right in front of you, follow timetable, etc.

#56 User is offline   roeter 

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

Posted 11 April 2020 - 11:39 AM

View Postjonas, on 11 April 2020 - 08:44 AM, said:

Actually an interesting video - thank you for providing it!

Thought about the expecting OR game experience some more: In an activity lasting longer than 10 minutes, in OR/MSTS such an interval signal would always be dark when the player train is approaching, because there are no trains ahead whitch had reset the signal to zero and more than 10 minutes have already passed since actitity begin.
When the player train has passed such always dark signal it would reset to 0 and then count up to 9:59. All this "in the back sight" of the player train, the player would rarly see the count up, because he is already on his way to the next station. There he meets again a dark interval signal and so on.
vitro, how do you imagine the experience of such an interval signal for the player in OR? Maybe I am missing something?

You're forgetting about timetables. I have a timetable with a suburban route with trains at 5 mins. interval, and 3 mins interval during the rush hour. Any of those can be the player train. So unless you select the first train, there is always a train ahead of the player train within 10 mins.

Regards,
Rob Roeterdink

#57 User is offline   eugenR 

  • Conductor
  • Group: Posts: Contributing Member
  • Posts: 472
  • Joined: 15-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 12 April 2020 - 12:07 AM

View Postjonas, on 11 April 2020 - 05:09 AM, said:

Is the Check_Timing_Trigger() function an OR signal script function? I ask because I do not know it from MSTS. (But I am rarely involved with signal scripts at the moment either)

Does the interval Clock really switch off when 9:59 minute is reached? Is this how it works in reality, for example in the Moscow Metro? ...sorry for my not knowing.

The Functions
Activate_Timing_Trigger()
Check_Timing_Trigger( x )
are new in OR and working, see here in Post #13
http://www.elvastowe...ng/page__st__10
With Activate_Timing_Trigger()in the Stop-Path of the signalscript you hold the Timer on zero
In the clearpath you hold the signal as long on red, as the timer isn't higher then the Time x ( in seconds)

But I don't see a way to read this timer, only perhaps, to show minutes to wait, you check the Timer for every minute and show the result.

	if (!enabled ||	block_state() !=# BLOCK_CLEAR || !route_set())							
	{
		state = SIGASP_STOP;
		Activate_Timing_Trigger(); 
	}
// Signal is enabled and the block ahead is clear
	else if ( Check_Timing_Trigger( 10 ))  // wait 10 seconds to clear the signal
	{
		state = SIGASP_CLEAR_2;		
	}
	else 
	{
		state = SIGASP_STOP;
	}
        draw_state = def_draw_state (state);


Regards
EugenR

#58 User is offline   ebnertra000 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,258
  • Joined: 27-February 17
  • Gender:Male
  • Location:East-Central Minnesota
  • Simulator:OR/TSRE
  • Country:

Posted 12 April 2020 - 07:17 AM

Could this timing trigger be used to delay the change of signals as a train passes it (from green to red, let's say). As it stands, if the cab isn't right up front on the lead unit, the signal will drop while it's still well within sight, even when travelling at speed. In most cases, there is a few-second delay between the signals being passed, and when the signal reacts to its being passed

#59 User is offline   eugenR 

  • Conductor
  • Group: Posts: Contributing Member
  • Posts: 472
  • Joined: 15-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 12 April 2020 - 11:06 AM

View Postebnertra000, on 12 April 2020 - 07:17 AM, said:

Could this timing trigger be used to delay the change of signals as a train passes it (from green to red, let's say). As it stands, if the cab isn't right up front on the lead unit, the signal will drop while it's still well within sight, even when travelling at speed. In most cases, there is a few-second delay between the signals being passed, and when the signal reacts to its being passed


With the new Functions of Rob, there would be a solution:
http://www.elvastowe...ode-signalling/
see: additional signalscript functions

	if (!enabled ||								
		block_state() !=# BLOCK_CLEAR ||				
		!route_set())							
	{
		state = SIGASP_STOP;
		if ( Check_Timing_Trigger( 5 ))
		{
			draw_state = 0;
		}
		else
		{
			draw_state = this_sig_lvar( 0 );
		}		
		
	}
	else 
	{
		state = SIGASP_CLEAR_2;
		draw_state = 1;	
		store_lvar( 0, draw_state );
		Activate_Timing_Trigger(); 
	
	}

store_lvar is storing the drawstate of the cleared signal ( because mor complex signals have more than one clear_states)
in the STOP-Case the signal is switching immediatly to State = SIGASP_STOP
but it will show after changing to STOP for 5 seconds the "old" draw_state.
Regards
EugenR

Edit:
A better solution would be, if Rob Röterdink could realize a new Function as
Train_is_passing the_Signal
This Function should change to true, when the !=# block_state is changing to true and the train is passing the signal.
together with store_lvar ( 0, draw_state ) the Signal could show the Clear draw_state until this Function change to false.

Regards
EugenR

#60 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 14 April 2021 - 09:52 PM

I am happy to see in the current OR version the animated clocks.
Since one of the last current versions a suitable "animated.clocks-or" file is created by asking the user via dialog box while the route starts. I have some questions about it:

• Are OR files of this type (Json) written directly to the Routes folder instead to the Openrails subfolder of the route?
• Will STF files like the "carspawn.dat" or "turntables.dat" in the Openrails folder be handled in the same way in the future?
• Is the current dialog box really necessary to ask the user to confirme the creating of the "animated.clocks-or" file ? (The "animated.clocks-or" could always be generated if a "clocks.dat" exists, isn't it.)
• Will the "Clocks.dat" (and other STF files) possibly no longer be recognized by future versions?
• I am certainly not up to date with the status quo on the subject of Json files and Open Rails. Is there a thread about it?

#61 User is offline   cjakeman 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 3,027
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 15 April 2021 - 05:05 AM

Good to hear that it is working well for you.

I'll try to answer all your queries but, for the benefit of people who are not familiar with the code submitted and discussed on GitHub, I will provide some background.

The animated clocks that Jonas has implemented in OR_NewYear_MG work well but introduce a new data file openrails\clocks.dat. It's been ORMT policy for some years that new data files should make use of JSON instead of Microsoft's STF because JSON is well-documented and an international standard. Rob Roeterdink used JSON for the Weather files (back in 2019) and I'm sorry that I didn't mention this policy to Jonas at the time.

To include Jonas work into the official Open Rails code, I have provided a data conversion mechanism that offers to create a JSON file from the clocks.dat if one is found or more recent. The official Open Rails code will read any JSON file and ignore any clocks.dat file.

Please note that we only need the conversion because there may now be a few routes which include animated clocks.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• Are OR files of this type (Json) written directly to the Routes folder instead to the Openrails subfolder of the route?

Since animate.clocks-or is a new OR-only file and applies to the whole route, it is written to the Routes folder. This is not the case with every JSON file.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• Will STF files like the "carspawn.dat" or "turntables.dat" in the Openrails folder be handled in the same way in the future?

There are no proposals to do that, because "carspawn.dat" is part of MSTS and not an OR-only file.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• Is the current dialog box really necessary to ask the user to confirm the creating of the "animated.clocks-or" file ?

The policy declared on our website is that Open Rails will not change your data files, so we need to ask for permission. It only happens if your route has a clocks.dat but not a more recent animated.clocks-or and only happens once, so I don't think it will be a burden.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• Will the "Clocks.dat" (and other STF files) possibly no longer be recognized by future versions?

As we have declared in the past, all MSTS STF files will be recognised by future versions of OR. It is just new types of STF file that we will not be adopting.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• I am certainly not up to date with the status quo on the subject of Json files and Open Rails. Is there a thread about it?

There are examples of Rob's weather file here. JSON is documented fairly simply here.

#62 User is offline   Csantucci 

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

Posted 15 April 2021 - 08:16 AM

View Postcjakeman, on 15 April 2021 - 05:05 AM, said:

Since animate.clocks-or is a new OR-only file and applies to the whole route, it is written to the Routes folder. This is not the case with every JSON file.

Up to today all files added for OR are stored in the Openrails subfolder AFAIK, or in an Openrails subfolder of existing subfolders. Is't it cleaner, and easier to follow, to leave the base folder of the route untouched and to continue inserting the additional OR-related files in Openrails subfolders?

#63 User is offline   cjakeman 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 3,027
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 15 April 2021 - 09:43 AM

View PostCsantucci, on 15 April 2021 - 08:16 AM, said:

Up to today all files added for OR are stored in the Openrails subfolder AFAIK, or in an Openrails subfolder of existing subfolders. Isn't it cleaner, and easier to follow, to leave the base folder of the route untouched and to continue inserting the additional OR-related files in Openrails subfolders?

Good point, but the openrails subfolders are for OR-specfic extensions to MSTS formats and this new type of file isn't one of those.

(I did discuss this proposal with James Ross and he was quite clear about where the new file should go. Perhaps I should have asked him to explain his thinking.)

#64 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 15 April 2021 - 12:53 PM

In order to prevent further off topic here, I have opened this thread.

#65 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 15 April 2021 - 09:29 PM

Would "animated" also mean digital clocks in English?
I ask because I also specify the clock type in clocks.dat, which in future could also be "digital" instead of "analog" if such clocks will be implemented in Open Rails some day (see the code box here).
So instead of the JSON name "animated.clocks-or" wouldn't even "external.clocks-or" or "terrain.clocks-or" be better?


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