rts-sim-testing-service/third_party/message/dynamics_http.go
2024-01-17 15:53:14 +08:00

75 lines
2.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package message
type InitTrainInfo struct {
TrainIndex uint16 `json:"trainIndex"`
LinkIndex uint16 `json:"linkIndex"`
LinkOffset uint32 `json:"linkOffset"`
//单位0.1km/h
Speed uint16 `json:"speed"`
Up bool `json:"up"`
//TrainLength uint32 `json:"trainLength"`
TrainOperationConfig *TrainOperationConfig `json:"TrainOperationConfig"`
}
// 移除列车请求参数
type RemoveTrainReq struct {
TrainIndex uint16 `json:"trainIndex"`
}
// LineBaseInfo 线路基础信息,提供给动力学作为计算依据
type LineBaseInfo struct {
LinkList []*Link `json:"linkList"`
SlopeList []*Slope `json:"slopeList"`
CurveList []*Curve `json:"curveList"`
}
type Link struct {
ID int32 `json:"id"`
//长度 mm
Len int32 `json:"len"`
ARelTurnoutId int32 `json:"ARelTurnoutId"`
ARelTurnoutPoint string `json:"ARelTurnoutPoint"`
BRelTurnoutId int32 `json:"BRelTurnoutId"`
BRelTurnoutPoint string `json:"BRelTurnoutPoint"`
}
type Slope struct {
ID int32 `json:"id"`
StartLinkId int32 `json:"startLinkId"`
StartLinkOffset int32 `json:"startLinkOffset"`
EndLinkId int32 `json:"endLinkId"`
EndLinkOffset int32 `json:"endLinkOffset"`
//坡度的三角函数(猜是sin)值的*1000
DegreeTrig int32 `json:"degreeTrig"`
}
type Curve struct {
ID int32 `json:"id"`
StartLinkId int32 `json:"startLinkId"`
StartLinkOffset int32 `json:"startLinkOffset"`
EndLinkId int32 `json:"endLinkId"`
EndLinkOffset int32 `json:"endLinkOffset"`
Curvature int32 `json:"curvature"`
}
type TrainOperationConfig struct {
TrainIndex int `json:"trainIndex"`
//Mass int `json:"mass" form:"mass"` //列车的质量100=1ton
Length int `json:"列车的长度cm"`
BaseResistanceParamA float32 `json:"基本阻力参数A"`
BaseResistanceParamB float32 `json:"基本阻力参数B"`
BaseResistanceParamC float32 `json:"基本阻力参数C"`
CurveResistanceParamR1 float32 `json:"曲线阻力参数R1"`
CurveResistanceParamR2 float32 `json:"曲线阻力参数R2"`
CurveResistanceParamR3 float32 `json:"曲线阻力参数R3"`
CurveResistanceParamR4 float32 `json:"曲线阻力参数R4"`
RevolvingMassParam float32 `json:"旋转质量参数"`
Jump bool `json:"是否跳跃"`
Slip float32 `json:"打滑(%"`
Slide int `json:"前溜/后溜mm正数前溜负数后溜"`
StopSign int `json:"过标/欠标mm正数过标负数欠标"`
//WheelDiameter int `json:"轮径mm"`
//RadarSpeed float32 `json:"雷达速度差值m/s"`
//RadarDuration int `json:"雷达速度差值持续时间ms"`
//RadarIsValid bool `json:"雷达是否失效"`
}