⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 point.cpp

📁 串口应变采集系统
💻 CPP
字号:
// Point.cpp: implementation of the Point class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Atmeasure.h"
#include "Point.h"
#include "AtmeasureSet.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Point::Point()
{
  /*  Flag=0;
    Wave=1539.2482;
    Wave0=1539.2359;
    K=100;
    T0=20;
    Comchannel=1539.2309;
    Compoint=1539.2309;
    T;
    L=0.000012;
    H=0.8;
    P=0.000012;
    Q=0.000015;
    Strain;
    SP;
    WP;
    StrainBalance=0;
    SPBalance=0;
    WPBalance=0;*/
}

Point::~Point()
{

}


bool Point::Check()
{
return 1;

}



/* void Point::Calculate()
{
  
  CAtmeasureSet *ws;
   ws=new CAtmeasureSet;
   ws->Open();
   if(ws->IsEOF()==0)
   {
	   ws->MoveLast();
   }
 	  ws->AddNew();


	double StrainTemp;
	double SPtemp;
	double WPtemp;

	if(Wave<Wave0)
	{
		double iTemp;
		iTemp=Wave;
		Wave=Wave0;
		Wave0=iTemp;
	}
    
	if(Comchannel<ComWave0)
	{
        double iComTemp;
		iComTemp=Wave;
		Wave=Wave0;
		Wave0=iComTemp;
	}

	if(Flag==0)
	{
        T=K*(Wave-Wave0)+T0;
		ws->AddNew();
		ws->m_temp=T;
		ws->Update();
		////////////////////////////////根据哪个波长算的/////////////////
	}
	else if(Flag==1)
	{
		if((Wave-Wave0)>=L*K*(ComWave-ComWave0))
		{
			StrainTemp=(Wave-Wave0)/Wave0-L*K*(ComWave-ComWave0);
		}
		else if((Wave-Wave0)<L*K*(ComWave-ComWave0))
		{
			StrainTemp=L*K*(ComWave-ComWave0)-(Wave-Wave0)/Wave0;
		}

		Strain=StrainTemp/H;
		Strain=Strain-StrainBalance;
	}
	else if(Flag==2)
	{
		if((Wave-Wave0)>=P*K*(ComWave-ComWave0))
		{
			SPtemp=(Wave-Wave0)/Wave0-P*K*(ComWave-ComWave0);
		}
		else if((Wave-Wave0)<P*K*(ComWave-ComWave0))
		{
			SPtemp=P*K*(ComWave-ComWave0)-(Wave-Wave0)/Wave0;
		}
     
		SP=SPtemp/Q;
		SP=SP-SPBalance;

	}
    else if(Flag==3)
	{
		if((Wave-Wave0)>=P*K*(ComWave-ComWave0))
		{
	        WPtemp=(Wave-Wave0)/Wave0-P*K*(ComWave-ComWave0);
		}
		else if((Wave-Wave0)<P*K*(ComWave-ComWave0))
		{
			WPtemp=P*K*(ComWave-ComWave0)-(Wave-Wave0)/Wave0;
		}
     
		WP=WPtemp/Q;
		WP=WP-WPBalance;
	}

}*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -