[RouterOpt]车前引导线拖尾问题优化2

This commit is contained in:
renwj
2022-04-11 18:05:29 +08:00
parent c946f7ca94
commit a0f0d3c2c8
9 changed files with 280 additions and 180 deletions

View File

@@ -141,7 +141,7 @@ public class IdentifyDataDrawer {
CallerLogger.INSTANCE.d(M_HMI + "arrow47", "uuid: " + data.getUuid() + " , 40~90差值范围 , 上一帧 : " + cacheData.getHeading() + " , 当前帧 : " + data.getHeading());
}
if (Math.abs(cacheData.getHeading() - data.getHeading()) > 90) {
int degree = DrivingDirectionUtils.getDegreeOfCar2Poi(cacheData.getLongitude(), cacheData.getLatitude(), data.getLongitude(), data.getLatitude(), Double.valueOf(cacheData.getHeading()).intValue());
double degree = DrivingDirectionUtils.getDegreeOfCar2Poi(cacheData.getLongitude(), cacheData.getLatitude(), data.getLongitude(), data.getLatitude(), cacheData.getHeading());
if (degree > 90) {
CallerLogger.INSTANCE.d(M_HMI + "arrow47", "uuid: " + data.getUuid() + " , 夹角 : " + degree + " , 修正 上一帧 : " + cacheData.getHeading() + " , 当前帧 : " + data.getHeading());
correctData = data.toBuilder().setHeading(cacheData.getHeading()).build();

View File

@@ -222,11 +222,9 @@ public class SmallMapDirectionView
double poiLon = pointLocal.longitude;
double poiLat = pointLocal.latitude;
float carAngle = carLocal.getBearing();
// 计算车辆与点之间的夹角
int diffAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
long diffAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
carLon, carLat, poiLon, poiLat, (int) carAngle);
return diffAngle <= 90;
}