fix bug of traffic light and change the color of tracker

This commit is contained in:
zhongchao
2022-08-29 18:56:47 +08:00
parent 65e3170ce0
commit 52a9f3af56
4 changed files with 13 additions and 9 deletions

View File

@@ -185,7 +185,7 @@ class IdentifyOriginDataDrawer : Identify, IMoGoAutopilotStatusListener {
if (subFirst.isPresent) {
val subID = subFirst.get().id
if (!TextUtils.isEmpty(subID)) {
temp = data.toBuilder().setColor("#4CA6E2FF").build()
temp = data.toBuilder().setColor("#36D3FE").build()
if (obuWarningTrafficData.containsKey(subID)) {
temp = data.toBuilder()
.setColor(obuWarningTrafficData[subID]!!.threatLevelColor())

View File

@@ -140,7 +140,7 @@ public class TrackManager {
if (subFirst.isPresent()) {
String subID = subFirst.get().getId();
if (!TextUtils.isEmpty(subID)) {
data = data.toBuilder().setColor("#4CA6E2FF").build();
data = data.toBuilder().setColor("#36D3FE").build();
if (obuWarningTrafficData.containsKey(subID)) {
data = data.toBuilder()
.setColor(TrafficDataKt.threatLevelColor(obuWarningTrafficData.get(subID)))

View File

@@ -26,7 +26,7 @@ public class TrackObj {
private S2LatLng s2LatLng; //s2 经纬度
private double recentlyTime; //用于缓存帧数判断暂定缓存1秒数据中间如果有物体未出现1秒后删除
private double roadAngle; //道路航向
// private double headingDelta; //航向角德尔塔
// private double headingDelta; //航向角德尔塔
private int[] typeArray = new int[3];
private int typeWeight; //类型权重
private double lat;
@@ -175,10 +175,10 @@ public class TrackObj {
}
public boolean relativeStatic() {
if(speedAverage < LIMIT_SPEED){
Log.d("emArrow-Track","relativeStatic return" + " , uuid : " + cacheData.getUuid());
if (speedAverage < LIMIT_SPEED) {
// Log.d("emArrow-Track", "relativeStatic return" + " , uuid : " + cacheData.getUuid());
return true;
}else{
} else {
return isInRange();
}
}
@@ -193,8 +193,12 @@ public class TrackObj {
return false;
}
double dis = CoordinateUtils.calculateLineDistance(center[0], center[1], cacheData.getLongitude(), cacheData.getLatitude());
// Log.d("emArrow-Track", "uuid : " + cacheData.getUuid() + " , type : " + cacheData.getType() + " , list size : " + objQueueList.size() + " , dis : " + dis);
return dis < 0.3;
// Log.d("emArrow-Track", "uuid : " + cacheData.getUuid() + " , type : " + cacheData.getType() + " , list size : " + objQueueList.size() + " , dis : " + dis);
if (cacheData.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_BUS.getType() || cacheData.getType() == TrafficTypeEnum.TYPE_TRAFFIC_ID_TRUCK.getType()) {
return dis <= 0.8;
} else {
return dis <= 0.3;
}
}
public boolean isFourWheelType() {

View File

@@ -10,7 +10,7 @@ class RoadArrow {
private const val STRAIGHT_OR_U_TURN = 204 //直行转向
private const val TURN_LEFT = 205 //左转
private const val TURN_LEFT_OR_U_TURN = 206 //左转或转向
private const val TURN_RIGHT = 206 //右转
private const val TURN_RIGHT = 208 //右转
private const val TURN_LEFT_OR_RIGHT = 210 //左右转向
const val U_TURN = 211 //转向