|
@@ -20,6 +20,11 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
+type Weather struct {
|
|
|
+ WeatherID []int
|
|
|
+ temperature float64
|
|
|
+ humidity float64
|
|
|
+}
|
|
|
type Point struct {
|
|
|
x, y float64
|
|
|
}
|
|
@@ -40,9 +45,11 @@ var (
|
|
|
//Yowslice = make([]float64, 0)
|
|
|
//AngleSlice = make([][]float64, 0)
|
|
|
// /tpperception
|
|
|
- ObjDicOfTpperception = make(map[uint32][][]float32)
|
|
|
- objTypeDicOfTpperception = make(map[uint32]uint8)
|
|
|
- objSpeedDicOfTpperception = make(map[uint32]float64)
|
|
|
+ Frame float32 = 0.0
|
|
|
+ ObjDicOfTpperception = make(map[uint32][][]float32)
|
|
|
+ objTypeDicOfTpperception = make(map[uint32]uint8)
|
|
|
+ objSpeedDicOfTpperception = make(map[uint32]float64)
|
|
|
+ PreCloseTargetSlice = []uint32{}
|
|
|
// /pji_control_pub
|
|
|
numCountPjiControlCommandOfPjControlPub int
|
|
|
egoSteeringCmdOfPjControlPub []float64
|
|
@@ -648,7 +655,7 @@ func ProduceWindow() {
|
|
|
shareVars.Store("PositionYOfCicvLocation", data.PositionY)
|
|
|
shareVars.Store("Latitude", data.Latitude)
|
|
|
shareVars.Store("Longitude", data.Longitude)
|
|
|
- /*用于 陡坡-DescendingSteepHill/ClimbingSteepHill触发器
|
|
|
+ /*用于 陡坡-DescendingSteepHill/ClimbingSteepHill 侧翻预警-RolloverWarning 触发器
|
|
|
if NumOfCicvLocation%10==0{
|
|
|
AngleSlice[0] = append(AngleSlice[0], data.Qx)
|
|
|
AngleSlice[1] = append(AngleSlice[1], data.Qy)
|
|
@@ -1522,7 +1529,7 @@ func ProduceWindow() {
|
|
|
continue
|
|
|
}
|
|
|
if _, ok := ObjDicOfTpperception[obj.Id]; !ok {
|
|
|
- ObjDicOfTpperception[obj.Id] = [][]float32{{}, {}, {}, {}, {}}
|
|
|
+ ObjDicOfTpperception[obj.Id] = [][]float32{{}, {}, {}, {}, {}, {}}
|
|
|
}
|
|
|
ObjDicOfTpperception[obj.Id][0] = append(ObjDicOfTpperception[obj.Id][0], obj.X)
|
|
|
ObjDicOfTpperception[obj.Id][1] = append(ObjDicOfTpperception[obj.Id][1], obj.Y)
|
|
@@ -1530,6 +1537,7 @@ func ProduceWindow() {
|
|
|
absspeed := math.Sqrt(math.Pow(float64(obj.Vxabs), 2) + math.Pow(float64(obj.Vyabs), 2))
|
|
|
ObjDicOfTpperception[obj.Id][3] = append(ObjDicOfTpperception[obj.Id][3], float32(absspeed))
|
|
|
ObjDicOfTpperception[obj.Id][4] = append(ObjDicOfTpperception[obj.Id][4], obj.Heading)
|
|
|
+ ObjDicOfTpperception[obj.Id][5] = append(ObjDicOfTpperception[obj.Id][5], Frame)
|
|
|
|
|
|
objTypeDicOfTpperception[obj.Id] = obj.Type
|
|
|
objSpeedDicOfTpperception[obj.Id] = math.Pow(math.Pow(float64(obj.Vxabs), 2)+math.Pow(float64(obj.Vyabs), 2), 0.5)
|
|
@@ -1537,6 +1545,7 @@ func ProduceWindow() {
|
|
|
shareVars.Store("ObjDicOfTpperception", ObjDicOfTpperception)
|
|
|
shareVars.Store("ObjTypeDicOfTpperception", objTypeDicOfTpperception)
|
|
|
shareVars.Store("ObjSpeedDicOfTpperception", objSpeedDicOfTpperception)
|
|
|
+ Frame++
|
|
|
},
|
|
|
})
|
|
|
if err == nil {
|