[59] | 1 | #include "HSATIT.hpp"
|
---|
[99] | 2 | #include "nmea0183.h"
|
---|
[59] | 3 |
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | HSATIT::HSATIT()
|
---|
| 7 | {
|
---|
| 8 | Mnemonic = "HSATIT";
|
---|
| 9 | Empty();
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | HSATIT::~HSATIT()
|
---|
| 13 | {
|
---|
| 14 | //Mnemonic.Empty();
|
---|
| 15 | Empty();
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | void HSATIT::Empty( void )
|
---|
| 19 | {
|
---|
| 20 |
|
---|
[99] | 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;
|
---|
[59] | 28 | pitchRotationRate = 0.0;
|
---|
[99] | 29 | courseMadeGood = 0.0;
|
---|
[59] | 30 | speedOverGround = 0.0;
|
---|
[99] | 31 | longitudinalVel = 0.0;
|
---|
[59] | 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 |
|
---|
| 42 | BOOL HSATIT::Parse( const SENTENCE& sentence )
|
---|
| 43 | {
|
---|
| 44 | /*
|
---|
[99] | 45 | ** HSATIT
|
---|
[59] | 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 | **
|
---|
[99] | 51 | ** Field Number:
|
---|
[59] | 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
|
---|
[99] | 70 |
|
---|
| 71 |
|
---|
[59] | 72 | */
|
---|
| 73 |
|
---|
[99] | 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 );
|
---|
[59] | 80 | pitchRotationRate = sentence.Double( 7 );
|
---|
[99] | 81 | courseMadeGood = sentence.Double( 8 );
|
---|
[59] | 82 | speedOverGround = sentence.Double( 9 );
|
---|
[99] | 83 | longitudinalVel = sentence.Double( 10 );
|
---|
[59] | 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 );
|
---|
[99] | 91 | verticalStdDev = sentence.Double( 18 );
|
---|
[59] | 92 |
|
---|
| 93 | return( TRUE );
|
---|
| 94 | }
|
---|
| 95 |
|
---|
| 96 | QString HSATIT::PlainEnglish( void ) const
|
---|
| 97 | {
|
---|
| 98 | QString return_string;
|
---|
| 99 |
|
---|
| 100 | return_string = "not yet available ";
|
---|
| 101 |
|
---|
| 102 | return( return_string );
|
---|
| 103 | }
|
---|
| 104 |
|
---|
| 105 | BOOL HSATIT::Write( SENTENCE& sentence )
|
---|
| 106 | {
|
---|
| 107 | /*
|
---|
| 108 | ** Let the parent do its thing
|
---|
| 109 | */
|
---|
[99] | 110 |
|
---|
[59] | 111 | RESPONSE::Write( sentence );
|
---|
| 112 |
|
---|
| 113 | sentence += heading;
|
---|
| 114 | sentence += roll;
|
---|
| 115 | sentence += pitch;
|
---|
| 116 | sentence += sentence += sentence += heave;
|
---|
[99] | 117 | sentence += yawRotationRate;
|
---|
| 118 | sentence += rollRotationRate;
|
---|
[59] | 119 | sentence += pitchRotationRate;
|
---|
[99] | 120 | sentence += courseMadeGood;
|
---|
[59] | 121 | sentence += speedOverGround;
|
---|
[99] | 122 | sentence += longitudinalVel;
|
---|
[59] | 123 | sentence += transveralVel;
|
---|
| 124 | sentence += verticalVel;
|
---|
| 125 | sentence += headingStdDev;
|
---|
| 126 | sentence += rollStdDev;
|
---|
| 127 | sentence += pitchStdDev;
|
---|
| 128 | sentence += sentence += northSpeedStdDev;
|
---|
| 129 | sentence += eastSpeeedStdDev;
|
---|
[99] | 130 | sentence += verticalStdDev;
|
---|
[59] | 131 |
|
---|
| 132 | sentence.Finish();
|
---|
| 133 |
|
---|
| 134 | return( TRUE );
|
---|
| 135 | }
|
---|
| 136 |
|
---|
| 137 | const HSATIT& HSATIT::operator = ( const HSATIT& source )
|
---|
| 138 | {
|
---|
| 139 |
|
---|
[99] | 140 | heading = source.heading;
|
---|
| 141 | roll = source.roll;
|
---|
| 142 | pitch = source.pitch;
|
---|
| 143 | heave = source.heave;
|
---|
| 144 | yawRotationRate = source.yawRotationRate;
|
---|
| 145 | rollRotationRate = source.rollRotationRate;
|
---|
[59] | 146 | pitchRotationRate = source.pitchRotationRate;
|
---|
[99] | 147 | courseMadeGood = source.courseMadeGood;
|
---|
[59] | 148 | speedOverGround = source.speedOverGround;
|
---|
[99] | 149 | longitudinalVel = source.longitudinalVel;
|
---|
[59] | 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 | }
|
---|