From 29df3ebbfb69221d2bb3b5a040ad32a9b35e1e10 Mon Sep 17 00:00:00 2001 From: weidong Date: Sun, 10 Dec 2023 21:02:06 +0800 Subject: [PATCH] =?UTF-8?q?bug=20fixed:=20=E5=8F=82=E4=B8=8E=E5=B9=B3?= =?UTF-8?q?=E6=BB=91=E7=9A=84=E8=AE=B0=E5=BD=95=E6=97=B6=E9=97=B4=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=9C=89=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/GNSSDeviceLocationRecordServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/GNSSDeviceLocationRecordServiceImpl.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/GNSSDeviceLocationRecordServiceImpl.java index 03d03d98..cc3650fb 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/GNSSDeviceLocationRecordServiceImpl.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/service/GNSSDeviceLocationRecordServiceImpl.java @@ -131,7 +131,7 @@ public class GNSSDeviceLocationRecordServiceImpl implements GNSSDeviceLocationRe List gnssDeviceLocationRecords = repository.selectList(query); LocalDateTime newRecordTime = newRecord.getCreatetime(); - LocalDateTime filterAfterTime = newRecordTime.plusHours(filterCycleHour); + LocalDateTime filterAfterTime = newRecordTime.minusHours(filterCycleHour); boolean hasCheck = false; if(gnssDeviceLocationRecords.size() > 0){ // 求本组和最近recordNum组原始值的平均值 @@ -153,8 +153,8 @@ public class GNSSDeviceLocationRecordServiceImpl implements GNSSDeviceLocationRe } hasCheck = true; } - // 超过平滑周期的不参与平滑计算 - if(newRecordTime.isAfter(filterAfterTime)) break; + // 如果记录超过平滑周期的不参与平滑计算 + if(record.getCreatetime().isBefore(filterAfterTime)) break; if (record.getEnabled()) {//只选取好点参与滤波 sumE += record.getB562e(); sumN += record.getB562n();