diff --git a/src/behavior.jl b/src/behavior.jl index ff89da8..e05aba7 100644 --- a/src/behavior.jl +++ b/src/behavior.jl @@ -1069,7 +1069,7 @@ function secureBrakingBehavior!(CSs::Vector{Dict}, a_braking::Real, approxLevel: CS[:v_exit] = min(CS[:v_limit], followingCSv_entry) - v_entryMax = brakingStartVelocity(CS[:v_exit], a_braking, CS[:length], approxLevel) + v_entryMax = brakingStartVelocity(CS[:v_exit], a_braking, CS[:s_exit]-CS[:s_entry], approxLevel) CS[:v_entry] = min(CS[:v_limit], v_entryMax) CS[:v_peak] = CS[:v_entry] diff --git a/src/constructors.jl b/src/constructors.jl index 7d93711..39001f0 100644 --- a/src/constructors.jl +++ b/src/constructors.jl @@ -642,7 +642,6 @@ function CharacteristicSection(id::Integer, s_entry::Real, section::Dict, v_limi characteristicSection::Dict{Symbol, Any} = Dict(:id => id, # identifier :s_entry => s_entry, # first position (in m) :s_exit => section[:s_end], # last position (in m) - :length => section[:s_end] -s_entry, # total length (in m) :r_path => section[:f_Rp], # path resistance (in ‰) :v_limit => v_limit, # speed limit (in m/s) # initializing :v_entry, :v_peak and :v_exit with :v_limit