Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
syntax = "proto3";
|
||||
package mogo.yycp.service;
|
||||
option java_package = "mogo.yycp.api.proto";
|
||||
option java_outer_classname = "SocketDownData";
|
||||
/*
|
||||
message xxx {
|
||||
// 字段规则:required -> 字段只能也必须出现 1 次
|
||||
// 字段规则:optional -> 字段可出现 0 次或1次
|
||||
// 字段规则:repeated -> 字段可出现任意多次(包括 0)
|
||||
// 类型:int32、int64、sint32、sint64、string、32-bit ....
|
||||
// 字段编号:0 ~ 536870911(除去 19000 到 19999 之间的数字)
|
||||
字段规则 类型 名称 = 字段编号;
|
||||
}
|
||||
*/
|
||||
//返回车机主实体
|
||||
message SocketDownDataProto {
|
||||
uint64 seq = 1;
|
||||
uint32 msgType = 2;
|
||||
string sn = 3;
|
||||
LauncherSnapshotProto data = 4;
|
||||
uint64 utcTime = 5;
|
||||
uint64 upUtcTime = 6;
|
||||
string cityCode = 7;
|
||||
}
|
||||
|
||||
//LauncherSnapshot数据响应VO
|
||||
message LauncherSnapshotProto {
|
||||
//总数据集合 RoadDataVo
|
||||
repeated CloudRoadDataProto allList = 1;
|
||||
//前方50米数据集合 RoadDataVo
|
||||
repeated CloudRoadDataProto nearList = 2;
|
||||
//摄像头 RoadDataVo
|
||||
CloudRoadDataProto camera = 3;
|
||||
string msgId = 4;
|
||||
uint64 time = 5;
|
||||
//过期时间
|
||||
uint64 expire = 6;
|
||||
}
|
||||
//RoadDataVo
|
||||
message CloudRoadDataProto {
|
||||
/**物体类型 1-人 2-自行车 3-小轿车 4-摩托车 5-红绿灯 6-bus 8-truck 9-路边摄像头*/
|
||||
uint32 type = 1;
|
||||
/**数据来源 1,"自车数据" 2,"ADAS数据" 3,"路测设备识别数据" */
|
||||
uint32 fromType = 2;
|
||||
/**
|
||||
* 车机上行pgs坐标给lat,lon两个成员变量
|
||||
*
|
||||
* 在下发车机时计算高德经纬度
|
||||
* 1.将gps(lat,lon)给wgslat,wgalon
|
||||
* 2.高德算法算出高德经纬度,给lat,lon
|
||||
*/
|
||||
double lat = 3; //gps->gd
|
||||
double lon = 4; //gps->gd
|
||||
double wgslat = 5; //原gps
|
||||
double wgslon = 6; //原gps
|
||||
//车机sn
|
||||
string sn = 7;
|
||||
//车辆UUID
|
||||
string uuid = 8;
|
||||
/** 车牌号 */
|
||||
string cardId = 9;
|
||||
/**速度*/
|
||||
double speed = 10;
|
||||
/**方向*/
|
||||
double heading = 11;
|
||||
/** 系统时间 */
|
||||
uint64 systemTime = 12;
|
||||
/** 星历时间 */
|
||||
uint64 satelliteTime = 13;
|
||||
/**红绿灯状态 1红 2绿 3黄*/
|
||||
uint32 lightStatus = 14;
|
||||
/**红绿灯剩余时间 读秒*/
|
||||
uint32 lightLeftTime = 15;
|
||||
/**视频流直播地址*/
|
||||
string rtmpUrl = 16;
|
||||
/**距离*/
|
||||
double distance = 17;
|
||||
}
|
||||
@@ -195,14 +195,6 @@ public interface OnAdasListener {
|
||||
*/
|
||||
void onPlanningActionMsg(MessagePad.Header header, MessagePad.PlanningActionMsg planningActionMsg);
|
||||
|
||||
/**
|
||||
* OBU预警事件
|
||||
*
|
||||
* @param header 头
|
||||
* @param obuWarningData 数据
|
||||
*/
|
||||
void onObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData obuWarningData);
|
||||
|
||||
/**
|
||||
* OBU 红绿灯预警信息
|
||||
*
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ObuWarningDataMessage extends MyAbstractMessageHandler {
|
||||
if (CupidLogUtils.isEnableLog())
|
||||
nowTime = SystemClock.elapsedRealtime();
|
||||
if (adasListener != null) {
|
||||
adasListener.onObuWarningData(raw.getHeader(), obuWarningData);
|
||||
// adasListener.onObuWarningData(raw.getHeader(), obuWarningData);
|
||||
}
|
||||
AdasChannel.calculateTimeConsumingBusiness("OBU预警事件", nowTime);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.map;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.center.CenterLine;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
@@ -12,6 +13,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -51,6 +53,13 @@ public interface IMogoMap {
|
||||
*/
|
||||
void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 批量更新锚点位置
|
||||
*
|
||||
* @param optionsArrayList 锚点集合
|
||||
*/
|
||||
void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 添加感知使用到的3d模型
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -44,6 +45,13 @@ public interface IMogoMarkerManager {
|
||||
*/
|
||||
void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 批量更新锚点位置
|
||||
*
|
||||
* @param optionsArrayList 锚点集合
|
||||
*/
|
||||
void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList);
|
||||
|
||||
/**
|
||||
* 添加感知使用到的3d模型
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
@@ -48,6 +49,17 @@ public interface IMogoMapUIController {
|
||||
*/
|
||||
void changeMapVisualAngle(VisualAngleMode angelMode, MogoLatLng mogoLatLng);
|
||||
|
||||
/**
|
||||
* 设置漫游路径
|
||||
* @param trajectory
|
||||
*/
|
||||
void setRoamTrajectory(String trajectory);
|
||||
|
||||
/**
|
||||
* 设置漫游模式 , 0:自由漫游,1:路径漫游
|
||||
*/
|
||||
void setRomaMode(int mode);
|
||||
|
||||
/**
|
||||
* 获得当前地图视距模式
|
||||
*
|
||||
|
||||
@@ -35,7 +35,12 @@ public enum VisualAngleMode implements IMogoMapVisualAngle {
|
||||
/**
|
||||
* 十字路口视角
|
||||
*/
|
||||
MAP_STYLE_VR_ANGLE_CROSS(5);
|
||||
MAP_STYLE_VR_ANGLE_CROSS(5),
|
||||
|
||||
/**
|
||||
* 漫游模式
|
||||
*/
|
||||
MAP_STYLE_VR_ROMA(7);
|
||||
|
||||
|
||||
private final int code;
|
||||
@@ -62,4 +67,8 @@ public enum VisualAngleMode implements IMogoMapVisualAngle {
|
||||
public boolean isMediumSight() {
|
||||
return code == MODE_MEDIUM_SIGHT.getCode();
|
||||
}
|
||||
|
||||
public boolean isRoma(){
|
||||
return code == MAP_STYLE_VR_ROMA.getCode();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,6 +6,7 @@ import android.graphics.Point;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.center.CenterLine;
|
||||
import com.mogo.map.marker.AMapInfoWindowAdapter;
|
||||
@@ -41,6 +42,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -123,6 +125,24 @@ public class AMapWrapper implements IMogoMap {
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 1);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList) {
|
||||
if (!checkAMap()) {
|
||||
return;
|
||||
}
|
||||
ArrayList<MarkerSimpleData> markerOptionsArrayList = new ArrayList<>();
|
||||
optionsArrayList.forEach((s, trackedObject) -> {
|
||||
MarkerSimpleData markerOptions = ObjectUtils.fromAiData(trackedObject);
|
||||
if (markerOptions != null) {
|
||||
markerOptionsArrayList.add(markerOptions);
|
||||
}
|
||||
});
|
||||
long time = markerOptionsArrayList.get(0).getTime();
|
||||
// 最后一个参数,是否管理锚点的删除
|
||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addPreVehicleModel(int type, int modelRes) {
|
||||
try {
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
@@ -81,6 +82,23 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRoamTrajectory(String trajectory) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setRoamTrajectory(trajectory);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRomaMode(int mode) {
|
||||
initDelegate();
|
||||
if (mDelegate != null) {
|
||||
CallerLogger.INSTANCE.d(TAG, "set setRomaMode: " + mode);
|
||||
mDelegate.setRomaMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualAngleMode getCurrentMapVisualAngle() {
|
||||
initDelegate();
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -29,17 +30,17 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
private static volatile MogoMarkerManager sInstance;
|
||||
private Context mApplicationContext;
|
||||
|
||||
private MogoMarkerManager( Context context ) {
|
||||
if ( context != null ) {
|
||||
private MogoMarkerManager(Context context) {
|
||||
if (context != null) {
|
||||
mApplicationContext = context.getApplicationContext();
|
||||
}
|
||||
}
|
||||
|
||||
public static MogoMarkerManager getInstance( Context context ) {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( MogoMarkerManager.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new MogoMarkerManager( context );
|
||||
public static MogoMarkerManager getInstance(Context context) {
|
||||
if (sInstance == null) {
|
||||
synchronized (MogoMarkerManager.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new MogoMarkerManager(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,27 +52,27 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMarker addMarker( String tag, MogoMarkerOptions options ) {
|
||||
public IMogoMarker addMarker(String tag, MogoMarkerOptions options) {
|
||||
try {
|
||||
return MogoMap.getInstance().getMogoMap().addMarker( tag, options );
|
||||
} catch ( Exception e ) {
|
||||
return MogoMap.getInstance().getMogoMap().addMarker(tag, options);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List< IMogoMarker > addMarkers( String tag, ArrayList< MogoMarkerOptions > options, boolean moveToCenter ) {
|
||||
public List<IMogoMarker> addMarkers(String tag, ArrayList<MogoMarkerOptions> options, boolean moveToCenter) {
|
||||
try {
|
||||
return MogoMap.getInstance().getMogoMap().addMarkers( tag, options, moveToCenter );
|
||||
} catch ( Exception e ) {
|
||||
return MogoMap.getInstance().getMogoMap().addMarkers(tag, options, moveToCenter);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBatchMarkerPosition(HashMap<String,MessagePad.TrackedObject> optionsArrayList) {
|
||||
public void updateBatchMarkerPosition(HashMap<String, MessagePad.TrackedObject> optionsArrayList) {
|
||||
try {
|
||||
MogoMap.getInstance().getMogoMap().updateBatchMarkerPosition(optionsArrayList);
|
||||
} catch (Exception e) {
|
||||
@@ -79,6 +80,15 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBatchAiMarkerPosition(HashMap<String, SocketDownData.CloudRoadDataProto> optionsArrayList) {
|
||||
try {
|
||||
MogoMap.getInstance().getMogoMap().updateBatchAiMarkerPosition(optionsArrayList);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addPreVehicleModel(int type, int modelRes) {
|
||||
try {
|
||||
@@ -100,9 +110,9 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
|
||||
|
||||
@Override
|
||||
public void removeMarkers( String tag ) {
|
||||
public void removeMarkers(String tag) {
|
||||
CallMarkersClearManager.INSTANCE.invokeClearAllMarkersOfTag(tag);
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().remove( tag );
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().remove(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,27 +133,27 @@ public class MogoMarkerManager implements IMogoMarkerManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inVisibleWithoutMarkers(String ...owner) {
|
||||
public void inVisibleWithoutMarkers(String... owner) {
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().inVisibleMarkers(owner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List< IMogoMarker > getMarkers( String tag ) {
|
||||
return MogoMarkersHandler.Companion.getMogoMarkersHandler().getMarkers( tag );
|
||||
public List<IMogoMarker> getMarkers(String tag) {
|
||||
return MogoMarkersHandler.Companion.getMogoMarkersHandler().getMarkers(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map< String, List< IMogoMarker > > getAllMarkers() {
|
||||
public Map<String, List<IMogoMarker>> getAllMarkers() {
|
||||
return MogoMarkersHandler.Companion.getMogoMarkersHandler().getAllMarkers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeMarkersExcept( String tag ) {
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().deleteAllExcept( tag );
|
||||
public void removeMarkersExcept(String tag) {
|
||||
MogoMarkersHandler.Companion.getMogoMarkersHandler().deleteAllExcept(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRouteWay(Context context, MogoLatLng startPoint, MogoLatLng endPoint, List< MogoLatLng > wayPoints ) {
|
||||
public void addRouteWay(Context context, MogoLatLng startPoint, MogoLatLng endPoint, List<MogoLatLng> wayPoints) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.zhidaoauto.map.sdk.open.MapAutoApi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-26
|
||||
@@ -19,8 +20,6 @@ import java.util.List;
|
||||
*/
|
||||
public class AMapUIController implements IMogoMapUIController {
|
||||
|
||||
private static final String TAG = "AMapUIController";
|
||||
|
||||
private static volatile AMapUIController sInstance;
|
||||
|
||||
private IMogoMapUIController mClient;
|
||||
@@ -70,6 +69,20 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRoamTrajectory(String trajectory) {
|
||||
if (mClient != null) {
|
||||
mClient.setRoamTrajectory(trajectory);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRomaMode(int mode) {
|
||||
if (mClient != null) {
|
||||
mClient.setRomaMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualAngleMode getCurrentMapVisualAngle() {
|
||||
if (mClient != null) {
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.yycp.api.proto.SocketDownData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -117,6 +118,26 @@ public class ObjectUtils {
|
||||
return markerOptions;
|
||||
}
|
||||
|
||||
public static MarkerSimpleData fromAiData(SocketDownData.CloudRoadDataProto aiData) {
|
||||
if (aiData == null) {
|
||||
return null;
|
||||
}
|
||||
MarkerSimpleData markerOptions = null;
|
||||
try {
|
||||
markerOptions = new MarkerSimpleData();
|
||||
markerOptions.setId(aiData.getUuid().hashCode());
|
||||
markerOptions.setMarkerType(aiData.getType());
|
||||
markerOptions.setRotateAngle((float) aiData.getHeading());
|
||||
markerOptions.setLat(aiData.getWgslat());
|
||||
markerOptions.setLon(aiData.getWgslon());
|
||||
markerOptions.setTime(Double.valueOf(aiData.getSatelliteTime()).longValue());
|
||||
markerOptions.setColor("#00FF00FF");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return markerOptions;
|
||||
}
|
||||
|
||||
private static BitmapDescriptor getBitmapDescriptorFromMogo(MogoMarkerOptions options) {
|
||||
if (options == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user