|
@@ -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()
|