修改b562解状态定义,和gnss模块定义保持一致
This commit is contained in:
parent
23f1c3d6f3
commit
3c6642accb
@ -60,8 +60,8 @@ public class FocusCalculator1 implements FocusCalculator{
|
||||
*/
|
||||
@Override
|
||||
public void addXyz(double[] xyz){
|
||||
if(xyz[3] == UBXUtil.NO_B562) counterNoB562++;
|
||||
else if(xyz[3] == UBXUtil.NO_FIX_RESULT) counterNoFixed++;
|
||||
if((int)xyz[3] == UBXUtil.NO_B562) counterNoB562++;
|
||||
else if((int)xyz[3] == UBXUtil.NO_FIX_RESULT) counterNoFixed++;
|
||||
else {
|
||||
counterFixedResult ++;
|
||||
if (filter(xyz)) {
|
||||
|
||||
@ -32,8 +32,8 @@ public class FocusCalculator2 implements FocusCalculator{
|
||||
*/
|
||||
@Override
|
||||
public void addXyz(double[] xyz){
|
||||
if(xyz[3] == UBXUtil.NO_B562) counterNoB562++;
|
||||
else if(xyz[3] == UBXUtil.NO_FIX_RESULT) counterNoFixed++;
|
||||
if((int)xyz[3] == UBXUtil.NO_B562) counterNoB562++;
|
||||
else if((int)xyz[3] == UBXUtil.NO_FIX_RESULT) counterNoFixed++;
|
||||
else {
|
||||
counterFixedResult ++;
|
||||
if (filter(xyz)) {
|
||||
|
||||
@ -14,9 +14,9 @@ public class UBXUtil {
|
||||
* @return x,y,z 东,北,竖直 东为正数,北为正数,朝上为正数
|
||||
*/
|
||||
|
||||
public static int FIX_RESULT = 0;
|
||||
public static int FIX_RESULT = 2;
|
||||
public static int NO_FIX_RESULT = 1;
|
||||
public static int NO_B562 = 2;
|
||||
public static int NO_B562 = 0;
|
||||
|
||||
public static double[] getLocation(ByteBuf data){
|
||||
boolean has_b562 = false;
|
||||
|
||||
@ -3,6 +3,7 @@ package com.imdroid.sideslope.service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.imdroid.secapi.dto.*;
|
||||
import com.imdroid.sideslope.bd.Tilt;
|
||||
import com.imdroid.sideslope.bd.UBXUtil;
|
||||
import com.imdroid.sideslope.message.D341LocationMessage;
|
||||
import com.imdroid.sideslope.util.NumberUtils;
|
||||
import org.slf4j.Logger;
|
||||
@ -176,7 +177,7 @@ public class GNSSDeviceLocationRecordServiceImpl implements GNSSDeviceLocationRe
|
||||
data.setYaw(tilt.getYaw());
|
||||
data.setShock(tilt.getShock());
|
||||
double[] b562_loc = message.getB562_loc();
|
||||
if(b562_loc!=null) {
|
||||
if((int)b562_loc[3] == UBXUtil.FIX_RESULT) {
|
||||
data.setB562e(b562_loc[0]);
|
||||
data.setB562n(b562_loc[1]);
|
||||
data.setB562d(b562_loc[2]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user