【列车位置处理逻辑】
This commit is contained in:
parent
035daffb3b
commit
a82728e09e
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user