/ru/utils/GPSInfo.h
https://bitbucket.org/VladimirL/robotutils · C Header · 67 lines · 47 code · 16 blank · 4 comment · 0 complexity · a57011b1c6194af5f38e2edb3db75cc2 MD5 · raw file
- // GPSInfo.h: interface for the GPSInfo class.
- //
- //////////////////////////////////////////////////////////////////////
-
- #if !defined(AFX_GPSINFO_H__2040A232_786E_4C7B_8EA5_0A9438ED6C1F__INCLUDED_)
- #define AFX_GPSINFO_H__2040A232_786E_4C7B_8EA5_0A9438ED6C1F__INCLUDED_
-
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
-
- #include <QPoint>
- #include <math.h>
-
- #define DOUBLE double
- #define ULONG unsigned long
- #define UINT unsigned int
- #define CHAR char
- #define BOOL bool
-
- class GPSInfo;
-
- class UTMInfo
- {
- public:
- double latitude;
- double longitude;
- int utmXZone;
- char utmYZone;
-
- UTMInfo();
- UTMInfo(int utmXZone, char utmYZone, double latutude, double longitude);
-
- //void fromGPSInfo(const GPSInfo& pos);
-
- inline QPointF toQPointF() {
- return QPointF(latitude, longitude);
- }
- };
-
- class GPSInfo
- {
- public:
- DOUBLE m_latitude;
- DOUBLE m_longitude;
- DOUBLE m_altitude;
- ULONG m_nSentences;
- UINT m_signalQuality;
- UINT m_satelitesInUse;
-
- GPSInfo();
- GPSInfo(double lat, double lon);
-
- virtual ~GPSInfo();
- UTMInfo toUTMProj();
- void fromUTMProj(const UTMInfo &pos);
- private:
- void LatLonToUtm(double a, double f, int& utmXZone, char& utmYZone,
- double& easting, double& northing, double lat, double lon);
- void UtmToLatLon (double a, double f, int utmXZone, char utmYZone,
- double easting, double northing, double& lat, double& lon);
- };
-
-
-
-
- #endif // !defined(AFX_GPSINFO_H__2040A232_786E_4C7B_8EA5_0A9438ED6C1F__INCLUDED_)