bug fixed: 参与平滑的记录时间判断有错

This commit is contained in:
weidong 2023-12-10 21:02:06 +08:00
parent 73cd9e9662
commit 29df3ebbfb

View File

@ -131,7 +131,7 @@ public class GNSSDeviceLocationRecordServiceImpl implements GNSSDeviceLocationRe
List<GnssCalcData> gnssDeviceLocationRecords = repository.selectList(query); List<GnssCalcData> gnssDeviceLocationRecords = repository.selectList(query);
LocalDateTime newRecordTime = newRecord.getCreatetime(); LocalDateTime newRecordTime = newRecord.getCreatetime();
LocalDateTime filterAfterTime = newRecordTime.plusHours(filterCycleHour); LocalDateTime filterAfterTime = newRecordTime.minusHours(filterCycleHour);
boolean hasCheck = false; boolean hasCheck = false;
if(gnssDeviceLocationRecords.size() > 0){ if(gnssDeviceLocationRecords.size() > 0){
// 求本组和最近recordNum组原始值的平均值 // 求本组和最近recordNum组原始值的平均值
@ -153,8 +153,8 @@ public class GNSSDeviceLocationRecordServiceImpl implements GNSSDeviceLocationRe
} }
hasCheck = true; hasCheck = true;
} }
// 超过平滑周期的不参与平滑计算 // 如果记录超过平滑周期的不参与平滑计算
if(newRecordTime.isAfter(filterAfterTime)) break; if(record.getCreatetime().isBefore(filterAfterTime)) break;
if (record.getEnabled()) {//只选取好点参与滤波 if (record.getEnabled()) {//只选取好点参与滤波
sumE += record.getB562e(); sumE += record.getB562e();
sumN += record.getB562n(); sumN += record.getB562n();