diff --git a/app/build.gradle b/app/build.gradle
index 68f2bc1df2..8cd6cdab96 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -24,7 +24,7 @@ if (!isAndroidTestBuild()) {
}
//if (!isAndroidTestBuild()) {
-// apply plugin: 'apm-plugin'
+ apply plugin: 'apm-plugin'
//}
//if (!isAndroidTestBuild()) {
@@ -263,29 +263,29 @@ dependencies {
}
//if (!isAndroidTestBuild()) {
-// ApmPlugin {
-// // 是否进行插桩
-// enable true
-// // 是否在Debug包插桩,默认不插桩
-// enableInDebug true
-// // DEBUG("DEBUG"), INFO("INFO"), WARN("WARN"), ERROR("ERROR");
-// // INFO 级别Log会汇总所有被插桩处理的类供查看,路径 app/build/ByteX/ApmPlugin
-// logLevel "DEBUG"
-// // 启动分析开关:监控App启动耗时,需要同时开启pageLoadSwitch
-// startSwitch = true
-// // 页面响应开关:监控Activity的生命周期耗时
-// pageLoadSwitch = true
-// // 网络监控开关:监控okhttp3的网络请求
-// okHttp3Switch = true
-// // 白名单下的包进行插桩,需要填写要插装类所在的包名,支持前缀配置
-// whiteList = [
-// "com.mogo"
-// ]
-// // 黑名单包下类不进行插桩,可以配置包名和类名,没有可以填空
-// blackList = [
-//
-// ]
-// }
+ ApmPlugin {
+ // 是否进行插桩
+ enable true
+ // 是否在Debug包插桩,默认不插桩
+ enableInDebug true
+ // DEBUG("DEBUG"), INFO("INFO"), WARN("WARN"), ERROR("ERROR");
+ // INFO 级别Log会汇总所有被插桩处理的类供查看,路径 app/build/ByteX/ApmPlugin
+ logLevel "DEBUG"
+ // 启动分析开关:监控App启动耗时,需要同时开启pageLoadSwitch
+ startSwitch = true
+ // 页面响应开关:监控Activity的生命周期耗时
+ pageLoadSwitch = true
+ // 网络监控开关:监控okhttp3的网络请求
+ okHttp3Switch = false
+ // 白名单下的包进行插桩,需要填写要插装类所在的包名,支持前缀配置
+ whiteList = [
+ "com.mogo"
+ ]
+ // 黑名单包下类不进行插桩,可以配置包名和类名,没有可以填空
+ blackList = [
+
+ ]
+ }
//}
android.applicationVariants.all { variant ->
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 5390f68844..93042f91d2 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -36,6 +36,14 @@
android:name="MAP_SDK_VERSION"
android:value="${MAP_SDK_VERSION}" />
+
+
+
+
diff --git a/config.gradle b/config.gradle
index 4965ab8c16..5edb8a051f 100644
--- a/config.gradle
+++ b/config.gradle
@@ -166,7 +166,7 @@ ext {
crashreportapmbyte : "com.mogo.test:crashreport-apmbyte:${CRASHREPORT_APMBYTE_VERSION}",
crashreportnoop : "com.mogo.test:crashreport-noop:${CRASHREPORT_NOOP_VERSION}",
crashreportupgrade : "com.mogo.test:crashreport-upgrade:${CRASHREPORT_UPGRADE_VERSION}",
- apm_insight : 'com.volcengine:apm_insight:1.4.4.cn',
+ apm_insight : 'com.volcengine:apm_insight:1.4.5.cn',
apm_insight_crash : 'com.volcengine:apm_insight_crash:1.4.2',
//========================= TTS语音 Maven 版本管理 =========================
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/WaringPresenter.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/HmiPresenter.kt
similarity index 58%
rename from core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/WaringPresenter.kt
rename to core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/HmiPresenter.kt
index 866cf26116..7ebe9297ac 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/WaringPresenter.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/HmiPresenter.kt
@@ -6,8 +6,8 @@ import com.mogo.commons.mvp.Presenter
* @author xiaoyuzhou
* @date 2021/8/3 3:55 下午
*/
-class WaringPresenter(view: MoGoWarningContract.View?) :
- Presenter(view) {
+class HmiPresenter(view: MoGoHmiContract.View?) :
+ Presenter(view) {
}
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoWarningContract.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiContract.kt
similarity index 93%
rename from core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoWarningContract.kt
rename to core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiContract.kt
index b9916ef0da..3cb6912670 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoWarningContract.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiContract.kt
@@ -11,7 +11,7 @@ import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
*@author xiaoyuzhou
*@date 2021/8/4 3:38 下午
*/
-interface MoGoWarningContract {
+interface MoGoHmiContract {
interface View : IView {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt
index 76628e984a..70b9dd7140 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt
@@ -60,10 +60,10 @@ import java.util.*
* 预警图层
*/
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_HMI)
-class MoGoHmiFragment : MvpFragment(),
+class MoGoHmiFragment : MvpFragment(),
IMoGoWaringProvider,
IMoGoHmiViewProxy,
- MoGoWarningContract.View,
+ MoGoHmiContract.View,
IMoGoAutopilotRecordListener {
private val TAG = "MoGoHmiFragment"
@@ -347,8 +347,8 @@ class MoGoHmiFragment : MvpFragment
return TAG
}
- override fun createPresenter(): WaringPresenter {
- return WaringPresenter(this)
+ override fun createPresenter(): HmiPresenter {
+ return HmiPresenter(this)
}
override fun setSpeedChartViewVisibility(visibility: Int) {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt
index 472ab73e41..daf126f9c7 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt
@@ -51,6 +51,11 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
initView()
}
+ companion object {
+ private var maxAcceleration: Double = 2.0
+ private var speedLimit: Double = 0.0
+ }
+
@SuppressLint("ClickableViewAccessibility")
private fun initView() {
background = ColorDrawable(Color.parseColor("#F0151D41"))
@@ -124,6 +129,12 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
if (AppConfigInfo.isConnectAutopilot) {
CallerAutoPilotManager.getCarConfig()
}
+ if (maxAcceleration > 0) {
+ tvAcceleration.text = "加速度 $maxAcceleration m/s²"
+ }
+ if (speedLimit > 0) {
+ etInputSpeed.setText((speedLimit * 3.6).toInt().toString())
+ }
// // 比如需要设置默认速度
// val speed = "30"
// etInputSpeed.setText(speed)
@@ -204,6 +215,8 @@ class AutoPilotAndCheckView @JvmOverloads constructor(
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
UiThreadHandler.post {
tvAcceleration?.let {
+ maxAcceleration = carConfigResp.maxAcceleration
+ speedLimit = carConfigResp.speedLimit
tvAcceleration.text = "加速度 ${carConfigResp.maxAcceleration} m/s²"
etInputSpeed.setText((carConfigResp.speedLimit * 3.6).toInt().toString())
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt
index 5324d03e61..d128c5e257 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/BrakeViewStatus.kt
@@ -55,12 +55,12 @@ class BrakeViewStatus @JvmOverloads constructor(
if (isBrake) {
isBrake = false
GlobalScope.launch(Dispatchers.Main) {
- scaleImageAndTv()
+// scaleImageAndTv()
var disappearAnimation = AlphaAnimation(1f, 0f)
- disappearAnimation.duration = 1200
+ disappearAnimation.duration = 400
layout_brake.startAnimation(disappearAnimation)
- image_brake.startAnimation(disappearAnimation)
- tv_brake.startAnimation(disappearAnimation)
+// image_brake.startAnimation(disappearAnimation)
+// tv_brake.startAnimation(disappearAnimation)
disappearAnimation.setAnimationListener(object : Animation.AnimationListener {
override fun onAnimationRepeat(p0: Animation?) {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt
index 394e463161..de079bb6b6 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt
@@ -107,9 +107,9 @@ class TurnLightViewStatus @JvmOverloads constructor(
//显示背景
private fun showNormalAnimation() {
val appearAnimation = AlphaAnimation(0f, 1.0f)
- appearAnimation.duration = 600
+ appearAnimation.duration = 300
val appearAnimationImage = AlphaAnimation(0f, 1.0f)
- appearAnimation.duration = 1000
+ appearAnimation.duration = 500
turn_light_layout.startAnimation(appearAnimation)
left_nor_image.startAnimation(appearAnimationImage)
right_nor_image.startAnimation(appearAnimationImage)
@@ -134,7 +134,7 @@ class TurnLightViewStatus @JvmOverloads constructor(
disappearAnimationLeft.duration = 300
val disappearAnimationBg = AlphaAnimation(1.0f, 0f)
- disappearAnimationBg.duration = 1200
+ disappearAnimationBg.duration = 500
left_nor_image.startAnimation(disappearAnimationLeft)
right_nor_image.startAnimation(disappearAnimationLeft)
@@ -170,7 +170,7 @@ class TurnLightViewStatus @JvmOverloads constructor(
//实现图片闪烁效果
private fun setAnimation(imageView: ImageView) {
val animation = AlphaAnimation(1.0f, 0f)
- animation.duration = 600
+ animation.duration = 500
animation.interpolator = LinearInterpolator()
animation.repeatCount = Animation.INFINITE
animation.repeatMode = Animation.REVERSE
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml
index b24ba66e08..f2b87a5de9 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml
@@ -137,8 +137,8 @@
-
+
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status.xml
index d2dd2a6052..4127b7d4f3 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_turn_light_status.xml
@@ -38,8 +38,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
- android:layout_marginLeft="10px"
- android:layout_marginTop="5px"
+ android:layout_marginLeft="13px"
+ android:layout_marginTop="3px"
android:src="@drawable/module_arrow_left_select_nor"
android:visibility="gone" />
@@ -48,8 +48,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
- android:layout_marginTop="5px"
- android:layout_marginRight="10px"
+ android:layout_marginTop="3px"
+ android:layout_marginRight="13px"
android:src="@drawable/module_arrow_right_select_nor"
android:visibility="gone" />
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml
index 79e0076a1b..9283e77555 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml
@@ -37,7 +37,7 @@
1066px
60px
- 270px
+ 275px
120px
460px
120px
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/IdentifyDataDrawer.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/IdentifyDataDrawer.java
index 8c989e773c..f56a931402 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/IdentifyDataDrawer.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/IdentifyDataDrawer.java
@@ -1,15 +1,18 @@
package com.mogo.eagle.core.function.map;
+import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
+
+import android.annotation.SuppressLint;
import android.content.Context;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.enums.TrafficTypeEnum;
-import com.mogo.eagle.core.data.traffic.TrafficData;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.MogoMarkerManager;
import com.mogo.module.common.MogoApisHandler;
+import com.mogo.module.common.utils.DrivingDirectionUtils;
import java.util.ArrayList;
import java.util.List;
@@ -31,12 +34,12 @@ public class IdentifyDataDrawer {
/**
* 上一帧数据的缓存
*/
- private static final ConcurrentHashMap mMarkersCaches = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap mMarkersCaches = new ConcurrentHashMap<>();
/**
* 已经感知不到的脏数据
*/
- private final ConcurrentHashMap mDirtyPositions = new ConcurrentHashMap<>();
+ private final ConcurrentHashMap firstData = new ConcurrentHashMap<>();
/**
* 记录每次实际绘制的交通元素UUID
*/
@@ -71,6 +74,7 @@ public class IdentifyDataDrawer {
*
* @param resultList adas感知融合数据
*/
+ @SuppressLint("NewApi")
public void renderAdasRecognizedResult(List resultList) {
if (resultList == null || resultList.isEmpty()) {
clearOldMarker();
@@ -84,35 +88,32 @@ public class IdentifyDataDrawer {
return;
}
- // 循环将集合中的数据提取记录
-
- for (MessagePad.TrackedObject trafficData : resultList) {
- // 过滤掉未知感知数据
- if (!FunctionBuildConfig.isDrawUnknownIdentifyData &&
- trafficData.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.getType()) {
- //CallerLogger.INSTANCE.w(TAG, "未知感知类型数据,丢弃,不渲染");
- continue;
+ long start = System.currentTimeMillis();
+ //清除缓存
+ for (MessagePad.TrackedObject data : resultList) {
+ if (trafficDataUuidList.size() > 0 && trafficDataUuidList.contains("" + data.getUuid())) {
+ trafficDataUuidList.remove("" + data.getUuid());
}
- trafficDataUuidList.add("" + trafficData.getUuid());
}
-// // 找出上一针数据中已经不在本次数据中存在的数据
-// for (String uuid : mMarkersCaches.keySet()) {
-// if (!trafficDataUuidList.contains(uuid)) {
-// mDirtyPositions.put(uuid, mMarkersCaches.get(uuid));
-// }
-// }
-// // 移除脏数据
-// for (String uuid : mDirtyPositions.keySet()) {
-// MogoApisHandler.getInstance().getApis()
-// .getMapServiceApi()
-// .getMarkerManager(mContext)
-// .removeMarker(uuid);
-// }
+ trafficDataUuidList.forEach(uuid -> {
+ mMarkersCaches.remove(uuid);
+ });
- // 绘制新数据
- MogoMarkerManager.getInstance(mContext)
- .updateBatchMarkerPosition(filterTrafficData(resultList));
+ CallerLogger.INSTANCE.d(M_HMI + "arrow47", "origin data size : " + resultList.size());
+ ArrayList filterList = filterTrafficData(resultList);
+ long cost = System.currentTimeMillis() - start;
+ CallerLogger.INSTANCE.d(M_HMI + "arrow47", "cost : " + cost);
+
+ if (filterList.size() > 0) {
+ // 绘制新数据
+ MogoMarkerManager.getInstance(mContext)
+ .updateBatchMarkerPosition(filterList);
+ }
+
+ CallerLogger.INSTANCE.d(M_HMI + "arrow47", "first data size : " + firstData.size() + " , mMarkersCaches : " + mMarkersCaches.size());
+ // 首次未添加的感知物在调用完绘制方法后再塞入cache map
+ mMarkersCaches.putAll(firstData);
}
/**
@@ -121,14 +122,46 @@ public class IdentifyDataDrawer {
* @return 过滤后的数据集合
*/
private ArrayList filterTrafficData(List trafficData) {
+ firstData.clear();
mFilterTrafficData.clear();
+ trafficDataUuidList.clear();
for (MessagePad.TrackedObject data : trafficData) {
// 过滤掉未知感知数据
- if (data.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.getType()) {
+ if (!FunctionBuildConfig.isDrawUnknownIdentifyData && data.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.getType()) {
//CallerLogger.INSTANCE.w(TAG, "未知感知类型数据,丢弃,不渲染");
continue;
}
- mFilterTrafficData.add(data);
+
+ //首次过来的数据不添加,首次未添加的感知物在调用完绘制方法后再塞入cache map
+ MessagePad.TrackedObject cacheData = mMarkersCaches.get("" + data.getUuid());
+ if (cacheData != null) {
+ MessagePad.TrackedObject correctData = null;
+ //todo 进行修正
+ if (Math.abs(cacheData.getHeading() - data.getHeading()) > 40 && Math.abs(cacheData.getHeading() - data.getHeading()) < 90) {
+ CallerLogger.INSTANCE.d(M_HMI + "arrow47", "uuid: " + data.getUuid() + " , 40~90差值范围 , 上一帧 : " + cacheData.getHeading() + " , 当前帧 : " + data.getHeading());
+ }
+ if (Math.abs(cacheData.getHeading() - data.getHeading()) > 90) {
+ int degree = DrivingDirectionUtils.getDegreeOfCar2Poi(cacheData.getLongitude(), cacheData.getLatitude(), data.getLongitude(), data.getLatitude(), Double.valueOf(cacheData.getHeading()).intValue());
+ if (degree > 90) {
+ CallerLogger.INSTANCE.d(M_HMI + "arrow47", "uuid: " + data.getUuid() + " , 夹角 : " + degree + " , 修正 上一帧 : " + cacheData.getHeading() + " , 当前帧 : " + data.getHeading());
+ correctData = data.toBuilder().setHeading(cacheData.getHeading()).build();
+ } else {
+ CallerLogger.INSTANCE.d(M_HMI + "arrow47", "uuid: " + data.getUuid() + " , 夹角 : " + degree + " , 未修正 上一帧 : " + cacheData.getHeading() + " , 当前帧 : " + data.getHeading());
+ }
+ }
+ if (correctData != null) {
+ mFilterTrafficData.add(correctData);
+ //更新已存在的感知物体数据
+ mMarkersCaches.put("" + data.getUuid(), correctData);
+ } else {
+ mFilterTrafficData.add(data);
+ //更新已存在的感知物体数据
+ mMarkersCaches.put("" + data.getUuid(), data);
+ }
+ } else {
+ firstData.put("" + data.getUuid(), data);
+ }
+ trafficDataUuidList.add("" + data.getUuid());
}
return mFilterTrafficData;
}
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/IdentifyDataDrawerTest.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/IdentifyDataDrawerTest.java
new file mode 100644
index 0000000000..a5f40d4a71
--- /dev/null
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/IdentifyDataDrawerTest.java
@@ -0,0 +1,212 @@
+package com.mogo.eagle.core.function.map;
+
+import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+
+import com.mogo.commons.AbsMogoApplication;
+import com.mogo.eagle.core.data.config.FunctionBuildConfig;
+import com.mogo.eagle.core.data.enums.TrafficTypeEnum;
+import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
+import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
+import com.mogo.map.MogoMap;
+import com.mogo.map.MogoMarkerManager;
+import com.mogo.module.common.MogoApisHandler;
+import com.mogo.module.common.constants.AdasRecognizedType;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+
+import mogo.telematics.pad.MessagePad;
+
+/**
+ * @author xiaoyuzhou
+ * @date 2021/10/19 10:45 上午
+ * 域控制器识别信息绘制
+ */
+public class IdentifyDataDrawerTest {
+ private static final String TAG = "IdentifyDataDrawer";
+
+ protected final Context mContext;
+ private static volatile IdentifyDataDrawerTest sInstance;
+
+ /**
+ * 上一帧数据的缓存
+ */
+ private static final ConcurrentHashMap mMarkersCaches = new ConcurrentHashMap<>();
+
+ private static final ConcurrentHashMap algoCache = new ConcurrentHashMap<>();
+
+ /**
+ * 记录每次实际绘制的交通元素UUID
+ */
+ private final ArrayList trafficDataUuidList = new ArrayList<>();
+ /**
+ * 过滤后的数据集合
+ */
+ private final ArrayList mFilterTrafficData = new ArrayList<>();
+
+ private IdentifyDataDrawerTest() {
+ mContext = AbsMogoApplication.getApp();
+ addPreVehicleModel();
+ }
+
+ public static IdentifyDataDrawerTest getInstance() {
+ if (sInstance == null) {
+ synchronized (IdentifyDataDrawerTest.class) {
+ if (sInstance == null) {
+ sInstance = new IdentifyDataDrawerTest();
+ }
+ }
+ }
+ return sInstance;
+ }
+
+ public synchronized void release() {
+ sInstance = null;
+ }
+
+ /**
+ * 渲染 adas 识别的数据
+ *
+ * @param resultList adas感知融合数据
+ */
+ @SuppressLint("NewApi")
+ public void renderAdasRecognizedResult(List resultList) {
+ if (resultList == null || resultList.isEmpty()) {
+ clearOldMarker();
+ CallerLogger.INSTANCE.w(TAG, "感知数据为空无需渲染……");
+ return;
+ }
+
+ if (!MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
+ clearOldMarker();
+ CallerLogger.INSTANCE.w(TAG, "渲染 adas 识别的数据 当前不是VR模式");
+ return;
+ }
+
+ //清除缓存
+ for (MessagePad.TrackedObject data : resultList) {
+ if (trafficDataUuidList.size() > 0 && trafficDataUuidList.contains("" + data.getUuid())) {
+ trafficDataUuidList.remove("" + data.getUuid());
+ }
+ }
+ trafficDataUuidList.forEach(uuid -> {
+ mMarkersCaches.remove(uuid);
+ algoCache.remove(uuid);
+ });
+
+ ArrayList filterList = filterTrafficData(resultList);
+ if (filterList.size() > 0) {
+ // 绘制新数据
+ MogoMarkerManager.getInstance(mContext)
+ .updateBatchMarkerPosition(filterList);
+ }
+ }
+
+ /**
+ * 数据过滤器
+ *
+ * @return 过滤后的数据集合
+ */
+ private ArrayList filterTrafficData(List trafficData) {
+ mFilterTrafficData.clear();
+ trafficDataUuidList.clear();
+ for (MessagePad.TrackedObject data : trafficData) {
+ // 过滤掉未知感知数据
+ if (!FunctionBuildConfig.isDrawUnknownIdentifyData && data.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.getType()) {
+ //CallerLogger.INSTANCE.w(TAG, "未知感知类型数据,丢弃,不渲染");
+ continue;
+ }
+
+ MessagePad.TrackedObject cacheData = mMarkersCaches.get("" + data.getUuid());
+ double heading = MogoMap.getInstance().getMogoMap().getUIController().getAngle(cacheData.getLongitude(), cacheData.getLatitude(), data.getLongitude(), data.getLatitude());
+ CallerLogger.INSTANCE.d(M_HMI + "arrow47", " uuid : " + data.getUuid() + " , origin heading : " + data.getHeading() + " , correct heading : " + heading + " ---- " + (data.getHeading() - heading));
+
+// double heading = kalmanFilter(data);
+ MessagePad.TrackedObject correctData = data.toBuilder().setHeading(heading).build();
+ mFilterTrafficData.add(correctData);
+ //更新已存在的感知物体数据
+ mMarkersCaches.put("" + correctData.getUuid(), correctData);
+ trafficDataUuidList.add("" + correctData.getUuid());
+ }
+ return mFilterTrafficData;
+ }
+
+ private double kalmanFilter(MessagePad.TrackedObject data) {
+ String uuid = "" + data.getUuid();
+ if (algoCache.containsKey(uuid)) {
+ Object o = algoCache.get(uuid);
+ KalmanFilter kf = (KalmanFilter) o;
+ assert kf != null;
+ double[] lonLat = kf.filter(data.getLongitude(), data.getLatitude());
+ algoCache.put(uuid, kf);
+ MessagePad.TrackedObject cacheTrackObj = mMarkersCaches.get(uuid);
+ assert cacheTrackObj != null;
+ double heading = MogoMap.getInstance().getMogoMap().getUIController().getAngle(cacheTrackObj.getLongitude(), cacheTrackObj.getLatitude(), lonLat[0], lonLat[1]);
+ CallerLogger.INSTANCE.d(M_HMI + "arrow47", " uuid : " + uuid + " , origin heading : " + data.getHeading() + " , correct heading : " + heading + " ---- " + (data.getHeading() - heading));
+ return heading;
+ } else {
+ double r = 0.00005;
+ if (AdasRecognizedType.valueFrom(data.getType()) == AdasRecognizedType.classIdTrafficBus || AdasRecognizedType.valueFrom(data.getType()) == AdasRecognizedType.classIdTrafficTruck) {
+ r = 0.0001;
+ }
+ algoCache.put(uuid, new KalmanFilter(data.getLongitude(), data.getLatitude(), r));
+ return data.getHeading();
+ }
+ }
+
+ /**
+ * 清除旧的 marker 数据
+ */
+ public void clearOldMarker() {
+ for (String uuid : trafficDataUuidList) {
+ MogoMarkerManager.getInstance(mContext)
+ .removeMarker(uuid);
+ }
+ trafficDataUuidList.clear();
+ }
+
+ private void addPreVehicleModel() {
+ CallerLogger.INSTANCE.d(TAG, "添加感知模型到地图中……");
+ addPreVehicleModelWeiZhi(TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI, "添加感知模型到地图中……preVehicleStrWeiZhi=");
+
+ addPreVehicleModelWeiZhi(TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE, "添加感知模型到地图中……preVehicleStrPeople=");
+
+ addPreVehicleModelWeiZhi(TrafficTypeEnum.TYPE_TRAFFIC_ID_BICYCLE, "添加感知模型到地图中……preVehicleStrBicycle=");
+
+ addPreVehicleModelWeiZhi(TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE, "添加感知模型到地图中……preVehicleStrTaChe=");
+
+ addPreVehicleModelWeiZhi(TrafficTypeEnum.TYPE_TRAFFIC_ID_MOTO, "添加感知模型到地图中……preVehicleStrMoto=");
+
+ addPreVehicleModelWeiZhi(TrafficTypeEnum.TYPE_TRAFFIC_ID_BUS, "添加感知模型到地图中……preVehicleStrBus=");
+
+ addPreVehicleModelWeiZhi(TrafficTypeEnum.TYPE_TRAFFIC_ID_TRUCK, "添加感知模型到地图中……preVehicleStrTruck=");
+ }
+
+ /**
+ * 添加模型到地图中
+ *
+ * @param typeTrafficIdWeiZhi
+ * @param s
+ */
+ private void addPreVehicleModelWeiZhi(TrafficTypeEnum typeTrafficIdWeiZhi, String s) {
+ String preVehicleStrWeiZhi = MogoMarkerManager.getInstance(mContext)
+ .addPreVehicleModel(typeTrafficIdWeiZhi.getType(),
+ typeTrafficIdWeiZhi.getTraffic3DIconId());
+ CallerLogger.INSTANCE.d(TAG, s + preVehicleStrWeiZhi);
+
+ if (preVehicleStrWeiZhi == null) {
+ UiThreadHandler.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ CallerLogger.INSTANCE.w(TAG, "添加感知模型到地图中失败,尝试重复添加……");
+ addPreVehicleModelWeiZhi(typeTrafficIdWeiZhi, s);
+ }
+ }, 1000L);
+ }
+ }
+
+}
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/KalmanFilter.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/KalmanFilter.java
new file mode 100644
index 0000000000..08605437fa
--- /dev/null
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/KalmanFilter.java
@@ -0,0 +1,34 @@
+package com.mogo.eagle.core.function.map;
+
+public class KalmanFilter {
+ private final double q = 1.0E-6D;
+ double r = 5.0E-5D;
+ double[][] xhat = new double[][]{{0.0D, 0.0D}, {0.0D, 0.0D}};
+ double[][] p = new double[][]{{1.0D, 1.0D}, {0.0D, 0.0D}};
+ double[][] xhatminus = new double[][]{{0.0D, 0.0D}, {0.0D, 0.0D}};
+ double[][] pMinus = new double[][]{{0.0D, 0.0D}, {0.0D, 0.0D}};
+ double[][] k = new double[][]{{0.0D, 0.0D}, {0.0D, 0.0D}};
+ int idx = 1;
+
+ public KalmanFilter(double lon, double lat, double r) {
+ this.xhat[0][0] = lon;
+ this.xhat[0][1] = lat;
+ this.r = r;
+ }
+
+ public double[] filter(double lon, double lat) {
+ for(int i = 0; i < 2; ++i) {
+ this.xhatminus[this.idx][i] = this.xhat[1 - this.idx][i];
+ this.pMinus[this.idx][i] = this.p[1 - this.idx][i] + 1.0E-6D;
+ this.k[this.idx][i] = this.pMinus[this.idx][i] / (this.pMinus[this.idx][i] + this.r);
+ double value = i == 0 ? lon : lat;
+ this.xhat[this.idx][i] = this.xhatminus[this.idx][i] + this.k[this.idx][i] * (value - this.xhatminus[this.idx][i]);
+ this.p[this.idx][i] = (1.0D - this.k[this.idx][i]) * this.pMinus[this.idx][i];
+ }
+
+ double lon1 = this.xhat[this.idx][0];
+ double lat1 = this.xhat[this.idx][1];
+ this.idx = 1 - this.idx;
+ return new double[]{lon1, lat1};
+ }
+}
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java
index 0531987cb2..ecbb52d6be 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java
@@ -262,7 +262,7 @@ public class SmallMapDirectionView
new PolylineOptions()
.addAll(mCoordinatesLatLng)
.color(Color.argb(255, 31, 127, 255))
- .width(5));
+ .width(6));
}
// else {
diff --git a/core/function-impl/mogo-core-function-map/src/main/res/drawable-xhdpi-2560x1440/module_small_map_view_dir_end.png b/core/function-impl/mogo-core-function-map/src/main/res/drawable-xhdpi-2560x1440/module_small_map_view_dir_end.png
index f3cb78aed4..f030e6887d 100644
Binary files a/core/function-impl/mogo-core-function-map/src/main/res/drawable-xhdpi-2560x1440/module_small_map_view_dir_end.png and b/core/function-impl/mogo-core-function-map/src/main/res/drawable-xhdpi-2560x1440/module_small_map_view_dir_end.png differ
diff --git a/core/function-impl/mogo-core-function-map/src/main/res/drawable-xhdpi-2560x1440/module_small_map_view_dir_start.png b/core/function-impl/mogo-core-function-map/src/main/res/drawable-xhdpi-2560x1440/module_small_map_view_dir_start.png
index 4d2a797823..9a7f520b33 100644
Binary files a/core/function-impl/mogo-core-function-map/src/main/res/drawable-xhdpi-2560x1440/module_small_map_view_dir_start.png and b/core/function-impl/mogo-core-function-map/src/main/res/drawable-xhdpi-2560x1440/module_small_map_view_dir_start.png differ
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/TrafficLightHMIManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/TrafficLightHMIManager.kt
index 08e0e109ee..66ce2bb505 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/TrafficLightHMIManager.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/TrafficLightHMIManager.kt
@@ -40,20 +40,20 @@ class TrafficLightHMIManager {
trafficLightStatus.isGreen() || trafficLightStatus.isFlashGreen() -> {
CallerHmiManager.showWarningTrafficLight(3)
CallerHmiManager.changeCountdownGreen(remain)
- CallerHmiManager.changeCountdownRed(-1)
- CallerHmiManager.changeCountdownYellow(-1)
+// CallerHmiManager.changeCountdownRed(-1)
+// CallerHmiManager.changeCountdownYellow(-1)
}
trafficLightStatus.isYellow() -> {
CallerHmiManager.showWarningTrafficLight(2)
CallerHmiManager.changeCountdownYellow(remain)
- CallerHmiManager.changeCountdownGreen(-1)
- CallerHmiManager.changeCountdownRed(-1)
+// CallerHmiManager.changeCountdownGreen(-1)
+// CallerHmiManager.changeCountdownRed(-1)
}
trafficLightStatus.isRed() -> {
CallerHmiManager.showWarningTrafficLight(1)
CallerHmiManager.changeCountdownRed(remain)
- CallerHmiManager.changeCountdownGreen(-1)
- CallerHmiManager.changeCountdownYellow(-1)
+// CallerHmiManager.changeCountdownGreen(-1)
+// CallerHmiManager.changeCountdownYellow(-1)
}
}
}
diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/OverlayViewUtils.java b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/OverlayViewUtils.java
new file mode 100644
index 0000000000..e65a5b3c52
--- /dev/null
+++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/OverlayViewUtils.java
@@ -0,0 +1,93 @@
+package com.mogo.eagle.core.utilcode.util;
+
+import android.app.Activity;
+import android.content.Context;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.WindowManager.LayoutParams;
+
+/**
+ * 遮罩层工具类
+ *
+ * @author mogoauto
+ */
+public class OverlayViewUtils {
+ private static final String TAG = "OverlayViewUtils";
+
+ private static WindowManager windowManager;
+ private static Context applicationContext;
+ private static volatile boolean isShowing = false;
+
+ /**
+ * 记录上一次的View
+ */
+ private static View lastOverlayView;
+
+ /**
+ * 添加覆盖View在Activity上面
+ */
+ public static void showOverlayView(Activity context, View overlayView) {
+ if (applicationContext == null) {
+ applicationContext = context.getApplicationContext();
+ }
+
+ if (windowManager == null) {
+ windowManager = context.getWindowManager();
+ }
+
+ // 设置View显示模式,沉浸式的侵入到状态栏,导航栏
+ overlayView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
+
+ LayoutParams params = new LayoutParams();
+ params.width = LayoutParams.MATCH_PARENT;
+ params.height = LayoutParams.MATCH_PARENT;
+ params.alpha = 1.0f;
+ // 设置窗口类型为应用子窗口,和PopupWindow同类型
+ params.type = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
+ // 没有边界限制,允许窗口扩展到屏幕外
+ params.flags = WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
+
+
+ // 如果正在展示中,并且lastOverlayView不为null,先做移除操作,保证覆盖在最上面的View只有一个,防止叠加导致无法移除
+ if (lastOverlayView != null) {
+ dismissOverlayView(lastOverlayView);
+ }
+
+ try {
+ // 后门逻辑,长时间触摸消失
+ overlayView.setOnLongClickListener(v -> {
+ dismissOverlayView(lastOverlayView);
+ return true;
+ });
+ lastOverlayView = overlayView;
+ windowManager.addView(overlayView, params);
+ isShowing = true;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * 移除覆盖View在Activity上面
+ */
+ public static void dismissOverlayView(View overlayView) {
+ if (!isShowing) {
+ return;
+ }
+ try {
+ if (windowManager != null && overlayView != null) {
+ windowManager.removeView(overlayView);
+ }
+ isShowing = false;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+
+}
diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMap.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMap.java
index dcf235541d..11b968b840 100644
--- a/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMap.java
+++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/IMogoMap.java
@@ -1,6 +1,5 @@
package com.mogo.map;
-import com.mogo.eagle.core.data.traffic.TrafficData;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.map.overlay.IMogoPolyline;
diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java
index 65cb31af57..9ae3db58a1 100644
--- a/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java
+++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java
@@ -352,4 +352,10 @@ public interface IMogoMapUIController {
* 设置地图视线角度
*/
void setMapDAngle(float angle);
+
+ /**
+ * 获取行车方向
+ * @return
+ */
+ float getAngle(double startLon, double startLat, double endLon, double endLat);
}
diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
index 6881bc8434..f18918c184 100644
--- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
+++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
@@ -1079,4 +1079,9 @@ public class AMapViewWrapper implements IMogoMapView,
mMapView.getMapAutoViewHelper().setMapDAngle(angle);
}
+ @Override
+ public float getAngle(double startLon, double startLat, double endLon, double endLat) {
+ return MapAutoApi.INSTANCE.getAngle(startLon,startLat,endLon,endLat);
+ }
+
}
diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java b/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java
index d0e275cd76..0eaa831de4 100644
--- a/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java
+++ b/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java
@@ -454,4 +454,13 @@ public class MogoMapUIController implements IMogoMapUIController {
mDelegate.setMapDAngle(angle);
}
}
+
+ @Override
+ public float getAngle(double startLon, double startLat, double endLon, double endLat) {
+ initDelegate();
+ if (mDelegate != null) {
+ return mDelegate.getAngle(startLon, startLat, endLon, endLat);
+ }
+ return 0.0f;
+ }
}
diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/uicontroller/AMapUIController.java b/libraries/mogo-map/src/main/java/com/mogo/map/uicontroller/AMapUIController.java
index 39051ccaf9..38fc9ebdae 100644
--- a/libraries/mogo-map/src/main/java/com/mogo/map/uicontroller/AMapUIController.java
+++ b/libraries/mogo-map/src/main/java/com/mogo/map/uicontroller/AMapUIController.java
@@ -374,4 +374,12 @@ public class AMapUIController implements IMogoMapUIController {
mClient.setMapDAngle(angle);
}
}
+
+ @Override
+ public float getAngle(double startLon, double startLat, double endLon, double endLat) {
+ if (mClient != null) {
+ return mClient.getAngle(startLon,startLat,endLon,endLat);
+ }
+ return 0;
+ }
}
diff --git a/modules/mogo-module-common/build.gradle b/modules/mogo-module-common/build.gradle
index 68289ac3e8..af317b04ce 100644
--- a/modules/mogo-module-common/build.gradle
+++ b/modules/mogo-module-common/build.gradle
@@ -81,6 +81,7 @@ dependencies {
} else {
api project(":libraries:mogo-map")
api project(":libraries:mogo-map-api")
+ implementation project(':libraries:mogo-adas-data')
api project(":foudations:mogo-commons")
api project(':services:mogo-service-api')
api project(':core:mogo-core-utils')
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java
index 1f0a18821a..7ad39389d2 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java
@@ -180,6 +180,8 @@ public class MogoRouteOverlayManager implements
}
// CallerLogger.INSTANCE.d(M_OLD_ROUTE + TAG , "onLocationChanged: size = "+ mTrajectoryList.size()+" ----- "+mLocation.getLongitude()+"-"+mLocation.getLatitude());
ArrayList list = new ArrayList();
+ MogoLatLng carlatLng = new MogoLatLng(CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lat(),CallerAutoPilotStatusListenerManager.INSTANCE.getCurWgs84Lon());
+ list.add(carlatLng);
for (MogoLatLng latLng : temp) {
// if(!isPointOnCarFront(mLocation,latLng)){
list.add(latLng);
@@ -191,6 +193,7 @@ public class MogoRouteOverlayManager implements
}
}
+
public boolean isPointOnCarFront(MogoLocation carLocal, MogoLatLng pointLocal) {
double carLon = carLocal.getLongitude();
double carLat = carLocal.getLatitude();
diff --git a/test/crashreport-apmbyte/src/main/java/com/mogo/test/crashreport/apm/ApmCrashReportProvider.java b/test/crashreport-apmbyte/src/main/java/com/mogo/test/crashreport/apm/ApmCrashReportProvider.java
index 9e3b4eb108..385e073181 100644
--- a/test/crashreport-apmbyte/src/main/java/com/mogo/test/crashreport/apm/ApmCrashReportProvider.java
+++ b/test/crashreport-apmbyte/src/main/java/com/mogo/test/crashreport/apm/ApmCrashReportProvider.java
@@ -53,10 +53,10 @@ public class ApmCrashReportProvider implements ITestCrashReportProvider {
return map;
}
});
- crash.config().setChannel("eagle");
+ String mapSDKVersion = AppUtils.getCustomMapSDKVersion(context);
+ crash.config().setChannel("MAP_SDK_VERSION:"+mapSDKVersion);
//可选,可以设置自定义did,不设置会使用内部默认的
crash.config().setDeviceId(MoGoAiCloudClientConfig.getInstance().getSn());
- String mapSDKVersion = AppUtils.getCustomMapSDKVersion(context);
crash.addTags(MAP_SDK_VERSION, mapSDKVersion);
// crash.setReportUrl("www.xxx.com"); // 私有化部署:私有化部署才配置上报地址
// crash.addTags("key", "value"); // 自定义筛选tag, 按需添加、可多次覆盖
@@ -66,6 +66,7 @@ public class ApmCrashReportProvider implements ITestCrashReportProvider {
dimension.put("Devices_SN_DeviceId", MoGoAiCloudClientConfig.getInstance().getSn() + "__" + DeviceIdUtils.getDeviceId(context));
dimension.put("Devices_SN_WidevineID_MD5", MoGoAiCloudClientConfig.getInstance().getSn() + "__" + DeviceIdUtils.getWidevineIDWithMd5(context));
dimension.put("Devices_SN_WidevineID", MoGoAiCloudClientConfig.getInstance().getSn() + "__" + DeviceIdUtils.getWidevineID(context));
+ dimension.put(MAP_SDK_VERSION, mapSDKVersion);
HashMap metric = new HashMap<>();
//指标值
//metric.put("Devices_ID_metric", (double) 100);
@@ -95,7 +96,7 @@ public class ApmCrashReportProvider implements ITestCrashReportProvider {
//是否打印日志,注:线上release版本要配置为false
builder.debugMode(true);
//支持用户自定义user_id把平台数据和自己用户关联起来,可以不配置
- builder.userId(MoGoAiCloudClientConfig.getInstance().getSn());
+// builder.userId(MoGoAiCloudClientConfig.getInstance().getSn());
//私有化部署:配置数据上报的域名 (私有化部署才需要配置,内部有默认域名),测试支持设置http://www.xxx.com 默认是https协议
// builder.defaultReportDomain("www.xxx.com");
//设置渠道。1.3.16版本增加接口