From eb0e0e9453ad50aa16683bf5e9fc425d349384b3 Mon Sep 17 00:00:00 2001 From: weidong Date: Sat, 17 Feb 2024 09:45:17 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=8E=BB=E6=8E=89=E6=9F=A5=E6=89=BE?= =?UTF-8?q?=E6=96=AD=E7=82=B9=E7=BB=AD=E4=BC=A0=E6=95=B0=E6=8D=AE=E4=B8=8D?= =?UTF-8?q?=E8=BF=9E=E7=BB=AD=E7=9A=84=E9=97=AE=E9=A2=98=E7=9A=84=E6=89=93?= =?UTF-8?q?=E5=8D=B0=EF=BC=8C=E9=97=AE=E9=A2=98=E6=98=AF=E5=9C=A8=E5=8D=95?= =?UTF-8?q?=E7=89=87=E6=9C=BA=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sideslope/calc/MultiLineGNSSCalcService.java | 15 ++++----------- .../executor/D342LocationMessageExecutor.java | 4 ++-- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/calc/MultiLineGNSSCalcService.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/calc/MultiLineGNSSCalcService.java index 2b31c8dd..b7d825af 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/calc/MultiLineGNSSCalcService.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/calc/MultiLineGNSSCalcService.java @@ -56,7 +56,7 @@ public class MultiLineGNSSCalcService { if (msgTime.isAfter(lastD342Time.createTime.plusMinutes(4))) { logger.info(deviceId + " d341 cycle done!"); // 计算上轮结果 - //calcService.calSingleDone(deviceId, d342Message.getTenantId(), lastD342Time.createTime); + calcService.calSingleDone(deviceId, d342Message.getTenantId(), lastD342Time.createTime); } } else{ @@ -79,15 +79,9 @@ public class MultiLineGNSSCalcService { lastD342Time.createTime = msgTime; lastD342Time.uploadTime = LocalDateTime.now(); - int i = 0; for(BaseMessage message: d342Message.getMessageList()){ - //D341LocationMessage d341Message = (D341LocationMessage)message; - //calcService.calcSingle(d341Message, false); - - // 查找序号不连续的问题 - i++; - if(i==1) logger.info("d342: 1st d341 seq {}", message.getSeq()); - else if(i==d341Count) logger.info("d342: {}th d341 seq {}",d341Count,message.getSeq()); + D341LocationMessage d341Message = (D341LocationMessage)message; + calcService.calcSingle(d341Message, false); } } else if(lastD342Time != null){ @@ -101,7 +95,7 @@ public class MultiLineGNSSCalcService { logger.info(deviceId + " d342 session done! "+lastDate); beidouClient.onGnssUploadComplete(deviceId,tenantId, lastDate); // 计算上轮结果 - //calcService.calSingleDone(deviceId, tenantId, lastDate); + calcService.calSingleDone(deviceId, tenantId, lastDate); // 重算最近的 lastDate = gnssCalcFilterService.updateRpos(deviceId,lastDate); // 记录转发表更新为upload done @@ -119,7 +113,6 @@ public class MultiLineGNSSCalcService { gnssStatus.setState(GnssStatus.STATE_IDLE); dataPersistService.updateDeviceState(gnssStatus); } - } void createFwdReord(D342LocationMessage d342Message){ diff --git a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D342LocationMessageExecutor.java b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D342LocationMessageExecutor.java index 82a2af67..cb07502e 100644 --- a/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D342LocationMessageExecutor.java +++ b/sec-beidou-rtcm/src/main/java/com/imdroid/sideslope/executor/D342LocationMessageExecutor.java @@ -36,13 +36,13 @@ public class D342LocationMessageExecutor implements Executor { + ThreadManager.getFixedThreadPool().submit(() -> { gnssCalcService.calc(message); if(message.getMessageList().size()==0){ dataPersistService.saveD342Stat(message, device); device.clearD342Stat(); } - //}); + }); return null; }