merge: master into feature/beidou
This commit is contained in:
commit
a2ec4bab66
@ -6,7 +6,6 @@ import com.github.yulichang.base.MPJBaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@Mapper
|
||||
public interface GnssSingleDataMapper extends MPJBaseMapper<GnssSingleData> {
|
||||
Page<GnssSingleData> queryByDeviceId(@Param("page") IPage page, @Param("deviceId") String deviceId,
|
||||
|
||||
@ -122,27 +122,21 @@ public class SingleLineGNSSCalcService implements GNSSDataCalcService {
|
||||
|
||||
// 读取惯导
|
||||
Tilt tilt = message.getTilt();
|
||||
|
||||
if(tilt != null) {
|
||||
focusCalculator.addTilt(tilt);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("测站{}惯导单次解析结果:{}", deviceId,tilt);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 延迟
|
||||
focusCalculator.addDelayMs(message.getPps());
|
||||
|
||||
|
||||
|
||||
// 单次b562
|
||||
double[] doubles = message.getB562_loc();//unit: mm
|
||||
if(doubles !=null) {
|
||||
focusCalculator.addXyz(doubles, message.getCreateTime());
|
||||
logger.info("测站{}的b562单次解析结果:{}", deviceId,Arrays.toString(doubles));
|
||||
|
||||
}
|
||||
|
||||
// 单次GGA
|
||||
@ -151,21 +145,19 @@ public class SingleLineGNSSCalcService implements GNSSDataCalcService {
|
||||
focusCalculator.addGGA(gga);
|
||||
logger.info("测站{}的gga单次解析结果:{},{},{},{}",deviceId,
|
||||
gga.getLongitude(), gga.getLatitude(), gga.getAltitude(), gga.getQuality());
|
||||
|
||||
|
||||
if(groupCalc.getVer() == 7 && focusCalculator.isJump()){
|
||||
logger.info("{}发生周跳",deviceId);
|
||||
hardResetDevice(deviceId);
|
||||
}
|
||||
}
|
||||
|
||||
// 保存单次解析的原始数据,受 loggingmode 字段控制
|
||||
GnssSingleData gnssSingleData = new GnssSingleData();
|
||||
gnssSingleData.setDeviceid(device.getDeviceId());
|
||||
gnssSingleData.setCreatetime(LocalDateTime.now());
|
||||
gnssSingleData.setModel(device.getModel());
|
||||
// 若是该设备开启了日志记录,则保存单次解析的数据
|
||||
if(device.getLoggingmode() == GnssDevice.LOGGING_MODE_FULL){
|
||||
// 保存单次解析的原始数据,受 loggingmode 字段控制
|
||||
GnssSingleData gnssSingleData = new GnssSingleData();
|
||||
gnssSingleData.setDeviceid(device.getDeviceId());
|
||||
gnssSingleData.setCreatetime(LocalDateTime.now());
|
||||
gnssSingleData.setModel(device.getModel());
|
||||
if((device.getModel() == GnssDevice.MODEL_G505) && (doubles !=null)){
|
||||
gnssSingleData.setX(doubles[0]);
|
||||
gnssSingleData.setY(doubles[1]);
|
||||
@ -188,15 +180,15 @@ public class SingleLineGNSSCalcService implements GNSSDataCalcService {
|
||||
|
||||
@Override
|
||||
public void calSingleDone(Device device, GnssGroupCalc groupCalc, LocalDateTime resultTime) {
|
||||
// executor已经在线程处理了
|
||||
/* ThreadManager.getScheduledThreadPool().schedule(() -> {
|
||||
try {
|
||||
calCycleResult(device, groupCalc, resultTime);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString());
|
||||
}
|
||||
},50, TimeUnit.MILLISECONDS);
|
||||
*/
|
||||
ScheduledFuture<?> future = timerMap.get(device.getDeviceId());
|
||||
if (future != null && !future.isDone()) {
|
||||
future.cancel(true);
|
||||
future = null;
|
||||
}
|
||||
if(null == groupCalc){
|
||||
groupCalc = getGroupCalc(device.getCalcGroupId());
|
||||
if(groupCalc == null) return;
|
||||
}
|
||||
calCycleResult(device, groupCalc, resultTime);
|
||||
}
|
||||
|
||||
@ -216,7 +208,7 @@ public class SingleLineGNSSCalcService implements GNSSDataCalcService {
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString());
|
||||
}
|
||||
},30, TimeUnit.SECONDS);
|
||||
},90, TimeUnit.SECONDS);
|
||||
timerMap.put(device.getDeviceId(), future);
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import com.imdroid.common.util.DataTypeUtil;
|
||||
import com.imdroid.common.util.ThreadManager;
|
||||
import com.imdroid.secapi.client.BeidouClient;
|
||||
import com.imdroid.secapi.dto.GnssTrxMsg;
|
||||
import com.imdroid.sideslope.calc.GNSSDataCalcService;
|
||||
import com.imdroid.sideslope.calc.MultiLineGNSSCalcService;
|
||||
import com.imdroid.sideslope.message.D3F2StopIndicationMessage;
|
||||
import com.imdroid.sideslope.sal.Device;
|
||||
@ -36,6 +37,8 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
|
||||
@Autowired
|
||||
private BeidouClient beidouClient;
|
||||
@Autowired
|
||||
private GNSSDataCalcService gnssCalcService;
|
||||
@Autowired
|
||||
MultiLineGNSSCalcService multiLineGNSSCalcService;
|
||||
@Autowired
|
||||
WarningService warningService;
|
||||
@ -91,6 +94,8 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
|
||||
else{
|
||||
warningService.checkB562Num(device);
|
||||
}
|
||||
// 开始周期解算
|
||||
gnssCalcService.calSingleDone(device, null, message.getCreateTime());
|
||||
});
|
||||
|
||||
return null;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.imdroid.sideslope.server.tcp;
|
||||
|
||||
import com.imdroid.common.util.DataTypeUtil;
|
||||
import com.imdroid.sideslope.executor.BizExecutors;
|
||||
import com.imdroid.sideslope.executor.MessageParser;
|
||||
import com.imdroid.sideslope.message.BaseMessage;
|
||||
@ -19,13 +18,11 @@ public class RtcmTcpHandler extends SimpleChannelInboundHandler<ByteBuf> {
|
||||
private final Logger logger = LoggerFactory.getLogger(RtcmTcpServer.class);
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, ByteBuf src) throws Exception{
|
||||
if (logger.isDebugEnabled()) {
|
||||
/*if (logger.isDebugEnabled()) {
|
||||
byte[] data = new byte[src.readableBytes()];
|
||||
src.getBytes(0, data);
|
||||
// 为减轻服务器压力,服务器的日志记录等级为 INFO
|
||||
// 此处的 debug 信息用于调试
|
||||
// logger.debug("receive message:" + DataTypeUtil.getHexString(data));
|
||||
}
|
||||
logger.debug("receive message:" + DataTypeUtil.getHexString(data));
|
||||
}*/
|
||||
try {
|
||||
BaseMessage message = MessageParser.instance.parse(src);
|
||||
OnlineChannels.INSTANCE.updateConfigChannel(message.getId(), ctx.channel(), null);
|
||||
|
||||
@ -20,9 +20,6 @@ public class GnssSingleBufferServiceImpl implements GnssSingleBufferService {
|
||||
// 资源锁
|
||||
private final Object lock = new Object();
|
||||
|
||||
@Autowired
|
||||
private GnssSingleDataMapper gnssDataMapper;
|
||||
|
||||
@Autowired
|
||||
private GnssSingleDataMapper gnssSingleDataMapper;
|
||||
|
||||
|
||||
@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.imdroid.beidou.service.CommonExcelService;
|
||||
import com.imdroid.secapi.dto.GnssCalcData;
|
||||
import com.imdroid.secapi.dto.GnssCalcDataMapper;
|
||||
import com.imdroid.secapi.dto.GnssSingleData;
|
||||
import com.imdroid.secapi.dto.GnssSingleDataMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@ -35,9 +35,11 @@
|
||||
<div class="layui-input-inline">
|
||||
<select name="type" lay-filter="type">
|
||||
<option value="0">GNSS</option>
|
||||
<option value="1">DTU</option>
|
||||
<option value="10">DTU</option>
|
||||
<option value="2">MPU</option>
|
||||
<option value="11">DTU2</option>
|
||||
<option value="3">DEBUG</option>
|
||||
<option value="16">V3.2 DEBUG</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.imdroid.common.util;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.*;
|
||||
import java.time.LocalDateTime;
|
||||
@ -13,7 +11,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class WarningLogExecutor {
|
||||
|
||||
private String logDirectory;
|
||||
private final String logDirectory;
|
||||
private final ExecutorService executor;
|
||||
// 记录已初始化的文件
|
||||
private final ConcurrentHashMap<String, Boolean> initializedFiles = new ConcurrentHashMap<>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user