波形解析的电流一次值转二次值调整

This commit is contained in:
2026-04-15 10:20:48 +08:00
parent 59f2588488
commit 232e84aad3
2 changed files with 131 additions and 143 deletions

View File

@@ -26,8 +26,6 @@ import java.util.*;
public class AnalyWave {
/*****************************************
* 解析comtrate文件工具类
* author yexb根据Ww算法装换
@@ -297,8 +295,6 @@ public class AnalyWave {
strBinType = iterable.next().toUpperCase();
} catch (Exception e) {
e.printStackTrace();
logger.error("读取文件内容出错" + e.getMessage());
@@ -306,7 +302,6 @@ public class AnalyWave {
} finally {
}
return true;
}
@@ -319,15 +314,8 @@ public class AnalyWave {
private List<List<Float>> AnalyseComtradeDat(byte[] array, int iFlag) {
float xValueAll = 0;//初始化xValue的值
boolean blxValue = false;//判断是否首次登陆
List<List<Float>> listWaveData = new ArrayList<>();//返回数据
try {
// 计算每个单独的数据块的大小 4字节的序号 4字节的时间 2字节的值
// 示例中的排布是 4字节的序号 4字节的时间 UA(2字节) UB(2字节) UC(2字节) IA(2字节) IB(2字节)
// IC(2字节)
@@ -470,7 +458,7 @@ public class AnalyWave {
{
if (ComtradeCfg.OneChannleCfg.get(j).fPrimary != 0.0f)//根据cfg内的变比将一次值转换成二次值
{
fValue = ComtradeCfg.OneChannleCfg.get(j).fSecondary / ComtradeCfg.OneChannleCfg.get(j).fPrimary;
fValue = fValue * ComtradeCfg.OneChannleCfg.get(j).fSecondary / ComtradeCfg.OneChannleCfg.get(j).fPrimary;
} else {
fValue = fValue;
}

View File

@@ -641,7 +641,7 @@ public class WaveFileComponent {
{
//根据cfg内的变比将一次值转换成二次值
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
fValue = comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
fValue = fValue * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
} else {
fValue = fValue;
}
@@ -724,7 +724,7 @@ public class WaveFileComponent {
{
//根据cfg内的变比将一次值转换成二次值
if (comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary() != 0.0f) {
fValue = comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
fValue = fValue * comtradeCfgDTO.getLstAnalogDTO().get(j).getFSecondary() / comtradeCfgDTO.getLstAnalogDTO().get(j).getFPrimary();
} else {
fValue = fValue;
}