fix: 尝试修复断联问题

This commit is contained in:
yarnom 2025-10-28 16:00:46 +08:00
parent 11ef555eea
commit 9e110d1218

View File

@ -122,21 +122,14 @@ public class D331RtcmMessageExecutor implements Executor<D331RtcmMessage, Void>
deviceBs.setGeoidSeparation(gga.getGeoidSeparation());
}
// 添加NTRIP处理 + rtkCluster 推送
// 添加NTRIP处理
if(deviceBs.getForwardToNtrip()) {
byte[] srcdata = message.getSrcData();
String hex = ByteUtil.bytesToHexString(srcdata);
// 1) NTRIP发送提取后的 RTCM
sendToNtrip(id, hex);
String rtcm = ByteUtil.bytesToHexString(srcdata);
sendToNtrip(id, rtcm);
// 2) rtkCluster优先发送干净的 RTCM 去除任何封装退化时发送原始数据
try {
String rtcmsHex = RtcmGgaUtil.getRtcms(hex).toString();
if (rtcmsHex != null && !rtcmsHex.isEmpty()) {
rtkClusterService.sendRtcmBytes(id, ByteUtil.hexStringTobyte(rtcmsHex));
} else {
rtkClusterService.sendRtcmBytes(id, srcdata);
}
rtkClusterService.sendRtcm(id, rtcm);
} catch (Exception e) {
logger.debug("send to rtkCluster failed for {}: {}", id, e.getMessage());
}