升级自研地图

版本	日志
1.0.1-vr-1.0.6
1.增加分区域获取高精数据功能
2.增加设置车相对于屏幕底部的位置
3.修改渲染线的绘制方式
4.增加动态3D模型
This commit is contained in:
董宏宇
2021-08-27 18:41:26 +08:00
parent 8866bcfaf7
commit 8e517485fc
45 changed files with 151426 additions and 29 deletions

View File

@@ -1,9 +1,6 @@
package com.mogo.module.common.drawer;
import static com.mogo.cloud.socket.entity.SocketDownDataHelper.FROM_ADAS;
import static com.mogo.cloud.socket.entity.SocketDownDataHelper.FROM_MY_LOCATION;
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_ADAS;
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_DATA;
import static java.lang.Math.PI;
import android.content.Context;
@@ -195,10 +192,10 @@ class BaseDrawer {
*/
public boolean shouldShowSpeed(int type) {
return true; //todo 验证行人预警,对行人和自行车不做infoWindow过滤
// AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom(type);
// return recognizedType != AdasRecognizedType.classIdPerson;
// &&recognizedType != AdasRecognizedType.classIdBicycle //todo Bicycle显示
// && recognizedType != AdasRecognizedType.classIdMoto //todo moto显示
// AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom(type);
// return recognizedType != AdasRecognizedType.classIdPerson;
// &&recognizedType != AdasRecognizedType.classIdBicycle //todo Bicycle显示
// && recognizedType != AdasRecognizedType.classIdMoto //todo moto显示
}
/**
@@ -211,17 +208,17 @@ class BaseDrawer {
AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom(type);
if (recognizedType == AdasRecognizedType.classIdCar) {
// TODO 这里临时替换模型解决穿模现象
return R.raw.tachexiaoche;
return R.raw.special_vehicle;
} else if (recognizedType == AdasRecognizedType.classIdTrafficBus) {
return R.raw.bus;
return R.raw.daba;
} else if (recognizedType == AdasRecognizedType.classIdMoto) {
return R.raw.motorbike;
return R.raw.motuoche;
} else if (recognizedType == AdasRecognizedType.classIdStopLine) {
return R.raw.stopline;
} else if (recognizedType == AdasRecognizedType.classIdWarningArrows) {
return R.raw.arraw;
return R.raw.stopline;
} else if (recognizedType == AdasRecognizedType.classIdUnKnow) {
return R.raw.tache;
return R.raw.special_vehicle;
} else if (recognizedType == AdasRecognizedType.classIdBicycle) {
return R.raw.zixingche;
} else if (recognizedType == AdasRecognizedType.classIdTrafficTruck) {
@@ -343,7 +340,7 @@ class BaseDrawer {
return;
}
mogoMarker.setInfoWindowOffset(0, 20);
// String text = "speed : " + speedIntVal + "\n" + uuid + "\n" + "type : " + type + "\n" + "heading : " + heading;
// String text = "speed : " + speedIntVal + "\n" + uuid + "\n" + "type : " + type + "\n" + "heading : " + heading;
String text = uuid + " " + (int) heading;
mSpeedView.setText(text);
mogoMarker.updateInfoWindowView(mSpeedView);
@@ -459,7 +456,7 @@ class BaseDrawer {
boolean match;
if (matchedPoint != null) {
// Logger.d( TAG, "matchPoint %s distance = %s",lineCounter, matchedPoint[2] );
// Logger.d( TAG, "matchPoint %s distance = %s",lineCounter, matchedPoint[2] );
match = matchedPoint[2] < 1 && matchedPoint[2] > 0;
if (lastLon != -1) {
@@ -475,7 +472,7 @@ class BaseDrawer {
}
double _angle = Math.atan2(Math.abs(matchedPoint[0] - lastLon), Math.abs(matchedPoint[1] - lastLat)) * (180 / PI);
_angle = Math.abs(clearAngle - _angle);
// Logger.d(TAG, "matchPoint %s angel = %s", lineCounter, _angle);
// Logger.d(TAG, "matchPoint %s angel = %s", lineCounter, _angle);
if (_angle > 22.5) {
match = false;
}

View File

@@ -17,8 +17,8 @@ enum class TrafficTypeEnum(
TYPE_TRAFFIC_ID_WEI_ZHI(
0,
"未知数据",
R.raw.tache,
R.raw.tache
R.raw.special_vehicle,
R.raw.special_vehicle
),
TYPE_TRAFFIC_ID_PEOPLE(
1,
@@ -35,20 +35,20 @@ enum class TrafficTypeEnum(
TYPE_TRAFFIC_ID_TA_CHE(
3,
"他车",
R.raw.tachexiaoche,
R.raw.tachexiaoche
R.raw.special_vehicle,
R.raw.special_vehicle
),
TYPE_TRAFFIC_ID_MOTO(
4,
"摩托",
R.raw.motorbike,
R.raw.motorbike
R.raw.motuoche,
R.raw.motuoche
),
TYPE_TRAFFIC_ID_BUS(
6,
"大巴",
R.raw.bus,
R.raw.bus
R.raw.daba,
R.raw.daba
),
TYPE_TRAFFIC_ID_TRUCK(
8,