source: pacpussensors/trunk/NMEA0183/include/LatLong.hpp@ 62

Last change on this file since 62 was 59, checked in by DHERBOMEZ Gérald, 10 years ago

Integration of new modules:

  • GPS NMEA0183 decoder
  • Span CPT Decoder

Update of:

File size: 2.7 KB
Line 
1#if ! defined( LATLONG_CLASS_HEADER )
2
3#define LATLONG_CLASS_HEADER
4
5/*
6** Author: Samuel R. Blackburn
7** Internet: sam_blackburn@pobox.com
8**
9** You can use it any way you like as long as you don't try to sell it.
10**
11** Copyright, 1996, Samuel R. Blackburn
12**
13** $Workfile: latlong.hpp $
14** $Revision: 6 $
15** $Modtime: 10/13/98 6:23a $
16*/
17
18class SENTENCE;
19
20class COORDINATE
21{
22 public:
23
24 COORDINATE() { Coordinate = 0.0; }
25 ~COORDINATE() { Coordinate = 0.0; }
26
27 double Coordinate;
28
29 double GetDecimalDegrees( void ) const;
30 double GetDecimalMinutes( void ) const;
31 double GetDecimalSeconds( void ) const;
32 int GetWholeDegrees( void ) const;
33 int GetWholeMinutes( void ) const;
34 int GetWholeSeconds( void ) const;
35};
36
37class LATITUDE : public COORDINATE
38{
39 public:
40
41 LATITUDE();
42 virtual ~LATITUDE();
43
44 /*
45 ** Data
46 */
47
48 double Latitude;
49
50 NORTHSOUTH Northing;
51
52 /*
53 ** Methods
54 */
55
56 virtual void Empty( void );
57 virtual bool IsDataValid( void );
58 virtual void Parse( int PositionFieldNumber, int NorthingFieldNumber, const SENTENCE& LineToParse );
59 virtual void Set( double Position, const char *Northing );
60 virtual void Write( SENTENCE& sentence );
61
62 /*
63 ** Operators
64 */
65
66 virtual const LATITUDE& operator = ( const LATITUDE& source );
67};
68
69class LONGITUDE : public COORDINATE
70{
71 public:
72
73 LONGITUDE();
74 virtual ~LONGITUDE();
75
76 /*
77 ** Data
78 */
79
80 double Longitude;
81
82 EASTWEST Easting;
83
84 /*
85 ** Methods
86 */
87
88 virtual void Empty( void );
89 virtual bool IsDataValid( void );
90 virtual void Parse( int PositionFieldNumber, int EastingFieldNumber, const SENTENCE& LineToParse );
91 virtual void Set( double Position, const char *Easting );
92 virtual void Write( SENTENCE& sentence );
93
94 /*
95 ** Operators
96 */
97
98 virtual const LONGITUDE& operator = ( const LONGITUDE& source );
99};
100
101class LATLONG
102{
103 public:
104
105 LATLONG();
106 virtual ~LATLONG();
107
108 /*
109 ** Data
110 */
111
112 LATITUDE Latitude;
113 LONGITUDE Longitude;
114
115 /*
116 ** Methods
117 */
118
119 virtual void Empty( void );
120 virtual bool Parse( int LatitudePostionFieldNumber, int NorthingFieldNumber, int LongitudePositionFieldNumber, int EastingFieldNumber, const SENTENCE& LineToParse );
121 virtual QString PlainEnglish( void ) const;
122 virtual void Write( SENTENCE& sentence );
123
124 /*
125 ** Operators
126 */
127
128 virtual const LATLONG& operator = ( const LATLONG& source );
129};
130
131#endif // LATLONG_CLASS_HEADER
Note: See TracBrowser for help on using the repository browser.