From a82728e09e18ff5ac69ce4b80c8d613854fbc6fb Mon Sep 17 00:00:00 2001 From: weizhihong Date: Thu, 19 Oct 2023 18:04:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=88=97=E8=BD=A6=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ats/verify/simulation/wayside/memory/wayside_memory_map.go | 2 +- ats/verify/simulation/wayside/memory/wayside_simulation.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_map.go b/ats/verify/simulation/wayside/memory/wayside_memory_map.go index 2dbc756..7fbc930 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_map.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_map.go @@ -291,7 +291,7 @@ func ecsLinkMapToSection(repo *repository.Repository, offset int64, up bool, lin 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 } diff --git a/ats/verify/simulation/wayside/memory/wayside_simulation.go b/ats/verify/simulation/wayside/memory/wayside_simulation.go index c15b065..6a69764 100644 --- a/ats/verify/simulation/wayside/memory/wayside_simulation.go +++ b/ats/verify/simulation/wayside/memory/wayside_simulation.go @@ -2,8 +2,6 @@ package memory import ( "fmt" - "joylink.club/rtsssimulation/component" - "joylink.club/rtsssimulation/entity" "log/slog" "math" "sort" @@ -12,6 +10,9 @@ import ( "sync" "time" + "joylink.club/rtsssimulation/component" + "joylink.club/rtsssimulation/entity" + rtss_simulation "joylink.club/rtsssimulation" "joylink.club/bj-rtsts-server/ats/verify/protos/graphicData" @@ -588,6 +589,7 @@ func convertRelayModel(modelType graphicData.Relay_ModelType) proto.Relay_Model } func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphicStorage, mapId int32) { + repo.MainCoordinateSystem = storage.UniqueIdPrefix.MainCoordinateSystem axleCountingMap := make(map[string]*graphicData.AxleCounting) uidsMap := queryUidStructure[*stationUidStructure](mapId) for _, data := range storage.AxleCountings {