模拟数据判断条件
This commit is contained in:
@@ -33,6 +33,7 @@ import java.util.List;
|
||||
|
||||
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
|
||||
import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
|
||||
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_TOP;
|
||||
import static com.mogo.module.v2x.V2XServiceManager.getContext;
|
||||
|
||||
/**
|
||||
@@ -86,7 +87,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
|
||||
isSelfLineClear = false;
|
||||
isFirstLocation = false;
|
||||
V2XServiceManager.getMarkerManager().removeMarkers(WARNING_ARROWS);
|
||||
if (cloundWarningInfo.getDirection() == 1) { //前方 TODO
|
||||
if (cloundWarningInfo.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP) { //前方 TODO
|
||||
middleLocationInStopLine = getMiddleLocationInStopLine();
|
||||
MogoLatLng warningLocation = Trigonometric.getNewLocation(middleLocationInStopLine, 50, cloundWarningInfo.getAngle());
|
||||
//停止线前方画线
|
||||
@@ -275,7 +276,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
|
||||
}
|
||||
|
||||
/**
|
||||
* 自车为起点绘制(根据设计,前方行人/弱势交通参与者预警 getDirection() == 1 自车与停止线之间为蓝色预警;其他侧方预警自车与预碰撞点之间显示红色预警)
|
||||
* 自车为起点绘制(根据设计,前方行人/弱势交通参与者预警 getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP自车与停止线之间为蓝色预警;其他侧方预警自车与预碰撞点之间显示红色预警)
|
||||
*/
|
||||
private void drawSlefCarLine(double lon, double lat, float bearing) {
|
||||
if (!isSelfLineClear) {
|
||||
@@ -291,8 +292,8 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
|
||||
}
|
||||
|
||||
//自车位置
|
||||
endLatlng = new MogoLatLng(mCloundWarningInfo.getDirection() == 1 ? middleLocationInStopLine.lat : mCloundWarningInfo.getCollisionLat(),
|
||||
mCloundWarningInfo.getDirection() == 1 ? middleLocationInStopLine.lon : mCloundWarningInfo.getCollisionLon());
|
||||
endLatlng = new MogoLatLng(mCloundWarningInfo.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP ? middleLocationInStopLine.lat : mCloundWarningInfo.getCollisionLat(),
|
||||
mCloundWarningInfo.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP ? middleLocationInStopLine.lon : mCloundWarningInfo.getCollisionLon());
|
||||
startLatlng = new MogoLatLng(lat, lon);
|
||||
float distance = CoordinateUtils.calculateLineDistance(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat);
|
||||
addMiddleLoc = Trigonometric.getNewLocation(startLatlng, distance / 2, Trigonometric.getAngle(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat));
|
||||
|
||||
@@ -19,6 +19,8 @@ import com.mogo.realtime.entity.ADASRecognizedResult;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_TOP;
|
||||
|
||||
/**
|
||||
* 当前车辆与道路事件的连接线
|
||||
*/
|
||||
@@ -42,7 +44,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
||||
MogoPolylineOptions options = new MogoPolylineOptions();
|
||||
List<Integer> colors = new ArrayList<>();
|
||||
|
||||
if (info.getDirection() == 1) {
|
||||
if (info.getDirection() == ALERT_THE_FRONT_CRASH_WARNING_TOP) {
|
||||
colors.add(0x0D3036FF);
|
||||
colors.add(0xD93036FF);
|
||||
colors.add(0x0D3036FF);
|
||||
|
||||
Reference in New Issue
Block a user