fix: 修改停车检测根据卫星颗数导致隧道内不拍摄的问题,修改多线数据程序闪退的问题

This commit is contained in:
xiaoyan 2023-04-19 15:01:25 +08:00
parent 477f4981e8
commit ac2beb5370
3 changed files with 14 additions and 10 deletions

View File

@ -12,8 +12,8 @@ android {
applicationId "com.navinfo.outdoor"
minSdkVersion 24
targetSdkVersion 30
versionCode 51
versionName "8.230331-正式版"
versionCode 53
versionName "8.230419-正式版"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {

View File

@ -584,7 +584,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, "车辆静止中,暂停拍摄!");
return;
}
@ -748,13 +748,13 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
it -> {
String geometryStr = Geohash.getInstance().decode(it.getGeo());
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) {
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;
// 计算前两个点的坐标角度
// 获取当前数据的前两个点的方向
@ -775,8 +775,12 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
}
roadMatchEntity.setsPoint(lineString.getStartPoint().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)
}
if (sateliteCount<=3) { // 卫星颗数小于等于3说明当前卫星信号弱则忽略距离因素认为车辆在移动中
if (sateliteCount<3) { // 腾讯定位信号强度不是“强”,则忽略速度判定
return true
}