Ver código fonte

Merge remote-tracking branch 'gogs/master'

LingxinMeng 9 meses atrás
pai
commit
7d7b0c5748

+ 2 - 1
trigger/pjisuv/cicv_location/AbnormalStopOnCurve/main/AbnormalStopOnCurve.go

@@ -87,7 +87,8 @@ func Rule(shareVars *sync.Map, data *pjisuv_msgs.PerceptionLocalization) string
 		IsCurve = IfEnter(pointlist1, 30.0, data.Latitude, data.Longitude)
 		IsEndPoint = IfEnter(pointlist2, 5.0, data.Latitude, data.Longitude)
 		if Automode == 1 && IsCurve && !IsEndPoint {
-			if data.VelocityX < 0.5 {
+			AbsSpeed := math.Sqrt(math.Pow(data.VelocityX, 2) + math.Pow(data.VelocityY, 2))
+			if AbsSpeed < 0.5 {
 				// 如果之前没有记录开始时间,记录当前时间
 				if StartTime == 0 {
 					StartTime = time.Now().Unix()

+ 2 - 1
trigger/pjisuv/cicv_location/AbnormalStopOnJunction/main/AbnormalStopOnJunction.go

@@ -93,7 +93,8 @@ func Rule(shareVars *sync.Map, data *pjisuv_msgs.PerceptionLocalization) string
 		IsJunction = IfEnter(PointJunctionList, 25.0, data.Latitude, data.Longitude)
 		IsEndPoint = IfEnter(pointlist2, 5.0, data.Latitude, data.Longitude)
 		if Automode == 1 && IsJunction && !IsEndPoint {
-			if data.VelocityX < 0.5 {
+			AbsSpeed := math.Sqrt(math.Pow(data.VelocityX, 2) + math.Pow(data.VelocityY, 2))
+			if AbsSpeed < 0.5 {
 				// 如果之前没有记录开始时间,记录当前时间
 				if StartTime == 0 {
 					StartTime = time.Now().Unix()

+ 1 - 1
trigger/pjisuv/cicv_location/CurveOverspeed/main/CurveOverspeed.go

@@ -13,7 +13,7 @@ type Point struct {
 }
 
 var (
-	threshold  float64 = 10
+	threshold  float64 = 5
 	IsCurve    bool
 	count1     int64
 	pointcurve = Point{39.73004426154644, 116.49248639463602}

+ 1 - 1
trigger/pjisuv/cicv_location/JunctionOverspeed/main/JunctionOverspeed.go

@@ -13,7 +13,7 @@ type Point struct {
 }
 
 var (
-	threshold float64 = 10
+	threshold float64 = 5
 	IsCurve   bool
 	count1    int64
 	//定义园区T字路口的经纬度坐标值