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

Last change on this file since 127 was 99, checked in by nguyenhu, 9 years ago

compilation under linux with 0.2.X framework

File size: 4.3 KB
Line 
1#include "HSATIT.hpp"
2#include "nmea0183.h"
3
4
5
6HSATIT::HSATIT()
7{
8 Mnemonic = "HSATIT";
9 Empty();
10}
11
12HSATIT::~HSATIT()
13{
14 //Mnemonic.Empty();
15 Empty();
16}
17
18void HSATIT::Empty( void )
19{
20
21
22 heading = 0.0;
23 roll = 0.0;
24 pitch = 0.0;
25 heave = 0.0;
26 yawRotationRate = 0.0;
27 rollRotationRate = 0.0;
28 pitchRotationRate = 0.0;
29 courseMadeGood = 0.0;
30 speedOverGround = 0.0;
31 longitudinalVel = 0.0;
32 transveralVel = 0.0;
33 verticalVel = 0.0;
34 headingStdDev = 0.0;
35 rollStdDev = 0.0;
36 pitchStdDev = 0.0;
37 northSpeedStdDev = 0.0;
38 eastSpeeedStdDev = 0.0;
39 verticalStdDev = 0.0;
40}
41
42BOOL HSATIT::Parse( const SENTENCE& sentence )
43{
44 /*
45 ** HSATIT
46 **
47 ** 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
48 ** | | | | | | | | | | | | | | | | | |
49 ** $HSATIT,h.hhh,r.rrr,p.ppp,h.h,a.aaa,b.bbb,c.ccc,d.ddd,e.eee,f.fff,g.ggg,h.hhh,i.ii,j.jj,k.kk,l.ll,m.mm,n.nn<CR><LF>
50 **
51 ** Field Number:
52 ** 1) h.hhh is the heading in deg
53 2) r.rrr is the roll in deg
54 3) p.ppp is the pitch in deg
55 4) h.h is the heave in meters
56 5) a.aaa* is the X3 rotation rate* in deg/s
57 6) b.bbb* is the X1 rotation rate* in deg/s
58 7) c.ccc* is the X2 rotation rate* in deg/s
59 8) d.ddd is the course made good in deg
60 9) e.eee is the speed over ground
61 10) d.dd is the longitudinal velocity in m/s (positive towards the bow)
62 11) g.ggg is the transverse velocity in m/s (positive towards port side)
63 12) h.hhh is the vertical velocity in m/s (positive towards up side)
64 13) i.ii is the heading Std in deg
65 14) j.jj is the roll Std in deg
66 15) k.kk is the pitch Std in deg
67 16) l.ll is the north speed Std in m/s
68 17) m.mm is the east speed Std in m/s
69 18) n.nn is the vertical speed Std in m/s
70
71
72 */
73
74 heading = sentence.Double( 1 );
75 roll = sentence.Double( 2 );
76 pitch = sentence.Double( 3 );
77 heave = sentence.Double( 4 );
78 yawRotationRate = sentence.Double( 5 );
79 rollRotationRate = sentence.Double( 6 );
80 pitchRotationRate = sentence.Double( 7 );
81 courseMadeGood = sentence.Double( 8 );
82 speedOverGround = sentence.Double( 9 );
83 longitudinalVel = sentence.Double( 10 );
84 transveralVel = sentence.Double( 11 );
85 verticalVel = sentence.Double( 12 );
86 headingStdDev = sentence.Double( 13 );
87 rollStdDev = sentence.Double( 14 );
88 pitchStdDev = sentence.Double( 15 );
89 northSpeedStdDev = sentence.Double( 16 );
90 eastSpeeedStdDev = sentence.Double( 17 );
91 verticalStdDev = sentence.Double( 18 );
92
93 return( TRUE );
94}
95
96QString HSATIT::PlainEnglish( void ) const
97{
98 QString return_string;
99
100 return_string = "not yet available ";
101
102 return( return_string );
103}
104
105BOOL HSATIT::Write( SENTENCE& sentence )
106{
107 /*
108 ** Let the parent do its thing
109 */
110
111 RESPONSE::Write( sentence );
112
113 sentence += heading;
114 sentence += roll;
115 sentence += pitch;
116 sentence += sentence += sentence += heave;
117 sentence += yawRotationRate;
118 sentence += rollRotationRate;
119 sentence += pitchRotationRate;
120 sentence += courseMadeGood;
121 sentence += speedOverGround;
122 sentence += longitudinalVel;
123 sentence += transveralVel;
124 sentence += verticalVel;
125 sentence += headingStdDev;
126 sentence += rollStdDev;
127 sentence += pitchStdDev;
128 sentence += sentence += northSpeedStdDev;
129 sentence += eastSpeeedStdDev;
130 sentence += verticalStdDev;
131
132 sentence.Finish();
133
134 return( TRUE );
135}
136
137const HSATIT& HSATIT::operator = ( const HSATIT& source )
138{
139
140 heading = source.heading;
141 roll = source.roll;
142 pitch = source.pitch;
143 heave = source.heave;
144 yawRotationRate = source.yawRotationRate;
145 rollRotationRate = source.rollRotationRate;
146 pitchRotationRate = source.pitchRotationRate;
147 courseMadeGood = source.courseMadeGood;
148 speedOverGround = source.speedOverGround;
149 longitudinalVel = source.longitudinalVel;
150 transveralVel = source.transveralVel;
151 verticalVel = source.verticalVel;
152 headingStdDev = source.headingStdDev;
153 rollStdDev = source.rollStdDev;
154 pitchStdDev = source.pitchStdDev;
155 northSpeedStdDev = source.northSpeedStdDev;
156 eastSpeeedStdDev = source.eastSpeeedStdDev;
157 verticalStdDev = source.verticalStdDev;
158
159 return( *this );
160}
Note: See TracBrowser for help on using the repository browser.