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

📄 way.h

📁 程序实现了PDA对手持型GPS的导航设计。用一个串口类控制串口通讯
💻 H
字号:
// Way.h: interface for the CWay class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_WAY_H__25F7F27B_D25C_44D5_9005_EFA4AE3DC73F__INCLUDED_)
#define AFX_WAY_H__25F7F27B_D25C_44D5_9005_EFA4AE3DC73F__INCLUDED_

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

typedef struct
{
	double CX,CY,CH;
}CXYH;
typedef struct
{
	double DB,DL,DH;
}DBLH;
typedef struct
{
	double X,Y;
}FPOINT;
typedef struct
{
	double A[2];
	double Alfa[2];
}PARA;
typedef struct
{
	char sName[20];
	float fTime;
	float fLat,fLon;
	int nQuality,nSates;
	float fHdop,fAntenna;
	char cUnits_of_Antenna;
	float fGeoidal_separation;
	char cUnits_of_Geoidal;
	float fAge_of_Data;
	char sStation_ID[4];
}RESULT;

class CWayPoint
{
public:
	// lpszPointName;
	unsigned short lpszPointName[20];
	CXYH c;
	DBLH d;
public:
	bool GetD(DBLH &dd)const;
	bool GetC(CXYH &cc)const;
	CWayPoint(CString);
	CWayPoint(LPTSTR);
	CWayPoint();
	~CWayPoint();
	void SetPointName(LPTSTR l);
	void SetPointName(CString str);
	void GetPointName(LPTSTR )const;
	void SetCxyh(CXYH cc);
	void SetDblh(DBLH dd);
};

class CWay : public CObject  
{
public:
	void SetOldPoint(const CWayPoint &cp);
	CWayPoint GetOldPoint(void)const;
	bool SetAfterward(int a);
	bool SetForward(int f);
	int GetAfterward()const;
	int GetForward()const;
	void SetCurPoint(const CWayPoint &cp);
	int FindPoint(LPTSTR)const;
	CWay();
	virtual ~CWay();
	
	CWayPoint GetCurPoint(void)const;
	int GetFPoint(void)const;
	int GetTPoint(void)const;
	void SetFPoint(int);
	void SetTPoint(int);
	void AddWpt(CWayPoint);
	void AddWpt(CWayPoint,int);
	CWayPoint DelWpt(int);
	void DelAll(void);
	int GetWptNum(void)const;
	CArray<CWayPoint,CWayPoint> &GetWpts(void);

protected:
	CArray<CWayPoint,CWayPoint> m_Wpts;
	CWayPoint CurPoint,OldPoint;
	int nFromWpt,nToWpt;
	int nForward,nAfterward;
};

#endif // !defined(AFX_WAY_H__25F7F27B_D25C_44D5_9005_EFA4AE3DC73F__INCLUDED_)

⌨️ 快捷键说明

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