note the car color code
This commit is contained in:
@@ -209,35 +209,35 @@ class BaseDrawer {
|
||||
*/
|
||||
protected String getModelRenderColor(int type, int fromType, double speed, double lon, double lat, double angle) {
|
||||
|
||||
AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom(type);
|
||||
if (recognizedType == AdasRecognizedType.classIdUnKnow) {
|
||||
return Car3DModelColor.Normal.color;
|
||||
}
|
||||
// AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom(type);
|
||||
// if (recognizedType == AdasRecognizedType.classIdUnKnow) {
|
||||
// return Car3DModelColor.Normal.color;
|
||||
// }
|
||||
// 距离策略 todo 此处两种策略是临时方案
|
||||
double[] coordinates = getCurCoordinates();
|
||||
double distance = CoordinateUtils.calculateLineDistance(lon, lat, coordinates[0], coordinates[1]) * 100;
|
||||
if (distance < 15) {
|
||||
return Car3DModelColor.Dangerous.color; // todo 方案1
|
||||
// return Car3DTestModelColor.getTestModelColor(fromType, Waring_Dangerous); // todo 方案2
|
||||
} else if (distance < 50 && distance >= 15) {
|
||||
return Car3DModelColor.Warming.color; // todo 方案1
|
||||
// return Car3DTestModelColor.getTestModelColor(fromType, Waring_Close); // todo 方案2
|
||||
}
|
||||
// double[] coordinates = getCurCoordinates();
|
||||
// double distance = CoordinateUtils.calculateLineDistance(lon, lat, coordinates[0], coordinates[1]) * 100;
|
||||
// if (distance < 15) {
|
||||
// return Car3DModelColor.Dangerous.color; // todo 方案1
|
||||
//// return Car3DTestModelColor.getTestModelColor(fromType, Waring_Dangerous); // todo 方案2
|
||||
// } else if (distance < 50 && distance >= 15) {
|
||||
// return Car3DModelColor.Warming.color; // todo 方案1
|
||||
//// return Car3DTestModelColor.getTestModelColor(fromType, Waring_Close); // todo 方案2
|
||||
// }
|
||||
|
||||
// 他车车速和自车车速对比速度策略
|
||||
// 自车速度 >= 50% 危险
|
||||
// 10% < 自车速度 < 50% 警告
|
||||
double curSpeed = getCurSpeed();
|
||||
if (curSpeed > 0 && speed > curSpeed) {
|
||||
double rate = ((speed - curSpeed) / curSpeed) * 100;
|
||||
if (rate >= 50) {
|
||||
return Car3DModelColor.Dangerous.color; // todo 方案1
|
||||
// return Car3DTestModelColor.getTestModelColor(fromType, Waring_Dangerous); // todo 方案2
|
||||
} else if (rate > 10 && rate < 50) {
|
||||
return Car3DModelColor.Warming.color; // todo 方案1
|
||||
// return Car3DTestModelColor.getTestModelColor(fromType, Waring_Close); // todo 方案2
|
||||
}
|
||||
}
|
||||
// double curSpeed = getCurSpeed();
|
||||
// if (curSpeed > 0 && speed > curSpeed) {
|
||||
// double rate = ((speed - curSpeed) / curSpeed) * 100;
|
||||
// if (rate >= 50) {
|
||||
// return Car3DModelColor.Dangerous.color; // todo 方案1
|
||||
//// return Car3DTestModelColor.getTestModelColor(fromType, Waring_Dangerous); // todo 方案2
|
||||
// } else if (rate > 10 && rate < 50) {
|
||||
// return Car3DModelColor.Warming.color; // todo 方案1
|
||||
//// return Car3DTestModelColor.getTestModelColor(fromType, Waring_Close); // todo 方案2
|
||||
// }
|
||||
// }
|
||||
|
||||
// 默认颜色 // todo 方案1
|
||||
// switch (fromType) {
|
||||
|
||||
Reference in New Issue
Block a user