From f17f9d7d8785cb282324187e7cba2626270e2c88 Mon Sep 17 00:00:00 2001 From: liujing Date: Thu, 29 Apr 2021 17:30:00 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/MoGoPersonWarnPolylineManager.java | 2 +- .../impl/MoGoV2XCloundDataManager.java | 4 +++- .../manager/impl/MoGoV2XPolylineManager.java | 2 +- .../raw/scenario_warning_event_data_left.json | 6 +++--- ...enario_warning_event_data_pedestrians.json | 19 ++++++++++--------- .../scenario_warning_event_data_right.json | 10 +++++----- 6 files changed, 23 insertions(+), 20 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoPersonWarnPolylineManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoPersonWarnPolylineManager.java index db40465730..f9e9f64052 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoPersonWarnPolylineManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoPersonWarnPolylineManager.java @@ -37,7 +37,7 @@ public class MoGoPersonWarnPolylineManager implements IMoGoPersonWarnPolylineMan } // 连接线参数 - MogoPolylineOptions options = new MogoPolylineOptions(); + MogoPolylineOptions options = new MogoPolylineOptions().setGps(true); // 渐变色 List colors = new ArrayList<>(); diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java index 8f81da179a..ed43f6c5fa 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java @@ -89,7 +89,8 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog V2XServiceManager.getMarkerManager().removeMarkers(WARNING_ARROWS); if (cloundWarningInfo.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP) { //前方 TODO middleLocationInStopLine = getMiddleLocationInStopLine(); - MogoLatLng warningLocation = new MogoLatLng(cloundWarningInfo.getLat(),cloundWarningInfo.getLon()); + //如果是正前方类型,红色绘制区域从停止线向前绘制50米 + MogoLatLng warningLocation = Trigonometric.getNewLocation(middleLocationInStopLine, 50, cloundWarningInfo.getAngle()); //停止线前方画线 WorkThreadHandler.getInstance().postDelayed(() -> { //二轮车和行人的渲染和移动 @@ -150,6 +151,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog isFirstLocation = true; } //绘制线的终点(在停止线上或者预碰撞点上) + endLatlng = new MogoLatLng(mCloundWarningInfo.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP ? middleLocationInStopLine.lat : mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP ? middleLocationInStopLine.lon : mCloundWarningInfo.getCollisionLon()); //自车位置 diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XPolylineManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XPolylineManager.java index 825fba719d..179a16c80f 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XPolylineManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XPolylineManager.java @@ -39,7 +39,7 @@ public class MoGoV2XPolylineManager implements IMoGoV2XPolylineManager { && !V2XServiceManager.getMoGoStatusManager().isVrMode() ) { // 连接线参数 - MogoPolylineOptions options = new MogoPolylineOptions(); + MogoPolylineOptions options = new MogoPolylineOptions().setGps(true); // 渐变色 List colors = new ArrayList<>(); diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json index 2b9d20fc69..19b04f09a7 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json @@ -1,7 +1,7 @@ { "type": 1, - "lat": 26.8826301, - "lon": 112.5634948, + "lat": 26.8824956, + "lon": 112.5634341, "distance": 2, "collisionLat": 26.88271105, "collisionLon": 112.5636347, @@ -16,7 +16,7 @@ } ], "from": 1, - "angle": 0, + "angle": 220, "direction": 10014, "speed": 11.108121, "targetColor": "#FF4040", diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_pedestrians.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_pedestrians.json index f0a4dc8eff..377bf54d61 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_pedestrians.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_pedestrians.json @@ -1,22 +1,23 @@ { "type": 0, - "lat": 26.91837250865101, - "lon": 112.5631081, + "lat": 26.8826624, + "lon": 112.5635601, "distance": 2, - "collisionLat": 26.91837250865101, - "collisionLon": 112.5631081, + "collisionLat": 26.8826262, + "collisionLon": 112.5635926, "stopLines": [ { - "lat": 26.91837250865101, - "lon": 112.5631081 + "lat": 26.8826624, + "lon": 112.5635601 + }, { - "lat": 26.91840847737797, - "lon": 112.5631081 + "lat": 26.8826262, + "lon": 112.5635926 } ], "from": 1, - "angle": 264, + "angle": 240, "direction": 10013, "speed": 11.108121, "targetColor": "#FF4040", diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_right.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_right.json index 15712b6e59..817e55ad07 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_right.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_right.json @@ -1,10 +1,10 @@ { "type": 2, - "lat": 26.88241239, - "lon": 112.5631241, + "lat": 26.8825972, + "lon": 112.5634219, "distance": 2, - "collisionLat": 26.88241239, - "collisionLon": 112.5631241, + "collisionLat": 26.8826135, + "collisionLon": 112.5635520, "stopLines": [ { "lat": 26.88241239, @@ -16,7 +16,7 @@ } ], "from": 1, - "angle": 0, + "angle": 260, "direction": 10015, "speed": 11.108121, "targetColor": "#FF4040", From 097a872f31092ee6a522e331c126f423b5b99082 Mon Sep 17 00:00:00 2001 From: liujing Date: Thu, 29 Apr 2021 18:42:20 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E6=95=B0=E6=8D=AE+gps?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/impl/custom/utils/ObjectUtils.java | 1 + .../impl/MoGoV2XCloundDataManager.java | 128 +++++++++--------- .../raw/scenario_warning_event_data_left.json | 4 +- .../scenario_warning_event_data_right.json | 4 +- 4 files changed, 69 insertions(+), 68 deletions(-) diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/ObjectUtils.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/ObjectUtils.java index b666458f78..c5655e7cc7 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/ObjectUtils.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/utils/ObjectUtils.java @@ -735,6 +735,7 @@ public class ObjectUtils { } target.setLineWidth( options.getWidth() ); target.setColor( options.getColor() ); + target.setGps(options.gps()); // target.zIndex( options.getWidth() ); // target.visible( options.isVisible() ); //// target.geodesic( options.isGeodesic() ); diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java index ed43f6c5fa..f3921c9ee1 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java @@ -58,7 +58,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog private MogoLatLng middleLocationInStopLine; private V2XFrontWarningScenario mV2XScenario; - private static long showTime = 0; + private static long showTime = 4000; private float bearing; @@ -70,70 +70,69 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog @Override public void analysisV2XCloundDataEvent(V2XWarningEntity cloundWarningInfo) { -// if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { - mCloundWarningInfo = cloundWarningInfo; - showTime = mCloundWarningInfo.getShowTime(); - pointsBetween(); - bearing = V2XLocationListener.getInstance().getLastCarLocation().getBearing(); + if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { + mCloundWarningInfo = cloundWarningInfo; + showTime = mCloundWarningInfo.getShowTime(); + pointsBetween(); + bearing = V2XLocationListener.getInstance().getLastCarLocation().getBearing(); - //顶部弹框 - if (mV2XScenario == null) { - mV2XScenario = new V2XFrontWarningScenario(); - } - mV2XScenario.setWarningEntity(cloundWarningInfo); - mV2XScenario.init(null); - //预警蒙层 - MarkerServiceHandler.getApis().getV2XListenerManager().warningChangedForListenerWithDirection(cloundWarningInfo.getDirection(), MogoReceiver.ACTION_V2X_FRONT_WARNING); - isSelfLineClear = false; - isFirstLocation = false; - V2XServiceManager.getMarkerManager().removeMarkers(WARNING_ARROWS); - if (cloundWarningInfo.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP) { //前方 TODO - middleLocationInStopLine = getMiddleLocationInStopLine(); - //如果是正前方类型,红色绘制区域从停止线向前绘制50米 - MogoLatLng warningLocation = Trigonometric.getNewLocation(middleLocationInStopLine, 50, cloundWarningInfo.getAngle()); - //停止线前方画线 - WorkThreadHandler.getInstance().postDelayed(() -> { - //二轮车和行人的渲染和移动 - V2XServiceManager.getMarkerManager().removeMarkers(TYPE_MARKER_CLOUD_WARN_DATA); - V2XWarnDataDrawer.getInstance().renderWarnData(cloundWarningInfo); - //绘制识别物与交汇点连线,并且更新连线数据 - drawRedWarningLineFrontOfStopLine(cloundWarningInfo, middleLocationInStopLine, warningLocation); - //添加停止线marker - handleStopLine(); - //自车画线 - drawSelfCarLine(carLocation.lon, carLocation.lat, bearing); - }, 500); + //顶部弹框 + if (mV2XScenario == null) { + mV2XScenario = new V2XFrontWarningScenario(); + } + mV2XScenario.setWarningEntity(cloundWarningInfo); + mV2XScenario.init(null); + //预警蒙层 + MarkerServiceHandler.getApis().getV2XListenerManager().warningChangedForListenerWithDirection(cloundWarningInfo.getDirection(), MogoReceiver.ACTION_V2X_FRONT_WARNING); + isSelfLineClear = false; + isFirstLocation = false; + V2XServiceManager.getMarkerManager().removeMarkers(WARNING_ARROWS); + if (cloundWarningInfo.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP) { //前方 TODO + middleLocationInStopLine = getMiddleLocationInStopLine(); + //如果是正前方类型,红色绘制区域从停止线向前绘制50米 + MogoLatLng warningLocation = Trigonometric.getNewLocation(middleLocationInStopLine, 50, cloundWarningInfo.getAngle()); + //停止线前方画线 + WorkThreadHandler.getInstance().postDelayed(() -> { + //二轮车和行人的渲染和移动 + V2XServiceManager.getMarkerManager().removeMarkers(TYPE_MARKER_CLOUD_WARN_DATA); + V2XWarnDataDrawer.getInstance().renderWarnData(cloundWarningInfo); + //绘制识别物与交汇点连线,并且更新连线数据 + drawRedWarningLineFrontOfStopLine(cloundWarningInfo, middleLocationInStopLine, warningLocation); + //添加停止线marker + handleStopLine(); + //自车画线 + drawSelfCarLine(carLocation.lon, carLocation.lat, bearing); + }, 500); - UiThreadHandler.postDelayed(() -> { - V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); - V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); - V2XServiceManager.getMoGoStopPolylineManager().clearLine(); - isSelfLineClear = true; - }, showTime); + UiThreadHandler.postDelayed(() -> { + V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); + V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); + V2XServiceManager.getMoGoStopPolylineManager().clearLine(); + isSelfLineClear = true; + }, showTime); - } else { //左侧或者右侧 - WorkThreadHandler.getInstance().postDelayed(() -> { - //绘制识别物与交汇点连线,并且更新连线数据 - drawOtherObjectLine(cloundWarningInfo); - //二轮车和行人的渲染和移动 - V2XServiceManager.getMarkerManager().removeMarkers(TYPE_MARKER_CLOUD_WARN_DATA); - V2XWarnDataDrawer.getInstance().renderWarnData(cloundWarningInfo); + } else { //左侧或者右侧 + WorkThreadHandler.getInstance().postDelayed(() -> { + //绘制识别物与交汇点连线,并且更新连线数据 + drawOtherObjectLine(cloundWarningInfo); + //二轮车和行人的渲染和移动 + V2XServiceManager.getMarkerManager().removeMarkers(TYPE_MARKER_CLOUD_WARN_DATA); + V2XWarnDataDrawer.getInstance().renderWarnData(cloundWarningInfo); - //车辆静止的时候 - drawSelfCarLine(carLocation.lon, carLocation.lat, bearing); + //车辆静止的时候 + drawSelfCarLine(carLocation.lon, carLocation.lat, bearing); - }, 500); + }, 500); - //延迟3秒清理线 - UiThreadHandler.postDelayed(() -> { - V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); - V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); - isSelfLineClear = true; - }, showTime); + //延迟3秒清理线 + UiThreadHandler.postDelayed(() -> { + V2XServiceManager.getMoGoPersonWarnPolylineManager().clearLine(); + V2XServiceManager.getMoGoWarnPolylineManager().clearLine(); + isSelfLineClear = true; + }, showTime); + } } } -// } - /** * 自车为起点绘制(根据设计,前方行人/弱势交通参与者预警 getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP自车与停止线之间为蓝色预警;其他侧方预警自车与预碰撞点之间显示红色预警) @@ -208,7 +207,8 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog /** * 场景如:车辆行驶正前方绘制红色区域(停止线继续前行的预警区域) TODO 需要实时给行人当前位置 */ - private void drawRedWarningLineFrontOfStopLine(V2XWarningEntity info, MogoLatLng startLatLng, MogoLatLng mogoLatLng) { + private void drawRedWarningLineFrontOfStopLine(V2XWarningEntity info, MogoLatLng + startLatLng, MogoLatLng mogoLatLng) { if (info != null) { IMogoPolyline polyLine = V2XServiceManager.getMoGoStopPolylineManager().getMogoStopPolyline(); MogoLatLng endLatlng = new MogoLatLng(mogoLatLng.lat, mogoLatLng.lon); @@ -310,13 +310,13 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog @Override public void onCarLocationChanged2(Location latLng) { // Log.d(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 lat = " + latLng.getLatitude() + "--lon =" + latLng.getLongitude() + "---isSelfLineClear = " + isSelfLineClear); -// if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { - //当行人经纬度交点 开始画线,否则清理 - if (mCloundWarningInfo != null) { - mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude())); + if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { + //当行人经纬度交点 开始画线,否则清理 + if (mCloundWarningInfo != null) { + mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude())); + } + drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing()); } - drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing()); -// } carLocation = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude()); } diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json index 19b04f09a7..891e86c408 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_left.json @@ -1,7 +1,7 @@ { "type": 1, - "lat": 26.8824956, - "lon": 112.5634341, + "lat": 26.8825429, + "lon": 112.5634378, "distance": 2, "collisionLat": 26.88271105, "collisionLon": 112.5636347, diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_right.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_right.json index 817e55ad07..b4f8a70913 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_right.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_warning_event_data_right.json @@ -1,7 +1,7 @@ { "type": 2, - "lat": 26.8825972, - "lon": 112.5634219, + "lat": 26.8825826, + "lon": 112.5633788, "distance": 2, "collisionLat": 26.8826135, "collisionLon": 112.5635520, From 475089c733945e7745fe744f6445b5f8a515c6f9 Mon Sep 17 00:00:00 2001 From: liujing Date: Thu, 29 Apr 2021 19:57:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?2D=E5=9B=BE=E4=B8=8E3D=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E8=A7=84=E5=88=99=E7=AD=89=E8=AE=BE=E8=AE=A1=E7=BB=99=E5=87=BA?= =?UTF-8?q?=20vrmode=E6=9A=82=E6=97=B6=E5=85=B3=E9=97=AD,=E6=96=B9?= =?UTF-8?q?=E4=BE=BF=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/module/common/drawer/V2XWarnDataDrawer.java | 11 +++++++---- .../v2x/manager/impl/MoGoV2XCloundDataManager.java | 11 ++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java index 75680fdfc9..fe152e2570 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java @@ -91,8 +91,8 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL MogoLatLng mogoLatLng = new MogoLatLng(data.getCollisionLat(), data.getCollisionLon()); //2D资源图片位置调整 - MogoLatLng stopLineNew = Trigonometric.getNewLocation(data.getStopLines().get(1), 5, 180); - MogoLatLng newLocation = Trigonometric.getNewLocation(mogoLatLng, 5, 180); +// MogoLatLng stopLineNew = Trigonometric.getNewLocation(data.getStopLines().get(1), 5, 180); +// MogoLatLng newLocation = Trigonometric.getNewLocation(mogoLatLng, 5, 180); IMogoMarker marker = drawMarker(markerShowEntity, modeResType(data.getType())); //识别物 @@ -101,8 +101,11 @@ public class V2XWarnDataDrawer extends BaseDrawer implements IMogoStatusChangedL data.getDirection() == 1 ? data.getStopLines().get(1).lon : data.getCollisionLon()), (float) data.getHeading(), 5000); //识别物下方的红色圆圈 bottomMarker.addDynamicAnchorPosition(new MogoLatLng( - data.getDirection() == 1 ? stopLineNew.lat : newLocation.getLat(), - data.getDirection() == 1 ? stopLineNew.lon : newLocation.getLon()), (float) data.getHeading(), 5000); + data.getDirection() == 1 ? data.getStopLines().get(1).lat : data.getCollisionLat(), + data.getDirection() == 1 ? data.getStopLines().get(1).lon : data.getCollisionLon()), (float) data.getHeading(), 5000); +// bottomMarker.addDynamicAnchorPosition(new MogoLatLng( +// data.getDirection() == 1 ? stopLineNew.lat : newLocation.getLat(), +// data.getDirection() == 1 ? stopLineNew.lon : newLocation.getLon()), (float) data.getHeading(), 5000); //移动完成以后,3s后消失 UiThreadHandler.postDelayed(() -> { marker.remove(); diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java index f3921c9ee1..c87e38dba2 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/manager/impl/MoGoV2XCloundDataManager.java @@ -70,7 +70,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog @Override public void analysisV2XCloundDataEvent(V2XWarningEntity cloundWarningInfo) { - if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { +// if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { mCloundWarningInfo = cloundWarningInfo; showTime = mCloundWarningInfo.getShowTime(); pointsBetween(); @@ -132,7 +132,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog }, showTime); } } - } +// } /** * 自车为起点绘制(根据设计,前方行人/弱势交通参与者预警 getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP自车与停止线之间为蓝色预警;其他侧方预警自车与预碰撞点之间显示红色预警) @@ -158,7 +158,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog float distance = CoordinateUtils.calculateLineDistance(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat); //扩展点为了渐变色添加 addMiddleLoc = Trigonometric.getNewLocation(startLatlng, distance / 2, Trigonometric.getAngle(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat)); - Log.d(TAG, "自车为起点绘制 自车;" + startLatlng.lat + "," + startLatlng.lon + + Log.d(TAG, "自车为起点绘制 自车;" + startLatlng.lon + "," + startLatlng.lat + "中间扩展点" + addMiddleLoc.lon + "," + addMiddleLoc.lat + "终点:" + endLatlng.lon + "," + endLatlng.lat); if (mogoPolyline != null) { @@ -310,14 +310,15 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog @Override public void onCarLocationChanged2(Location latLng) { // Log.d(V2XConst.LOG_NAME_WARN, "onCarLocationChanged2 lat = " + latLng.getLatitude() + "--lon =" + latLng.getLongitude() + "---isSelfLineClear = " + isSelfLineClear); - if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { +// if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) { //当行人经纬度交点 开始画线,否则清理 if (mCloundWarningInfo != null) { mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude())); } drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing()); - } +// } carLocation = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude()); + Log.d("车行驶的轨迹---",String.valueOf(latLng.getLongitude())+","+String.valueOf(latLng.getLatitude())); } @Override