From 706fcca95c97e21348677263dca5fdaf33f34d9a Mon Sep 17 00:00:00 2001 From: liujing Date: Thu, 1 Apr 2021 15:52:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=81=9C=E6=AD=A2=E7=BA=BF?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/entity/V2XWarningEntity.java | 40 ++++++++++--------- .../res/raw/scenario_warning_event_data.json | 23 ++++++++--- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java index 01665c64f1..4510dd5821 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java @@ -1,6 +1,9 @@ package com.mogo.module.common.entity; +import com.mogo.map.MogoLatLng; + import java.io.Serializable; +import java.util.List; /** * @author liujing @@ -28,8 +31,7 @@ public class V2XWarningEntity implements Serializable { //速度 private float speed; //停止线经纬度 - private double stopLineLat; - private double stopLineLon; + private List stopLines; //自车到停止线距离 private double stopLineDistance; //道路唯一标识 @@ -50,8 +52,8 @@ public class V2XWarningEntity implements Serializable { public long systemTime; //定位卫星时间 暂时没用 public long satelliteTime; - //莫顿码 暂时没用 - public long mortonCode; + //预警蒙层等展示时长 + private long showTime; //自组字段 //tts播报 @@ -152,6 +154,15 @@ public class V2XWarningEntity implements Serializable { this.speed = speed; } + + public void setStopLineDistance(double stopLineDistance) { + this.stopLineDistance = stopLineDistance; + } + + public void setWarningContent(String warningContent) { + this.warningContent = warningContent; + } + public int getType() { return type; } @@ -231,10 +242,6 @@ public class V2XWarningEntity implements Serializable { return satelliteTime; } - public long getMortonCode() { - return mortonCode; - } - public String getTts() { if (tts == null) { @@ -243,12 +250,8 @@ public class V2XWarningEntity implements Serializable { return tts; } - public double getStopLineLat() { - return stopLineLat; - } - - public double getStopLineLon() { - return stopLineLon; + public double getStopLineDistance() { + return stopLineDistance; } @Override @@ -257,26 +260,25 @@ public class V2XWarningEntity implements Serializable { "type=" + type + ", lat=" + lat + ", lon=" + lon + + ", targetColor='" + targetColor + '\'' + ", distance=" + distance + ", collisionLat=" + collisionLat + ", collisionLon=" + collisionLon + ", angle=" + angle + ", direction=" + direction + ", speed=" + speed + - ", stopLineLat=" + stopLineLat + - ", stopLineLon=" + stopLineLon + + ", stopLineDistance=" + stopLineDistance + ", roadId='" + roadId + '\'' + ", laneId='" + laneId + '\'' + ", uuid='" + uuid + '\'' + ", color='" + color + '\'' + ", carId='" + carId + '\'' + ", warningContent='" + warningContent + '\'' + - ", tts='" + tts + '\'' + - ", location=" + location + ", heading=" + heading + ", systemTime=" + systemTime + ", satelliteTime=" + satelliteTime + - ", mortonCode=" + mortonCode + + ", tts='" + tts + '\'' + + ", location=" + location + '}'; } } diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data.json index d04415ae80..57fdbc8e8c 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data.json @@ -1,18 +1,29 @@ { - "type":0, - "lat":39.977148, - "lon":116.417478, + "type": 0, + "lat": 39.977148, + "lon": 116.417478, "distance": 2.22, "collisionLat": 39.977094, "collisionLon": 116.417634, + "stopLines":[ + { + "stopLineLat": 39.977082, + "stopLineLon": 116.417553 + }, + { + "stopLineLat": 39.977078, + "stopLineLon": 116.417666 + } + ], "from": 1, "angle": 120, "direction": 10014, - "speed":11.108121, + "speed": 11.108121, "targetColor": "#FF4040", - "stopLineDistance":20, + "stopLineDistance": 20, "stopLineLat": 39.977094, "stopLineLon": 116.417634, "warningContent": "小心行人", - "heading": 30 + "heading": 30, + "showTime": 3000 } \ No newline at end of file