source: pacpussensors/trunk/NMEA0183/src/UTMWGS.cpp

Last change on this file 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: 1.9 KB
Line 
1#include "UTMWGS.hpp"
2//#pragma hdrstop
3
4/*
5** Author: O. Le Marchand
6
7**
8** You can use it any way you like as long as you don't try to sell it.
9**
10
11**
12** $Workfile: UTMWGS.cpp $
13** $Revision: 6 $
14** $Modtime: 14/10/08 $
15*/
16
17
18
19UTMWGS::UTMWGS()
20{
21 Mnemonic = "UTMWGS";
22 Empty();
23}
24
25UTMWGS::~UTMWGS()
26{
27 //Mnemonic.Empty();
28 Empty();
29}
30
31void UTMWGS::Empty( void )
32{
33
34
35 //UTCTime.Empty();
36 UTMzoneChar = ' ';
37 UTMzone = 0;
38 east = 0.0;
39 north = 0.0;
40 up = 0.0;
41
42}
43
44BOOL UTMWGS::Parse( const SENTENCE& sentence )
45{
46 /*
47 ** UTMWGS
48 ** 1 2 3 4 5
49 ** | | | | |
50 ** $UTMWGS,c,nn,x.xxx,y.yyy,z.zzz*hh<CR><LF>
51 **
52 ** Field Number:
53 ** 1) c and nn represent the map, Zone/area
54 3) x.xxx is the east position in meter
55 4) y.yyy is the north position in meter
56 5) z.zzz is the altitude in meters
57
58
59 */
60
61
62 UTMzoneChar = sentence.Field(1).at(0);
63 UTMzone = sentence.Integer( 2 );
64 east = sentence.Double( 3 );
65 north = sentence.Double( 4 );
66 up = sentence.Double( 5 );
67
68 return( TRUE );
69}
70
71QString UTMWGS::PlainEnglish( void ) const
72{
73 QString return_string;
74
75 return_string = "not yet available ";
76
77 return( return_string );
78}
79
80BOOL UTMWGS::Write( SENTENCE& sentence )
81{
82 /*
83 ** Let the parent do its thing
84 */
85
86 RESPONSE::Write( sentence );
87
88 sentence += UTMzoneChar;
89 sentence += UTMzone;
90 sentence += east;
91 sentence += north;
92 sentence += up;
93
94 sentence.Finish();
95
96 return( TRUE );
97}
98
99const UTMWGS& UTMWGS::operator = ( const UTMWGS& source )
100{
101 UTMzoneChar = source.UTMzoneChar;
102 UTMzone = source.UTMzone;
103 east = source.east;
104 north = source.north;
105 up = source.up;
106
107 return( *this );
108}
Note: See TracBrowser for help on using the repository browser.