source: pacpussensors/trunk/NMEA0183/src/SPEED.cpp@ 64

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