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