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