1、基站GGA如果和d300分开上报,是有可能上报d341消息,因此在d341消息处理里要区分设备类型

This commit is contained in:
weidong 2025-03-25 23:03:14 +08:00
parent fb1b89933f
commit 9dce80fc67

View File

@ -84,7 +84,7 @@ public class D341LocationMessageExecutor implements Executor<D341LocationMessage
Gga gga = message.getGga();
if(gga != null) {
device.updateSatelitesNum(gga.getSatellitesInUsed());
if(gga.isFixed()) {
if(gga.isFixed() || device.getDeviceType() == Device.DEVICE_BASE_STATION) {
device.setLatitude(gga.getLatitude());
device.setLongitude(gga.getLongitude());
device.setAltitude(gga.getAltitude());
@ -94,10 +94,11 @@ public class D341LocationMessageExecutor implements Executor<D341LocationMessage
}
}
if(device.getDeviceType() == Device.DEVICE_ROVER) {
ThreadManager.getFixedThreadPool().submit(() -> {
gnssCalcService.calcSingle(message,true);
gnssCalcService.calcSingle(message, true);
// 原始码流输出到日志文件 -- INFO 级别
if(device.getLoggingmode() == GnssDevice.LOGGING_MODE_FULL){
if (device.getLoggingmode() == GnssDevice.LOGGING_MODE_FULL) {
logger.info("receive {} d341 message: {}", message.getId(), DataTypeUtil.getHexString(message.getSrcData()));
}
/*else {
@ -108,6 +109,7 @@ public class D341LocationMessageExecutor implements Executor<D341LocationMessage
}
}*/
});
}
return null;
}