Hemiptera Bugtracker at bugs.linux-forks.de

advtrains

[tss] distance of "+ safety override +" is too long

Send replies to 94@bugs.linux-forks.de or using the Form below.
avatar From: OP
Sat, 26 Jan 2019 02:33:01 -0000

The distance to the end of a track where the "+ safety override +"

becomes active is too long.

In tight places like mountains there are tracs build to use every

available meter. This looks then like:

[wall][bumper][ATC][track][track]...[ATC (for pre-braking)]...

THe pre-braking ATC had reduced

the speed so far, that the train stopped immediantly at the ATC at the

bumper. Overshooting was only happening when lag or crashes had

happened. Now the train can't reach anymore the ATC at the bumper to

reverse or with a LuaATC track to trigger the change of switches.

The "safety override" should be made configurable or at least dependent

of the train speed.

avatar From: Developer
Mon, 28 Jan 2019 08:49:01 -0000

There's a bunch of values in interlocking/lzb.lua. those can be tweaked from ingame using a command like //lua advtrains.interlocking.set_lzb_param(par, value). Try decreasing the "ADD_STAND" and "ADD_SLOW" values. If you found good values, let me know.

Am 26. Januar 2019 03:34:01 MEZ schrieb 94@bugs.linux-forks.de:

>The distance to the end of a track where the "+ safety override +"

>becomes active is too long.

>

>In tight places like mountains there are tracs build to use every

>available meter. This looks then like:

>[wall][bumper][ATC][track][track]...[ATC (for pre-braking)]...

>THe pre-braking ATC had reduced

>the speed so far, that the train stopped immediantly at the ATC at the

>bumper. Overshooting was only happening when lag or crashes had

>happened. Now the train can't reach anymore the ATC at the bumper to

>reverse or with a LuaATC track to trigger the change of switches.

>

>The "safety override" should be made configurable or at least dependent

>of the train speed.

avatar From: OP
Tue, 16 Apr 2019 15:39:01 -0000

And a normal player can change that?

Please become realistic!

I think a value is needed which gives a speed below that no

pre-braking is done.

avatar From: Someone else
Mon, 16 Sep 2019 22:30:01 -0000

This is my modification to the code, which forces trains to either apply the brake or to return control to ATC or the driver.

local function apply_control(id, train)

local lzb = train.lzb

local i = 1

while i<=#lzb.oncoming do

if lzb.oncoming[i].idx < train.index then

local ent = lzb.oncoming[i]

if ent.fun then

ent.fun(ent.pos, id, train, ent.idx, ent.spd, lzb.data)

end

table.remove(lzb.oncoming, i)

else

i = i + 1

end

end

for i, it in ipairs(lzb.oncoming) do

local a = advtrains.get_acceleration(train, 1) --should be negative

local v0 = train.velocity

local v1 = it.spd

if v1 and v1 <= v0 then

local s = (v1*v1 - v0*v0)/2/a + 1 -- Braking distance, plus a bit for safety

local i = advtrains.path_get_index_by_offset(train, it.idx, -s)

--train.debug = dump({v0f=v0*f, aff=a*f*f,v0=v0, v1=v1, f=f, a=a, s=s, i=i, idx=train.index})

if i <= train.index then

train.ctrl.lzb = 1

return

end

end

end

train.ctrl.lzb = nil

end

avatar From: Someone else
Wed, 06 Oct 2021 17:16:01 -0000

With new LZB rework, train can drive 0.1m up close to the LZB checkpoint. ISsue is thus solved. Closing.

avatar Status Update
Wed, 06 Oct 2021 17:10:01 -0000
This bug was closed.
Reply