1、d3f2其它信息显示上个周期角度最大最小值
2、振动用第2个传感器数据
This commit is contained in:
parent
b04ec862b2
commit
ab0bd9943c
@ -7,6 +7,7 @@ import com.imdroid.secapi.dto.GnssDevice;
|
||||
import com.imdroid.common.util.ByteUtil;
|
||||
import com.imdroid.sideslope.bd.Gga;
|
||||
import com.imdroid.sideslope.bd.Rtcm1005;
|
||||
import com.imdroid.sideslope.bd.Tilt;
|
||||
import com.imdroid.sideslope.calc.GNSSDataCalcService;
|
||||
import com.imdroid.sideslope.message.D331RtcmMessage;
|
||||
import com.imdroid.sideslope.ntrip.UdpNtripServer;
|
||||
@ -117,6 +118,11 @@ public class D331RtcmMessageExecutor implements Executor<D331RtcmMessage, Void>
|
||||
deviceBs.setLongitude(gga.getLongitude());
|
||||
deviceBs.setAltitude(gga.getAltitude());
|
||||
}
|
||||
// update angles
|
||||
Tilt tilt = message.getTilt();
|
||||
if(tilt!=null){
|
||||
deviceBs.updateMinMaxAngle(tilt.getRoll(),tilt.getPitch());
|
||||
}
|
||||
|
||||
// 添加NTRIP处理
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import com.imdroid.common.util.ThreadManager;
|
||||
import com.imdroid.secapi.client.BeidouClient;
|
||||
import com.imdroid.secapi.dto.GnssDevice;
|
||||
import com.imdroid.sideslope.bd.Gga;
|
||||
import com.imdroid.sideslope.bd.Tilt;
|
||||
import com.imdroid.sideslope.calc.GNSSDataCalcService;
|
||||
import com.imdroid.sideslope.message.D341LocationMessage;
|
||||
import com.imdroid.sideslope.service.Device;
|
||||
@ -78,6 +79,10 @@ public class D341LocationMessageExecutor implements Executor<D341LocationMessage
|
||||
double[] pos = message.getB562_loc();
|
||||
device.updateCalcQuality((int) pos[3]);
|
||||
}
|
||||
Tilt tilt = message.getTilt();
|
||||
if(tilt!=null){
|
||||
device.updateMinMaxAngle(tilt.getRoll(),tilt.getPitch());
|
||||
}
|
||||
|
||||
Gga gga = message.getGga();
|
||||
if(gga != null) {
|
||||
|
||||
@ -60,6 +60,14 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
|
||||
message.setOtherInfo(message.getOtherInfo() + ",valid calc:" + device.getLastValidCalcDataTime());
|
||||
}
|
||||
}
|
||||
if(device.getMinAngleX()!=null){
|
||||
message.setOtherInfo(String.format("%s,303(%.2f,%.2f,%.2f,%.2f)",
|
||||
message.getOtherInfo(),
|
||||
device.getMinAngleX(),
|
||||
device.getMaxAngleX(),
|
||||
device.getMinAngleY(),
|
||||
device.getMaxAngleY()));
|
||||
}
|
||||
//更新统计
|
||||
device.updateRx(message.getHeader(), message.getLen(),1);
|
||||
GnssTrxMsg gnssTrxMsg = message.getTrxMsg();
|
||||
|
||||
@ -93,6 +93,11 @@ public class Device {
|
||||
byte dataChannelType = CHANNEL_TYPE_UDP; // 0:TCP;1:DUP
|
||||
int lasQuality = 0;
|
||||
|
||||
Double minAngleX;
|
||||
Double maxAngleX;
|
||||
Double minAngleY;
|
||||
Double maxAngleY;
|
||||
|
||||
public void updateRx(int head, int bytes,int count){
|
||||
lastRxHead = head;
|
||||
|
||||
@ -155,6 +160,11 @@ public class Device {
|
||||
fixedNum = 0;
|
||||
floatNum = 0;
|
||||
jumpCount = 0;
|
||||
|
||||
minAngleX=null;
|
||||
minAngleY=null;
|
||||
maxAngleX=null;
|
||||
maxAngleY=null;
|
||||
}
|
||||
|
||||
public void clearD342Stat(){
|
||||
@ -169,4 +179,24 @@ public class Device {
|
||||
abnormalD341Num = 0;
|
||||
}
|
||||
|
||||
public void updateMinMaxAngle(double x, double y){
|
||||
if(minAngleX == null || maxAngleX == null){
|
||||
minAngleX = x;
|
||||
maxAngleX = x;
|
||||
}
|
||||
else{
|
||||
if(x<minAngleX) minAngleX = x;
|
||||
if(x>maxAngleX) maxAngleX = x;
|
||||
}
|
||||
|
||||
if(minAngleY == null || maxAngleY == null){
|
||||
minAngleY = y;
|
||||
maxAngleY = y;
|
||||
}
|
||||
else{
|
||||
if(y<minAngleY) minAngleY = y;
|
||||
if(y>maxAngleY) maxAngleY = y;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -122,9 +122,11 @@ public class D350SurfaceInclineMessageExecutor implements Executor<D350SurfaceIn
|
||||
if (device.sensorNum == 2) {
|
||||
if (data.getSensorid()==1) device.data1 = data;
|
||||
else {
|
||||
data1.setAngley(data.getAnglex());
|
||||
data1.setAccy(data.getAccx());
|
||||
dataForwarder.send(device.device, data1);
|
||||
data.setAngley(data.getAnglex());
|
||||
data.setAnglex(data1.getAnglex());
|
||||
//data1.setAngley(data.getAnglex());
|
||||
//data1.setAccy(data.getAccx());
|
||||
dataForwarder.send(device.device, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user