fix: 修改旧定位点获取不到的问题

This commit is contained in:
2022-12-13 11:29:47 +08:00
parent 2f5c8464b6
commit 4fe4322f46

View File

@@ -753,7 +753,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
.filter(it-> { .filter(it-> {
if (startMatchEnableDirection) { if (startMatchEnableDirection) {
double dataBearing = it.getAngle(); double dataBearing = it.getAngle();
if (currentBearing!=0&&(Math.abs(dataBearing-currentBearing)<=90 || Math.abs(dataBearing-currentBearing)>=270)) { if (Math.abs(dataBearing-currentBearing)<=90 || Math.abs(dataBearing-currentBearing)>=270) {
return true; return true;
} else { } else {
// 根据方向判定无法匹配 // 根据方向判定无法匹配
@@ -2088,8 +2088,8 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);//米 double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);//米
speed = (float) (geometry * 3600 / 1000); speed = (float) (geometry * 3600 / 1000);
} }
oldCurrentLocation = currentPoint;
} }
oldCurrentLocation = currentPoint;
speedAndBearing[0] = speed; speedAndBearing[0] = speed;
speedAndBearing[1] = bearing; speedAndBearing[1] = bearing;