feat: 新增 geoidSeparation 属性

- 用于判断博通大地水准面相对椭球面的高度是否非零
This commit is contained in:
yarnom 2025-10-27 15:43:57 +08:00
parent 7b63f24af5
commit 8bc91b3bac
3 changed files with 20 additions and 7 deletions

View File

@ -37,6 +37,11 @@ public class Gga {
private int quality=0; private int quality=0;
private int satellitesInUsed=0; private int satellitesInUsed=0;
/**
* 大地水准面相对椭球面的高度
*/
private double geoidSeparation = 0;
public Gga() { public Gga() {
} }
@ -94,8 +99,8 @@ public class Gga {
} }
} }
if(ggaStr != null){ if(ggaStr != null){
String[] params = ggaStr.split(",",11); String[] params = ggaStr.split(",", 14);
if(params.length == 11){ if(params.length >= 12){
Gga gga = new Gga(); Gga gga = new Gga();
try { try {
gga.setLatitude(transGGAPos(Double.parseDouble(params[2]))); gga.setLatitude(transGGAPos(Double.parseDouble(params[2])));
@ -103,6 +108,7 @@ public class Gga {
gga.setAltitude(Double.parseDouble(params[9])); gga.setAltitude(Double.parseDouble(params[9]));
gga.setQuality(Integer.parseInt(params[6])); gga.setQuality(Integer.parseInt(params[6]));
gga.setSatellitesInUsed(Integer.parseInt(params[7])); gga.setSatellitesInUsed(Integer.parseInt(params[7]));
gga.setGeoidSeparation(Double.parseDouble(params[11]));
return gga; return gga;
} }
catch (Exception e){ catch (Exception e){

View File

@ -116,10 +116,10 @@ public class D331RtcmMessageExecutor implements Executor<D331RtcmMessage, Void>
deviceBs.setLatitude(gga.getLatitude()); deviceBs.setLatitude(gga.getLatitude());
deviceBs.setLongitude(gga.getLongitude()); deviceBs.setLongitude(gga.getLongitude());
deviceBs.setAltitude(gga.getAltitude()); deviceBs.setAltitude(gga.getAltitude());
deviceBs.setGeoidSeparation(gga.getGeoidSeparation());
} }
// 添加NTRIP处理 // 添加NTRIP处理
if(deviceBs.getForwardToNtrip()) { if(deviceBs.getForwardToNtrip()) {
byte[] srcdata = message.getSrcData(); byte[] srcdata = message.getSrcData();
String rtcm = ByteUtil.bytesToHexString(srcdata); String rtcm = ByteUtil.bytesToHexString(srcdata);

View File

@ -62,6 +62,12 @@ public class Device {
Double latitude; Double latitude;
Double longitude; Double longitude;
Double altitude; Double altitude;
// 大地水准面相对椭球面的高度差
// 博通 GGA 此处可能非零影响 RTK 运算故需通过此属性判断
Double geoidSeparation = 0.0;
Double ecefx; Double ecefx;
Double ecefy; Double ecefy;
Double ecefz; Double ecefz;
@ -69,6 +75,7 @@ public class Device {
Double iPose; Double iPose;
Double iPosn; Double iPosn;
Double iPosd; Double iPosd;
private BigDecimal remaining; private BigDecimal remaining;
private BigDecimal total; private BigDecimal total;
private BigDecimal used; private BigDecimal used;
@ -78,10 +85,10 @@ public class Device {
LocalDateTime lastD3f2Time; LocalDateTime lastD3f2Time;
short noFixedAndFloatResult=0; short noFixedAndFloatResult=0;
// 日志记录控制
Short loggingmode; Short loggingmode;// 日志记录控制
// NtripCaster 推送控制 Boolean forwardToNtrip = false;// NtripCaster 推送控制
Boolean forwardToNtrip = false;
int lastRxHead = 0; int lastRxHead = 0;
int fixedNum = 0; int fixedNum = 0;