weidong 11eecd8b54 1、增加告警功能
2、完善租户处理
3、增加测试数据和算法测试类
2023-11-12 00:38:07 +08:00

42 lines
1.4 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import java.io.IOException;
public class UBXTest {
public static void main(String[] args) throws Exception {
test();
}
public static void test() throws IOException {
//读取本地数据模拟
/* FileInputStream fileInputStream = new FileInputStream("2023-02-02-151826.txt");
int mSize = 0;
int temp;
List<Byte> mList = new ArrayList<>();
FocusCalculator focusCalculator = new FocusCalculator(150,null,null);
while ((temp = fileInputStream.read()) != -1){
mList.add((byte)temp); //添加数据
mSize++;
if (mList.size() >= 2 && mList.get(mSize - 2) == '\r' && mList.get(mSize - 1) == '\n') {
byte[] bytes = new byte[mList.size() - 2];
for (int i = 0; i < bytes.length; i++) {
bytes[i] = mList.get(i);
}
//提取得到b562数据
double[] doubles = UBXUtil.dataAnalysis(bytes,16);
//计算到单次相对位置xyz并记录
System.out.println(Arrays.toString(doubles));
focusCalculator.addXyz(doubles);
mList.clear();
mSize = 0;
}
}
//融合
double[] result = focusCalculator.resultB562(null);
if(result != null){
System.out.println("result"+ Arrays.toString(result));
}
fileInputStream.close();*/
}
}