fix: 合并主线代码

This commit is contained in:
2023-04-19 15:23:31 +08:00
3 changed files with 13 additions and 9 deletions

View File

@@ -37,7 +37,7 @@ android {
applicationId "com.navinfo.outdoor" applicationId "com.navinfo.outdoor"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 30 targetSdkVersion 30
versionCode 52 versionCode 54
versionName "8.230418-正式环境-测试版" versionName "8.230418-正式环境-测试版"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -583,7 +583,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
// 道路任务增加检查 // 道路任务增加检查
// 检测到当前车辆未移动,则无需进行拍摄 // 检测到当前车辆未移动,则无需进行拍摄
if (!speedCheck.checkIsMove(LocationLifeCycle.getInstance().getMainLocation(), GPSUtils.getInstance(AutoTakePictureActivity.this).getSateliteCount())) { if (!speedCheck.checkIsMove(LocationLifeCycle.getInstance().getMainLocation(), LocationLifeCycle.getInstance().getTencentLocation().getGPSRssi())) {
com.github.lazylibrary.util.ToastUtils.showToast(AutoTakePictureActivity.this, "车辆静止中,暂停拍摄!"); com.github.lazylibrary.util.ToastUtils.showToast(AutoTakePictureActivity.this, "车辆静止中,暂停拍摄!");
return; return;
} }
@@ -747,13 +747,13 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
it -> { it -> {
String geometryStr = Geohash.getInstance().decode(it.getGeo()); String geometryStr = Geohash.getInstance().decode(it.getGeo());
Geometry geometry = GeometryTools.createGeometry(geometryStr); Geometry geometry = GeometryTools.createGeometry(geometryStr);
RoadMatchEntity roadMatchEntity = new RoadMatchEntity();
roadMatchEntity.setId(it.getId());
roadMatchEntity.setDataDetail(it);
roadMatchEntity.setGeometry((LineString) geometry);
// roadMatchEntity.setBuffer(geometry.buffer(MATCH_BUFFER_DISTANCE).toString());
// 实时设置当前任务的起始角度 // 实时设置当前任务的起始角度
if (geometry instanceof LineString) { if (geometry instanceof LineString) {
RoadMatchEntity roadMatchEntity = new RoadMatchEntity();
roadMatchEntity.setId(it.getId());
roadMatchEntity.setDataDetail(it);
roadMatchEntity.setGeometry((LineString) geometry);
// roadMatchEntity.setBuffer(geometry.buffer(MATCH_BUFFER_DISTANCE).toString());
LineString lineString = (LineString) geometry; LineString lineString = (LineString) geometry;
// 计算前两个点的坐标角度 // 计算前两个点的坐标角度
// 获取当前数据的前两个点的方向 // 获取当前数据的前两个点的方向
@@ -774,8 +774,12 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
} }
roadMatchEntity.setsPoint(lineString.getStartPoint().toString()); roadMatchEntity.setsPoint(lineString.getStartPoint().toString());
roadMatchEntity.setePoint(lineString.getEndPoint().toString()); roadMatchEntity.setePoint(lineString.getEndPoint().toString());
roadLinkEntityList.add(roadMatchEntity);
} else {
com.github.lazylibrary.util.ToastUtils.showToast(AutoTakePictureActivity.this, "当前界面存在多线任务,已自动过滤!");
systemTTS.playText("存在多线任务!");
XLog.e("存在多线任务:"+it.getId()+"-"+it.getName());
} }
roadLinkEntityList.add(roadMatchEntity);
} }
); );
// 如果当前自动规划打开且没有正在匹配的任务,自动规划下一条最近的任务 // 如果当前自动规划打开且没有正在匹配的任务,自动规划下一条最近的任务

View File

@@ -19,7 +19,7 @@ class PicturesSpeedCheck {
pointList.removeAt(0) pointList.removeAt(0)
} }
if (sateliteCount<=3) { // 卫星颗数小于等于3说明当前卫星信号弱则忽略距离因素认为车辆在移动中 if (sateliteCount<3) { // 腾讯定位信号强度不是“强”,则忽略速度判定
return true return true
} }