升级自研地图

版本	日志
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

@@ -32,6 +32,6 @@ project.android.productFlavors {
// 是否需要悬浮窗权限申请
buildConfigField 'boolean', 'IS_NEED_REQUEST_FLOAT_PERMISSION', 'true'
// GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "2"
buildConfigField 'int', 'GPS_PROVIDER', "1"
}
}

View File

@@ -181,7 +181,7 @@ MOGO_AICLOUD_SERVICES_APK_VERSION=1.0.0-SNAPSHOT
# mogoAiCloud sdk services
MOGO_AICLOUD_SERVICES_SDK_VERSION=1.0.0-SNAPSHOT
# 自研地图
MAP_SDK_VERSION=1.0.1-vr-1.0.2
MAP_SDK_VERSION=1.0.1-vr-1.0.6
## 产品库必备配置产品库自动对versionCode和versionName版本进行升级

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,

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -553,7 +553,7 @@ public class MockIntentHandler implements IntentHandler {
.position(new MogoLatLng(39.981971055705, 116.41150648393))
.gps(true)
.controlAngle(true)
.icon3DRes(R.raw.othercar)
.icon3DRes(R.raw.special_vehicle)
.rotate((float) 358.526123);
IMogoMarker marker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(context).addMarker(DataTypes.TYPE_MARKER_ADAS, options);
List<MogoLatLng> latLngs = new ArrayList<>();
@@ -599,8 +599,8 @@ public class MockIntentHandler implements IntentHandler {
DebugConfig.setSelfCarSpeedYOffset(intent.getIntExtra("yOffset", 20));
break;
case 51:// 模拟路口车辆移动
// mLocationMockHandler.sendEmptyMessageDelayed(100, 0L);
// mLocationMockHandler.sendEmptyMessageDelayed(101, 1000L);
mLocationMockHandler.sendEmptyMessageDelayed(100, 0L);
mLocationMockHandler.sendEmptyMessageDelayed(101, 1000L);
break;
case 52:
// 打开连调工控机、ADAS的控制面板

View File

@@ -290,7 +290,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
MogoMarkerOptions options = new MogoMarkerOptions().object(roadEventEntity)
.latitude(roadEventEntity.getLocation().getLat()).longitude(roadEventEntity.getLocation().getLon());
options.anchor(0.5f, 0.5f);
options.icon3DRes(com.mogo.module.common.R.raw.othercar);
options.icon3DRes(com.mogo.module.common.R.raw.special_vehicle);
options.anchorColor("#FFBF29FF");
m3DMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, options);
m3DMarker.setToTop();