Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
deda54551d
@ -230,10 +230,10 @@ func decoderDynamicsTrainInfo(buf []byte) *TrainInfo {
|
|||||||
b := buf[12]
|
b := buf[12]
|
||||||
trainInfo.UpSlope = (b & (1 << 7)) != 0
|
trainInfo.UpSlope = (b & (1 << 7)) != 0
|
||||||
trainInfo.Up = (b & (1 << 6)) != 0
|
trainInfo.Up = (b & (1 << 6)) != 0
|
||||||
trainInfo.TotalResistance = binary.BigEndian.Uint32(buf[14:18])
|
trainInfo.TotalResistance = int32(binary.BigEndian.Uint32(buf[14:18]))
|
||||||
trainInfo.AirResistance = binary.BigEndian.Uint32(buf[18:22])
|
trainInfo.AirResistance = int32(binary.BigEndian.Uint32(buf[18:22]))
|
||||||
trainInfo.SlopeResistance = binary.BigEndian.Uint32(buf[22:26])
|
trainInfo.SlopeResistance = int32(binary.BigEndian.Uint32(buf[22:26]))
|
||||||
trainInfo.CurveResistance = binary.BigEndian.Uint32(buf[26:30])
|
trainInfo.CurveResistance = int32(binary.BigEndian.Uint32(buf[26:30]))
|
||||||
trainInfo.Speed = math.Float32frombits(binary.BigEndian.Uint32(buf[30:34]))
|
trainInfo.Speed = math.Float32frombits(binary.BigEndian.Uint32(buf[30:34]))
|
||||||
trainInfo.HeadSpeed1 = math.Float32frombits(binary.BigEndian.Uint32(buf[34:38]))
|
trainInfo.HeadSpeed1 = math.Float32frombits(binary.BigEndian.Uint32(buf[34:38]))
|
||||||
trainInfo.HeadSpeed2 = math.Float32frombits(binary.BigEndian.Uint32(buf[38:42]))
|
trainInfo.HeadSpeed2 = math.Float32frombits(binary.BigEndian.Uint32(buf[38:42]))
|
||||||
|
@ -25,13 +25,13 @@ type TrainInfo struct {
|
|||||||
//列车当前运行方向(偏移量增大/减小方向)
|
//列车当前运行方向(偏移量增大/减小方向)
|
||||||
Up bool
|
Up bool
|
||||||
//实际运行阻力(总)(N)
|
//实际运行阻力(总)(N)
|
||||||
TotalResistance uint32
|
TotalResistance int32
|
||||||
//阻力1(空气阻力)(N)
|
//阻力1(空气阻力)(N)
|
||||||
AirResistance uint32
|
AirResistance int32
|
||||||
//阻力2(坡道阻力)(N)
|
//阻力2(坡道阻力)(N)
|
||||||
SlopeResistance uint32
|
SlopeResistance int32
|
||||||
//阻力3(曲线阻力)(N)
|
//阻力3(曲线阻力)(N)
|
||||||
CurveResistance uint32
|
CurveResistance int32
|
||||||
//列车运行速度(m/s)
|
//列车运行速度(m/s)
|
||||||
Speed float32
|
Speed float32
|
||||||
//头车速传1速度值(m/s)
|
//头车速传1速度值(m/s)
|
||||||
|
Loading…
Reference in New Issue
Block a user