You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

68 lines
2.5 KiB

#pragma once
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <sstream>
#include <string>
#include <vector>
namespace a8k_opt_algo {
using namespace std;
/***********************************************************************************************************************
* 预处理 *
***********************************************************************************************************************/
class OptAlgoPreProcessResult {
public:
bool scanAgain;
int32_t suggestScanGain;
};
void T_A8kOptAlgoPreProcess(vector<float> ogigin_val, //
int32_t now_scan_gain, //
int32_t expectResultRangeStart, //
int32_t expectResultRangeEnd, //
OptAlgoPreProcessResult& result);
void F_A8kOptAlgoPreProcess(vector<float> ogigin_val, //
int32_t now_scan_gain, //
int32_t expectResultRangeStart, //
int32_t expectResultRangeEnd, //
OptAlgoPreProcessResult& result);
/***********************************************************************************************************************
* 数据分析 *
***********************************************************************************************************************/
class PeakInfo {
public:
bool find_peak; // 是否找到峰
float area; // 峰面积
int peak_pos; // 峰位置
int peak_start_pos; // 峰开始位置
int peak_end_pos; // 峰结束位置
};
class OptAlgoResult {
public:
/**
* @brief 原始数据
*/
vector<float> displayData; // 250 压缩后的数据
/**
* @brief 峰的信息
*/
PeakInfo pin040; // 峰040的信息
PeakInfo pin080; // 峰080的信息
PeakInfo pin120; // 峰120的信息
PeakInfo pin160; // 峰160的信息
PeakInfo pin200; // 峰200的信息
};
void A8kOptAlgoProcess(vector<float> ogigin_val, OptAlgoResult& result);
} // namespace a8k_opt_algo