Merge remote-tracking branch 'origin/master'
# Conflicts: # bj-rtss-message # dto/state_proto/device_state.pb.go
This commit is contained in:
commit
09ebf4293f
@ -1 +1 @@
|
||||
Subproject commit 8edda8b7497511eda94720f1eb686a6a7f8531c6
|
||||
Subproject commit 15c8b523c29de1ced3ec98bdfbd615325f1e4e42
|
26
docs/docs.go
26
docs/docs.go
@ -5222,8 +5222,16 @@ const docTemplate = `{
|
||||
"description": "基本阻力参数C",
|
||||
"type": "number"
|
||||
},
|
||||
"idling": {
|
||||
"description": "空转",
|
||||
"idlingA": {
|
||||
"description": "空转加速度(m/s) 默认0",
|
||||
"type": "number"
|
||||
},
|
||||
"idlingD": {
|
||||
"description": "空转持续时间s 默认0",
|
||||
"type": "integer"
|
||||
},
|
||||
"idlingR": {
|
||||
"description": "空转冲击率(m/s) 默认0",
|
||||
"type": "number"
|
||||
},
|
||||
"jump": {
|
||||
@ -5235,11 +5243,19 @@ const docTemplate = `{
|
||||
"type": "number"
|
||||
},
|
||||
"slide": {
|
||||
"description": "前溜/后溜(mm)(正数前溜,负数后溜)",
|
||||
"description": "前溜/后溜(m/s)(正数前溜,负数后溜),默认值:0",
|
||||
"type": "number"
|
||||
},
|
||||
"slipA": {
|
||||
"description": "打滑加速度(m/s) 默认0",
|
||||
"type": "number"
|
||||
},
|
||||
"slipD": {
|
||||
"description": "打滑持续时间ms 默认0",
|
||||
"type": "integer"
|
||||
},
|
||||
"slip": {
|
||||
"description": "打滑(%)",
|
||||
"slipR": {
|
||||
"description": "打滑冲击率(m/s) 默认0",
|
||||
"type": "number"
|
||||
},
|
||||
"stopSign": {
|
||||
|
@ -5216,8 +5216,16 @@
|
||||
"description": "基本阻力参数C",
|
||||
"type": "number"
|
||||
},
|
||||
"idling": {
|
||||
"description": "空转",
|
||||
"idlingA": {
|
||||
"description": "空转加速度(m/s) 默认0",
|
||||
"type": "number"
|
||||
},
|
||||
"idlingD": {
|
||||
"description": "空转持续时间s 默认0",
|
||||
"type": "integer"
|
||||
},
|
||||
"idlingR": {
|
||||
"description": "空转冲击率(m/s) 默认0",
|
||||
"type": "number"
|
||||
},
|
||||
"jump": {
|
||||
@ -5229,11 +5237,19 @@
|
||||
"type": "number"
|
||||
},
|
||||
"slide": {
|
||||
"description": "前溜/后溜(mm)(正数前溜,负数后溜)",
|
||||
"description": "前溜/后溜(m/s)(正数前溜,负数后溜),默认值:0",
|
||||
"type": "number"
|
||||
},
|
||||
"slipA": {
|
||||
"description": "打滑加速度(m/s) 默认0",
|
||||
"type": "number"
|
||||
},
|
||||
"slipD": {
|
||||
"description": "打滑持续时间ms 默认0",
|
||||
"type": "integer"
|
||||
},
|
||||
"slip": {
|
||||
"description": "打滑(%)",
|
||||
"slipR": {
|
||||
"description": "打滑冲击率(m/s) 默认0",
|
||||
"type": "number"
|
||||
},
|
||||
"stopSign": {
|
||||
|
@ -222,8 +222,14 @@ definitions:
|
||||
davisParamC:
|
||||
description: 基本阻力参数C
|
||||
type: number
|
||||
idling:
|
||||
description: 空转
|
||||
idlingA:
|
||||
description: 空转加速度(m/s) 默认0
|
||||
type: number
|
||||
idlingD:
|
||||
description: 空转持续时间s 默认0
|
||||
type: integer
|
||||
idlingR:
|
||||
description: 空转冲击率(m/s) 默认0
|
||||
type: number
|
||||
jump:
|
||||
description: 是否跳跃
|
||||
@ -232,10 +238,16 @@ definitions:
|
||||
description: 旋转质量参数
|
||||
type: number
|
||||
slide:
|
||||
description: 前溜/后溜(mm)(正数前溜,负数后溜)
|
||||
description: 前溜/后溜(m/s)(正数前溜,负数后溜),默认值:0
|
||||
type: number
|
||||
slipA:
|
||||
description: 打滑加速度(m/s) 默认0
|
||||
type: number
|
||||
slipD:
|
||||
description: 打滑持续时间ms 默认0
|
||||
type: integer
|
||||
slip:
|
||||
description: 打滑(%)
|
||||
slipR:
|
||||
description: 打滑冲击率(m/s) 默认0
|
||||
type: number
|
||||
stopSign:
|
||||
description: 过标/欠标(mm)(正数过标,负数欠标)
|
||||
|
@ -48,13 +48,22 @@ type TrainDynamicConfig struct {
|
||||
RevolvingMassParam float32 `protobuf:"fixed32,8,opt,name=revolvingMassParam,proto3" json:"revolvingMassParam,omitempty"`
|
||||
// 是否跳跃
|
||||
Jump bool `protobuf:"varint,9,opt,name=jump,proto3" json:"jump,omitempty"`
|
||||
// 打滑(%)
|
||||
Slip float32 `protobuf:"fixed32,10,opt,name=slip,proto3" json:"slip,omitempty"`
|
||||
// 前溜/后溜(m/s)(正数前溜,负数后溜)
|
||||
Slide int32 `protobuf:"varint,11,opt,name=slide,proto3" json:"slide,omitempty"`
|
||||
// 打滑加速度(m/s) 默认0
|
||||
SlipA float32 `protobuf:"fixed32,10,opt,name=slipA,proto3" json:"slipA,omitempty"`
|
||||
// 打滑冲击率(m/s) 默认0
|
||||
SlipR float32 `protobuf:"fixed32,11,opt,name=slipR,proto3" json:"slipR,omitempty"`
|
||||
// 打滑持续时间ms 默认0
|
||||
SlipD int32 `protobuf:"varint,12,opt,name=slipD,proto3" json:"slipD,omitempty"`
|
||||
// 空转加速度(m/s2),默认值:0
|
||||
IdlingA float32 `protobuf:"fixed32,14,opt,name=idlingA,proto3" json:"idlingA,omitempty"`
|
||||
// 空转冲击率(m/s3),默认值:0
|
||||
IdlingR float32 `protobuf:"fixed32,15,opt,name=idlingR,proto3" json:"idlingR,omitempty"`
|
||||
// 空转持续时间(ms),默认值:0
|
||||
IdlingD int32 `protobuf:"varint,16,opt,name=idlingD,proto3" json:"idlingD,omitempty"`
|
||||
// 过标/欠标(mm)(正数过标,负数欠标)
|
||||
StopSign int32 `protobuf:"varint,12,opt,name=stopSign,proto3" json:"stopSign,omitempty"`
|
||||
Idling float32 `protobuf:"fixed32,13,opt,name=idling,proto3" json:"idling,omitempty"` //空转
|
||||
StopSign int32 `protobuf:"varint,17,opt,name=stopSign,proto3" json:"stopSign,omitempty"`
|
||||
// 前溜/后溜(m/s)默认0
|
||||
Slide float32 `protobuf:"fixed32,18,opt,name=slide,proto3" json:"slide,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) Reset() {
|
||||
@ -152,16 +161,44 @@ func (x *TrainDynamicConfig) GetJump() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetSlip() float32 {
|
||||
func (x *TrainDynamicConfig) GetSlipA() float32 {
|
||||
if x != nil {
|
||||
return x.Slip
|
||||
return x.SlipA
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetSlide() int32 {
|
||||
func (x *TrainDynamicConfig) GetSlipR() float32 {
|
||||
if x != nil {
|
||||
return x.Slide
|
||||
return x.SlipR
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetSlipD() int32 {
|
||||
if x != nil {
|
||||
return x.SlipD
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetIdlingA() float32 {
|
||||
if x != nil {
|
||||
return x.IdlingA
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetIdlingR() float32 {
|
||||
if x != nil {
|
||||
return x.IdlingR
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetIdlingD() int32 {
|
||||
if x != nil {
|
||||
return x.IdlingD
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -173,9 +210,9 @@ func (x *TrainDynamicConfig) GetStopSign() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetIdling() float32 {
|
||||
func (x *TrainDynamicConfig) GetSlide() float32 {
|
||||
if x != nil {
|
||||
return x.Idling
|
||||
return x.Slide
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -295,7 +332,7 @@ var File_common_data_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_data_proto_rawDesc = []byte{
|
||||
0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xfc, 0x03, 0x0a, 0x12,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xe0, 0x04, 0x0a, 0x12,
|
||||
0x54, 0x72, 0x61, 0x69, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x61, 0x76, 0x69, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x64, 0x61, 0x76, 0x69, 0x73, 0x50, 0x61,
|
||||
@ -321,39 +358,45 @@ var file_common_data_proto_rawDesc = []byte{
|
||||
0x6c, 0x76, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x02, 0x52, 0x12, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x76, 0x69, 0x6e, 0x67, 0x4d,
|
||||
0x61, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x75, 0x6d, 0x70,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6a, 0x75, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x73, 0x6c, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x04, 0x73, 0x6c, 0x69, 0x70,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x53, 0x69,
|
||||
0x67, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x53, 0x69,
|
||||
0x67, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01,
|
||||
0x28, 0x02, 0x52, 0x06, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0xdc, 0x02, 0x0a, 0x0e, 0x54,
|
||||
0x72, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x64, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a,
|
||||
0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64,
|
||||
0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x12, 0x2e, 0x0a,
|
||||
0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64,
|
||||
0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x72, 0x61, 0x64, 0x61, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0b, 0x72, 0x61, 0x64, 0x61, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12,
|
||||
0x30, 0x0a, 0x13, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65,
|
||||
0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x72, 0x61,
|
||||
0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66,
|
||||
0x66, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x61, 0x64, 0x61, 0x72,
|
||||
0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x63,
|
||||
0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x43, 0x68,
|
||||
0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x02, 0x52, 0x11, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65,
|
||||
0x64, 0x44, 0x69, 0x66, 0x66, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x63,
|
||||
0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x6a, 0x6f, 0x79,
|
||||
0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, 0x75, 0x62, 0x2f, 0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73,
|
||||
0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6a, 0x75, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x73, 0x6c, 0x69, 0x70, 0x41, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x6c, 0x69,
|
||||
0x70, 0x41, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x52, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
||||
0x02, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x52, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x70,
|
||||
0x44, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x70, 0x44, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x02, 0x52,
|
||||
0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x64, 0x6c, 0x69,
|
||||
0x6e, 0x67, 0x52, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x18, 0x10, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x07, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x73, 0x74, 0x6f, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
|
||||
0x73, 0x74, 0x6f, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x64,
|
||||
0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x22, 0xdc,
|
||||
0x02, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x64, 0x73, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73,
|
||||
0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x41, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73,
|
||||
0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x42, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x61, 0x64, 0x61, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x61, 0x64, 0x61, 0x72, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02,
|
||||
0x52, 0x13, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65,
|
||||
0x64, 0x44, 0x69, 0x66, 0x66, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68,
|
||||
0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72,
|
||||
0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x61, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x09, 0x61, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x61,
|
||||
0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63,
|
||||
0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x2f, 0x5a,
|
||||
0x2d, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, 0x75, 0x62, 0x2f, 0x62, 0x6a,
|
||||
0x2d, 0x72, 0x74, 0x73, 0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x64, 0x74,
|
||||
0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -113,10 +113,15 @@ type ConfigTrainData struct {
|
||||
CurveResistanceParamR4 float32 `json:"curveResistanceParamR4"` // 曲线阻力参数R4
|
||||
RevolvingMassParam float32 `json:"revolvingMassParam"` // 旋转质量参数
|
||||
Jump bool `json:"jump"` // 是否跳跃
|
||||
Slip float32 `json:"slip"` // 打滑(%)
|
||||
Slide int32 `json:"slide"` // 前溜/后溜(mm)(正数前溜,负数后溜)
|
||||
StopSign int32 `json:"stopSign"` // 过标/欠标(mm)(正数过标,负数欠标)
|
||||
Idling float32 `json:"idling"` // 空转
|
||||
SlipA float32 `json:"slipA"` // 打滑加速度(m/s) 默认0
|
||||
SlipR float32 `json:"slipR"` // 打滑冲击率(m/s) 默认0
|
||||
SlipD int32 `json:"slipD"` // 打滑持续时间ms 默认0
|
||||
|
||||
Slide float32 `json:"slide"` // 前溜/后溜(m/s)(正数前溜,负数后溜),默认值:0
|
||||
StopSign int32 `json:"stopSign"` // 过标/欠标(mm)(正数过标,负数欠标)
|
||||
IdlingA float32 `json:"idlingA"` // 空转加速度(m/s) 默认0
|
||||
IdlingR float32 `json:"idlingR"` // 空转冲击率(m/s) 默认0
|
||||
IdlingD int32 `json:"idlingD"` // 空转持续时间s 默认0
|
||||
//TrainEndsA ConfigTrainEnds `json:"TrainEndsA"` // 车辆A端
|
||||
//TrainEndsB ConfigTrainEnds `json:"TrainEndsB"` // 车辆B端
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ func TrainConfigToDtoConvert(dc *common_proto.TrainDynamicConfig) *ConfigTrainDa
|
||||
DavisParamA: dc.DavisParamA, DavisParamB: dc.DavisParamB, DavisParamC: dc.DavisParamC,
|
||||
CurveResistanceParamR1: dc.CurveResistanceParamR1, CurveResistanceParamR2: dc.CurveResistanceParamR2, CurveResistanceParamR3: dc.CurveResistanceParamR3,
|
||||
CurveResistanceParamR4: dc.CurveResistanceParamR4, RevolvingMassParam: dc.RevolvingMassParam,
|
||||
Jump: dc.Jump, Slip: dc.Slip, Slide: dc.Slide, Idling: dc.Idling, StopSign: dc.StopSign,
|
||||
Jump: dc.Jump, SlipA: dc.SlipA, SlipR: dc.SlipR, SlipD: dc.SlipD, Slide: dc.Slide, IdlingA: dc.IdlingA, IdlingR: dc.IdlingR, IdlingD: dc.IdlingD, StopSign: dc.StopSign,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
@ -71,7 +71,7 @@ func TrainConfigToProtoConvert(t *dto.ConfigTrainData) *common_proto.TrainDynami
|
||||
return &common_proto.TrainDynamicConfig{
|
||||
DavisParamA: t.DavisParamA, DavisParamB: t.DavisParamB, DavisParamC: t.DavisParamC,
|
||||
CurveResistanceParamR1: t.CurveResistanceParamR1, CurveResistanceParamR2: t.CurveResistanceParamR2, CurveResistanceParamR3: t.CurveResistanceParamR3, CurveResistanceParamR4: t.CurveResistanceParamR4,
|
||||
RevolvingMassParam: t.RevolvingMassParam, Jump: t.Jump, Slip: t.Slip, Idling: t.Idling,
|
||||
RevolvingMassParam: t.RevolvingMassParam, Jump: t.Jump, SlipA: t.SlipA, SlipR: t.SlipR, SlipD: t.SlipD, IdlingA: t.IdlingA, IdlingR: t.IdlingR, IdlingD: t.IdlingD,
|
||||
Slide: t.Slide, StopSign: t.StopSign,
|
||||
}
|
||||
}
|
||||
|
4
third_party/acc/acc_server_test.go
vendored
4
third_party/acc/acc_server_test.go
vendored
@ -10,7 +10,7 @@ import (
|
||||
|
||||
func TestAccUdp(t *testing.T) {
|
||||
|
||||
fmt.Println("准备启动服务...")
|
||||
fmt.Println("准备启动ACC服务...")
|
||||
addr := fmt.Sprintf("%v:%v", "127.0.0.1", "8899")
|
||||
server := udp.NewServer(addr, handle)
|
||||
server.Listen()
|
||||
@ -19,7 +19,7 @@ func TestAccUdp(t *testing.T) {
|
||||
}
|
||||
|
||||
func handle(d []byte) {
|
||||
ri := message.RadarInfo{}
|
||||
ri := message.Accelerometer{}
|
||||
err := ri.Decode(d)
|
||||
if err == nil {
|
||||
|
||||
|
1
third_party/acc/acc_vobc.go
vendored
1
third_party/acc/acc_vobc.go
vendored
@ -69,7 +69,6 @@ func (acc *accVobcService) sendTask(ctx context.Context) {
|
||||
if trainStatus != nil {
|
||||
speedAcc := trainStatus.DynamicState.Acceleration
|
||||
t := speedAcc / accSpeedUnit
|
||||
|
||||
acc.vobcClient.SendMsg(&message.Accelerometer{Acc: math.Float32bits(t)})
|
||||
}
|
||||
time.Sleep(time.Millisecond * accInterval)
|
||||
|
1
third_party/message/accelerometer.go
vendored
1
third_party/message/accelerometer.go
vendored
@ -19,6 +19,7 @@ func (acc *Accelerometer) Encode() []byte {
|
||||
data := make([]byte, 0)
|
||||
data = append(data, accHeader)
|
||||
data = append(data, uaidDefault)
|
||||
acc.Acc = acc.Acc | 0x0000FF
|
||||
data = binary.LittleEndian.AppendUint32(data, acc.Acc)
|
||||
cs := checkSum(data)
|
||||
data = append(data, ^cs+1)
|
||||
|
10
third_party/message/dynamics_http.go
vendored
10
third_party/message/dynamics_http.go
vendored
@ -64,9 +64,13 @@ type TrainOperationConfig struct {
|
||||
CurveResistanceParamR4 float32 `json:"curveResistanceParamR4"` // 曲线阻力参数R4
|
||||
RevolvingMassParam float32 `json:"revolvingMassParam"` // 旋转质量参数
|
||||
Jump bool `json:"jump"` // 是否跳跃
|
||||
Slip float32 `json:"slip"` // 打滑(%)
|
||||
Idling float32 `json:"idling"` // 空转(%),默认值:0
|
||||
Slide int `json:"slide"` // 前溜/后溜(mm)(正数前溜,负数后溜)
|
||||
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
|
||||
StopSign int `json:"stopSign"` // 过标/欠标(mm)(正数过标,负数欠标)
|
||||
//WheelDiameter int `json:"轮径(mm)"`
|
||||
//RadarSpeed float32 `json:"雷达速度差值(m/s)"`
|
||||
|
@ -27,7 +27,9 @@ func CreateMsgTrainConfig(trainId int, trainLen int64, configTrainData dto.Confi
|
||||
DavisParamC: configTrainData.DavisParamC, CurveResistanceParamR1: configTrainData.CurveResistanceParamR1,
|
||||
CurveResistanceParamR2: configTrainData.CurveResistanceParamR2, CurveResistanceParamR3: configTrainData.CurveResistanceParamR3,
|
||||
CurveResistanceParamR4: configTrainData.CurveResistanceParamR4, RevolvingMassParam: configTrainData.RevolvingMassParam,
|
||||
Jump: configTrainData.Jump, Slip: configTrainData.Slip, Slide: int(configTrainData.Slide), Idling: configTrainData.Idling,
|
||||
Jump: configTrainData.Jump, Slide: configTrainData.Slide,
|
||||
SlipA: configTrainData.SlipA, SlipR: configTrainData.SlipR, SlipD: int(configTrainData.SlipD),
|
||||
IdlingA: configTrainData.IdlingA, IdlingR: configTrainData.IdlingR, IdlingD: int(configTrainData.IdlingD),
|
||||
StopSign: int(configTrainData.StopSign)}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user