source: pacpussensors/trunk/NMEA0183/src/POSITI.cpp@ 127

Last change on this file since 127 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.7 KB
Line 
1#include "POSITI.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: POSITI.cpp $
13** $Revision: 6 $
14** $Modtime: 14/10/08 $
15*/
16
17
18
19POSITI::POSITI()
20{
21 Mnemonic = "POSITI";
22 Empty();
23}
24
25POSITI::~POSITI()
26{
27 //Mnemonic.Empty();
28 Empty();
29}
30
31void POSITI::Empty( void )
32{
33
34 latitude = 0.0;
35 longitude = 0.0;
36 altitude = 0.0;
37}
38
39BOOL POSITI::Parse( const SENTENCE& sentence )
40{
41 /*
42 ** POSITI - Global Positioning System Fix Data
43 ** Time, Position and fix related data fora GPS receiver.
44 **
45 ** 1 2 3
46 ** | | |
47 ** $POSITI,x.xxxxxxx,y.yyyyyyy,z.zzz*hh<CR><LF>
48 **
49 ** Field Number:
50 1) x.xxxxxxx is the latitude in deg
51 2) y.yyyyyyy is the longitude in degrees
52 3) z.zzz is the altitude in meters
53
54
55 */
56
57 latitude = sentence.Double( 1 );
58 longitude = sentence.Double( 2 );
59 altitude = sentence.Double( 3 );
60
61 return( TRUE );
62}
63
64QString POSITI::PlainEnglish( void ) const
65{
66 QString return_string;
67
68 return_string = "not yet available ";
69
70 return( return_string );
71}
72
73BOOL POSITI::Write( SENTENCE& sentence )
74{
75 /*
76 ** Let the parent do its thing
77 */
78
79 RESPONSE::Write( sentence );
80
81 sentence += latitude;
82 sentence += longitude;
83 sentence += altitude;
84
85 sentence.Finish();
86
87 return( TRUE );
88}
89
90const POSITI& POSITI::operator = ( const POSITI& source )
91{
92 latitude = source.latitude;
93 longitude = source.longitude;
94 altitude = source.altitude;
95
96 return( *this );
97}
Note: See TracBrowser for help on using the repository browser.