You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/mAlg/mAlgPseudo/iAlgPseuCal.h

72 lines
2.2 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "Defines.h"
#include "mAlgPseudo_global.h"
// 拟压力计算载体,单例模式,在模型处理解释过程调用
class M_ALGPSEUDO_EXPORT iAlgPseuCal
{
public:
iAlgPseuCal();
/// @brief 计算拟压力相关
/// @param vvec长度为4对应四列数据
/// @note VecDouble vecP = vvec[0]
/// VecDouble vecPs = vvec[1]
/// VecDouble vecZg = vvec[2]
/// VecDouble vecMug = vvec[3]
static bool initPs(VVecDouble vvec);
// 系统内部自动选用不同的方法
static bool calP(double ps, double &p, int which = -1);
static bool calPS(double p, double &ps, int which = -1);
private:
///////////////////////////////////////////////////////////////////////////////////////////
// 拟合公式
// 计算“压力->拟压力”的回归曲线方程系数
static bool fitPtoPS(bool isZero = true);
// 计算“拟压力->压力”的回归曲线方程系数
static bool fitPStoP(bool isZero = false);
///////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// 回归曲线法
// 压力->拟压力,精度比湛江方法高
static bool pToPs_Cv(double p, double &ps);
// 拟压力->压力,精度比湛江方法低,暂未调用
static bool psToP_Cv(double ps, double &p);
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// 湛江方法
// 压力->拟压力,精度不如回归曲线法,暂未调用
//static bool pToPs_Zj(double p, double &ps);
// 拟压力->压力,精度好于回归曲线法
static bool psToP_Zj(double ps, double &p);
////////////////////////////////////////////////////////////////////////////////
private:
// 用压力算拟压力的系数
static VecDouble m_vecCoefsPtoPS;
// 用拟压力算压力的系数
static VecDouble m_vecCoefsPStoP;
// job里的三组数据
static VecDouble m_vecP;
static VecDouble m_vecPs;
static VecDouble m_vecZg;
static VecDouble m_vecMug;
};