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.
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.
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.
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
With new LZB rework, train can drive 0.1m up close to the LZB checkpoint. ISsue is thus solved. Closing.