2023-10-19 09:33:40 +08:00
|
|
|
|
package message
|
2023-07-26 17:02:53 +08:00
|
|
|
|
|
|
|
|
|
type InitTrainInfo struct {
|
2023-07-27 18:18:43 +08:00
|
|
|
|
TrainIndex uint16 `json:"trainIndex"`
|
|
|
|
|
LinkIndex uint16 `json:"linkIndex"`
|
2023-08-09 15:34:19 +08:00
|
|
|
|
LinkOffset uint32 `json:"linkOffset"`
|
2024-02-26 10:48:45 +08:00
|
|
|
|
//单位m/s
|
|
|
|
|
Speed float32 `json:"speed"`
|
|
|
|
|
Up bool `json:"up"`
|
2024-01-17 15:53:14 +08:00
|
|
|
|
//TrainLength uint32 `json:"trainLength"`
|
2024-01-18 17:17:48 +08:00
|
|
|
|
TrainOperationConfig *TrainOperationConfig `json:"config"`
|
2023-07-26 17:02:53 +08:00
|
|
|
|
}
|
2023-08-07 14:08:02 +08:00
|
|
|
|
|
2023-10-19 09:33:40 +08:00
|
|
|
|
// 移除列车请求参数
|
|
|
|
|
type RemoveTrainReq struct {
|
|
|
|
|
TrainIndex uint16 `json:"trainIndex"`
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-07 14:08:02 +08:00
|
|
|
|
// LineBaseInfo 线路基础信息,提供给动力学作为计算依据
|
|
|
|
|
type LineBaseInfo struct {
|
2024-09-29 09:33:00 +08:00
|
|
|
|
LinkList []*Link `json:"linkList"`
|
|
|
|
|
SlopeList []*Slope `json:"slopeList"`
|
|
|
|
|
CurveList []*Curve `json:"curveList"`
|
|
|
|
|
StopPosition []*StopPosition `json:"stopPositionList"`
|
|
|
|
|
}
|
|
|
|
|
type StopPosition struct {
|
|
|
|
|
Id int32 `json:"id"`
|
|
|
|
|
LinkId int32 `json:"linkId"`
|
|
|
|
|
LinkOffset int32 `json:"linkOffset"`
|
2023-08-07 14:08:02 +08:00
|
|
|
|
}
|
|
|
|
|
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"`
|
|
|
|
|
}
|
2024-01-16 17:53:54 +08:00
|
|
|
|
type TrainOperationConfig struct {
|
2024-01-17 15:53:14 +08:00
|
|
|
|
TrainIndex int `json:"trainIndex"`
|
|
|
|
|
//Mass int `json:"mass" form:"mass"` //列车的质量(100=1ton)
|
2024-01-18 17:17:48 +08:00
|
|
|
|
Length int `json:"length"` // 列车的长度(cm)
|
|
|
|
|
DavisParamA float32 `json:"davisParamA"` // 基本阻力参数A
|
|
|
|
|
DavisParamB float32 `json:"davisParamB"` // 基本阻力参数B
|
|
|
|
|
DavisParamC float32 `json:"davisParamC"` // 基本阻力参数C
|
|
|
|
|
CurveResistanceParamR1 float32 `json:"curveResistanceParamR1"` // 曲线阻力参数R1
|
|
|
|
|
CurveResistanceParamR2 float32 `json:"curveResistanceParamR2"` // 曲线阻力参数R2
|
|
|
|
|
CurveResistanceParamR3 float32 `json:"curveResistanceParamR3"` // 曲线阻力参数R3
|
|
|
|
|
CurveResistanceParamR4 float32 `json:"curveResistanceParamR4"` // 曲线阻力参数R4
|
|
|
|
|
RevolvingMassParam float32 `json:"revolvingMassParam"` // 旋转质量参数
|
|
|
|
|
Jump bool `json:"jump"` // 是否跳跃
|
2024-01-29 14:22:12 +08:00
|
|
|
|
SlipA float32 `json:"slipA"` // 打滑加速度(m/s) 默认0
|
|
|
|
|
SlipR float32 `json:"slipR"` // 打滑冲击率(m/s) 默认0
|
|
|
|
|
SlipD int `json:"slipD"` // 打滑持续时间ms 默认0
|
|
|
|
|
IdlingA float32 `json:"idlingA"` // 空转加速度(m/s) 默认0
|
|
|
|
|
IdlingR float32 `json:"idlingR"` // 空转冲击率(m/s) 默认0
|
|
|
|
|
IdlingD int `json:"idlingD"` // 空转持续时间ms 默认0
|
|
|
|
|
Slide float32 `json:"slide"` // FLOAT,前溜/后溜(m/s)(正数前溜,负数后溜),默认值:0
|
2024-01-18 17:17:48 +08:00
|
|
|
|
StopSign int `json:"stopSign"` // 过标/欠标(mm)(正数过标,负数欠标)
|
2024-01-17 15:53:14 +08:00
|
|
|
|
//WheelDiameter int `json:"轮径(mm)"`
|
2024-01-16 17:53:54 +08:00
|
|
|
|
//RadarSpeed float32 `json:"雷达速度差值(m/s)"`
|
|
|
|
|
//RadarDuration int `json:"雷达速度差值持续时间(ms)"`
|
|
|
|
|
//RadarIsValid bool `json:"雷达是否失效"`
|
|
|
|
|
}
|