44 lines
950 B
C++
44 lines
950 B
C++
#pragma once
|
|
/**
|
|
* @file br_temp_fit.h
|
|
* @brief 压辊温度拟合的类
|
|
* @author Cat (null.null.null@qq.com)
|
|
* @version 0.1
|
|
* @date 2021-09-13
|
|
*
|
|
* Copyright: Baosight Co. Ltd.
|
|
* DO NOT COPY/USE WITHOUT PERMISSION
|
|
*
|
|
*/
|
|
#include <eqpalg/alg_base.h>
|
|
#include <eqpalg/define/public.h>
|
|
#include <queue>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
const int CS_SLIDE_AVG_SIZE = 120;
|
|
/**
|
|
* @brief 压辊温度拟合
|
|
* @warning 该算法存在问题,会导致拟合温度严重偏高
|
|
*/
|
|
class BrTempFit : public AlgBase {
|
|
public:
|
|
BrTempFit(const string name, const mix_cc::json& rule_json,
|
|
const string ruleId);
|
|
|
|
virtual ~BrTempFit();
|
|
|
|
public:
|
|
int init() override;
|
|
AlarmInfo exec_mon() override;
|
|
std::vector<AlarmInfo> exec_task(mix_cc::time_range_t time_range) override;
|
|
|
|
private:
|
|
float DriveTempCal1(float xi, float xmax, float ymax);
|
|
|
|
private:
|
|
// slide avg queue cache
|
|
queue<float> mq_slide;
|
|
double m_sum;
|
|
};
|