【动力学火车接口增加列车长度】
This commit is contained in:
parent
6bd4013bfc
commit
af28993e24
|
@ -37,6 +37,7 @@ func AddTrainState(simulation *VerifySimulation, status *state.TrainState) {
|
|||
LinkOffset: uint32(loffset),
|
||||
Speed: uint16(math.Round(float64(status.Speed * 10))),
|
||||
Up: status.Up,
|
||||
TrainLength: uint16(status.TrainLength),
|
||||
})
|
||||
zap.S().Debugf("添加列车:[%d-%s-%d]", trainIndex, status.HeadLinkId, status.HeadLinkOffset)
|
||||
zap.S().Debugf("列车初始化:[%d-%d-%d]", trainIndex, linkId, loffset)
|
||||
|
|
|
@ -7,6 +7,7 @@ type InitTrainInfo struct {
|
|||
//单位0.1km/h
|
||||
Speed uint16 `json:"speed"`
|
||||
Up bool `json:"up"`
|
||||
TrainLength uint16 `json:"trainLength"`
|
||||
}
|
||||
|
||||
// LineBaseInfo 线路基础信息,提供给动力学作为计算依据
|
||||
|
|
Loading…
Reference in New Issue