vr版本;侧方预警画线经纬度补点修改

This commit is contained in:
liujing
2021-04-15 20:17:16 +08:00
parent 1b1c70a6a1
commit 40f640a2c7
7 changed files with 12 additions and 10 deletions

1
.idea/gradle.xml generated
View File

@@ -91,7 +91,6 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -67,7 +67,7 @@ dependencies {
implementation project(':foudations:mogo-commons')
}
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.5.6'
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.5.7'
// implementation 'com.zhidaoauto.machine:map:1.0.0-vr-test-3.4'
}

View File

@@ -3,6 +3,6 @@
<gradient
android:angle="90"
android:endColor="#00F03232"
android:startColor="#A5F03232"
android:startColor="#7FF03232"
android:type="linear"></gradient>
</shape>

View File

@@ -3,6 +3,6 @@
<gradient
android:angle="0"
android:endColor="#00F03232"
android:startColor="#A5F03232"
android:startColor="#3FF03232"
android:type="linear"></gradient>
</shape>

View File

@@ -3,6 +3,6 @@
<gradient
android:angle="180"
android:endColor="#00F03232"
android:startColor="#A5F03232"
android:startColor="#3FF03232"
android:type="linear"></gradient>
</shape>

View File

@@ -3,6 +3,6 @@
<gradient
android:angle="270"
android:endColor="#00FF0606"
android:startColor="#8CFF0606"
android:startColor="#3FFF0606"
android:type="linear"></gradient>
</shape>

View File

@@ -256,7 +256,7 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
}
/**
* 绘制安全区域,自车与碰撞点之间的蓝色线
* 自车为起点绘制(根据设计,前方行人/弱势交通参与者预警 getDirection() == 1 自车与停止线之间为蓝色预警;其他侧方预警自车与预碰撞点之间显示红色预警)
*/
private void drawSlefCarLine(double lon, double lat, float bearing) {
if (!isSelfLineClear) {
@@ -266,13 +266,16 @@ public class MoGoV2XCloundDataManager implements IMoGoV2XCloundDataManager, IMog
MogoLatLng endLatlng = null;
MogoLatLng addMiddleLoc = null;
if (!isFirstLocation) {
//自车位置
startLatlng = new MogoLatLng(lat, lon);
carLocation = getMogoLat(new MogoLatLng(lat, lon));
endLatlng = new MogoLatLng(mCloundWarningInfo.getDirection() == 1 ? carLocation.lat : mCloundWarningInfo.getCollisionLat(),
mCloundWarningInfo.getDirection() == 1 ? carLocation.lon : mCloundWarningInfo.getCollisionLon());
endLatlng = new MogoLatLng(mCloundWarningInfo.getDirection() == 1 ? middleLocationInStopLine.lat : mCloundWarningInfo.getCollisionLat(),
mCloundWarningInfo.getDirection() == 1 ? middleLocationInStopLine.lon : mCloundWarningInfo.getCollisionLon());
float distance = CoordinateUtils.calculateLineDistance(startLatlng.lon, startLatlng.lat, endLatlng.lon, endLatlng.lat);
addMiddleLoc = Trigonometric.getNewLocation(startLatlng, distance / 2, mCloundWarningInfo.getAngle());
Log.d(V2XConst.LOG_NAME_WARN, "drawSlefCarLine lon = " + carLocation.lon + "---lat = " + carLocation.lat);
Log.d(TAG, "已自车为起点绘制 自车;" + startLatlng.lat + "," + startLatlng.lon +
"中间扩展点" + addMiddleLoc.lon + "," + addMiddleLoc.lat + "终点:" + endLatlng.lon + "," + endLatlng.lat);
isFirstLocation = true;
}
if (mogoPolyline != null) {