diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_map.go b/ats/verify/simulation/wayside/memory/wayside_memory_map.go index 11b95f6..6c8d4b5 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_map.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_map.go @@ -113,7 +113,7 @@ func sectionMapToEcsLink(repo *repository.Repository, id string, offset int64, r abDirection = ak > bk } linkId, _ := strconv.Atoi(section.ALinkPosition().Link().Identity.Id()) - trainKilometer := concertTrainKilometer(section.AKilometer().Value, offset, up) + trainKilometer := concertTrainKilometer(ak, offset, up) if abDirection { return int32(linkId), ao + offset, up, abDirection, trainKilometer } else { @@ -243,7 +243,7 @@ func ecsLinkMapToSection(offset int64, up bool, link *repository.Link) ( var section *repository.PhysicalSection for _, s := range link.PhysicalSections() { ao, bo := s.ALinkPosition().Offset(), s.BLinkPosition().Offset() - if (ao <= offset && offset <= bo) || (bo <= offset && offset <= ao) { + if (ao <= offset && offset < bo) || (bo <= offset && offset < ao) { section = s break }