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

📄 数据采集卡dlg.h

📁 数据采集卡程序
💻 H
字号:
// 数据采集卡Dlg.h : header file
//
#include <matlib.h>

#if !defined(AFX_DLG_H__912115A0_73D6_415D_90C9_E0A62187AC6C__INCLUDED_)
#define AFX_DLG_H__912115A0_73D6_415D_90C9_E0A62187AC6C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog

class CMyDlg : public CDialog
{
// Construction
public:

	CDC* MyDc;
    int SampleNUm2;
	int Colorindex;
	int dataarray[5000];
	int tempdata[15];
	int counter,counter2,counter3,counter4,counter6,counter5;
	int repaircounter;
   	double Averagedata;
	double Averagedata2;
     
    double aa1,aa2,aa3,aa4;


	   _int64	Frequency;
	_int64	BeginTime;
    _int64	endTime;
	double AngleResult;
    	short cmd_type;		//command type for driver
	short M1_pos;		//Motor1 position variable
	short mean_pos;		//vehicle mean position variable
	float mean_vel;     //vehicle mean velocity variable

	BYTE byteBuf[15];  
	float *pvel;		
	short *ppos;
	BYTE  *pbyte;
	int	  i;
	CByteArray OutBuf;
    int runflag;


    int SampleNUm;

	int dataarray2[5000];
	int tempdata2[15];
	double repairvalue,repairvaluetemp,repairvaluetemp2;
    double repairvaluetemp3,repairvaluetemp23;

	double TimeLapse;
    double TimeLapse2;

     double Zkkk,Zkkklast,Zkkklast2,Zkkklast3,Zkkklast4;     



	int repaircounter2;
	double AngleResult2;
	double repairvalue2;
	time_t ltime,oldtime;
    struct tm *gmt;



   	float q0,q1,q2,q3;//角速度。
    float q0new,q1new,q2new,q3new;//角速度。
    float TempAngleSpeed,TempAngleSpeedlast,TempAngleSpeedharf,speednew; 

	 float TempAngleSpeed2,TempAngleSpeedlast2,TempAngleSpeedharf2,speednew2; 

    float TyroAngle,TyroAngleX,TyroAngleY,TyroAngleZ,InitAverage,InitAverage2,InitAverage3;

	 double x,y,z;
	 double xtest,ytest,ztest;

	 double xlast,ylast,zlast;
	 double xtestlast,ytestlast,ztestlast;

	 int tnumber;
	 
     Mm  kkk;
     Mm h1;
	 Mm	xmatrix;
	 Mm	xmatrix1;
					
	 Mm	k1;
	 Mm	d1;
					
	 Mm c1;
					
	 Mm	e1;
	 Mm	e2 ;
	 Mm e;	
	 
					
	 Mm	c0 ;
					
					//新获得的参数作为下一次递推的旧参数
					
	 Mm	c;
					
					//把辨识参数c 列向量加入辨识参数矩阵的最后一列 
					
	 Mm	p1;
					
					//求出 p(k)的值
					
	 Mm	p0 ;
					



	CMyDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMyDlg)
	enum { IDD = IDD_MY_DIALOG };
	CEdit	m_Display;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation

public:
	int GetAdData(int channel);

protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMyDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton1();
	afx_msg void OnButton2();
	afx_msg void OnButton3();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLG_H__912115A0_73D6_415D_90C9_E0A62187AC6C__INCLUDED_)

⌨️ 快捷键说明

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