Elvas Tower: Forced approach position control clears far from the signal - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Forced approach position control clears far from the signal Rate Topic: -----

#1 User is offline   cesarbl 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 401
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 16 April 2020 - 12:52 AM

Trying to use approach control for a Level Crossing signal, a route creator noticed that approach_control_position_forced was clearing LX signals when the train was far away from them.
I saw that approach control takes into account distance between train and its next signal. This is correct for non forced version of approach control, but in the forced function, the signal is cleared miles away from the train.

For testing, I modified the function to search in train's path until the control distance is passed or the signal is found, and seems to work. However, this might need some tuning to avoid searching for signals in every update cycle.

I don't know if this is the expected behaviour for this function. If it is not, I don't mind trying to fix it.

Regards,
César

#2 User is offline   roeter 

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

Posted 16 April 2020 - 06:30 AM

César,

you have a PM.

Regards,
Rob Roeterdink

#3 User is offline   cesarbl 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 401
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 17 April 2020 - 11:21 AM

I attach a diff with a fix for this issue. With this modification approach control also works in explorer mode. However, it doesn't work in multiplayer clients (I assume MP server has ValidRoute only for its own trains). I hope the changes won't break anything.

Regards,
César

Attached File(s)



#4 User is offline   Csantucci 

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

Posted 17 April 2020 - 11:17 PM

The feature seems to work well with the fix, which I have introduced in Rev. 58.1 of OR NewYear MG.

Page 1 of 1
  • 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