Changeset 661 in ntrip for trunk/BNC/RTIGS/RTIGSDecoder.cpp
- Timestamp:
- Jan 29, 2008, 3:53:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTIGS/RTIGSDecoder.cpp
r652 r661 41 41 #include "RTIGSDecoder.h" 42 42 #include "bncconst.h" 43 #include "bncapp.h" 43 44 44 45 using namespace std; … … 46 47 #undef L1 47 48 #undef L2 49 50 // 51 //////////////////////////////////////////////////////////////////////////// 52 ephSenderRTIGS::ephSenderRTIGS() { 53 connect(this, SIGNAL(newGPSEph(gpsephemeris*)), 54 (bncApp*) qApp, SLOT(slotNewGPSEph(gpsephemeris*))); 55 //connect(this, SIGNAL(newGlonassEph(glonassephemeris*)), 56 // (bncApp*) qApp, SLOT(slotNewGlonassEph(glonassephemeris*))); 57 } 48 58 49 59 // Constructor … … 74 84 SwitchBytes( (char*) &xx, sizeof(xx) ); 75 85 } 76 if (xx == 200 ) {86 if (xx == 200 || xx == 300 ) { // 2/1/2008 SPG 77 87 _buffer = _buffer.substr(ii); 78 88 found = true; … … 97 107 } 98 108 109 // 2/1/2008 SPG Start 99 110 // Decode the epoch 100 111 // ---------------- 101 112 if (messType == 200) { 113 // Decode Obs 102 114 RTIGSO_T rtigs_obs; 103 115 short numObs = _GPSTrans.Decode_RTIGS_Obs(p_buf, numbytes, rtigs_obs); … … 121 133 } 122 134 } 135 if(messType==300){ 136 // Decode Ephemeris 137 RTIGSE_T rtigs_eph; 138 BEPH_T new_eph; 139 short PRN; 140 // To TNAV_T 141 // --------- 142 short retval = _GPSTrans.Decode_RTIGS_Eph(p_buf, numbytes , rtigs_eph, PRN); 143 // Ensure it was decoded ok. 144 // ------------------------ 145 if(retval==1){ 146 // TNAV To BEPH (decodes subframes) 147 // -------------------------------- 148 _GPSTrans.TNAV_To_BEPH(&_GPSTrans.TNAV_Eph.Eph[PRN-1],&new_eph); 149 gpsephemeris* ep = new gpsephemeris(); 150 // Match datatypes 151 // --------------- 152 ep->flags = (int)new_eph.l2pflag; 153 ep->satellite = (int)new_eph.satellite; 154 ep->IODE = (int)new_eph.issue_of_eph; 155 ep->URAindex = (int)new_eph.user_range_acc; 156 ep->SVhealth = (int)new_eph.sat_health; 157 ep->GPSweek = (int)new_eph.gps_week; 158 ep->IODC = (int)new_eph.issue_of_clock; 159 ep->TOW = (int)new_eph.transmit_time; 160 ep->TOC = (int)new_eph.clock_ref_time; 161 ep->TOE = (int)new_eph.eph_ref_time; 162 ep->clock_bias = new_eph.a0; 163 ep->clock_drift = new_eph.a1; 164 ep->clock_driftrate = new_eph.a2; 165 ep->Crs = new_eph.orbit_sin_corr; 166 ep->Delta_n = new_eph.mean_mot_diff ; 167 ep->M0 = new_eph.ref_mean_anmly; 168 ep->Cuc = new_eph.lat_cos_corr; 169 ep->e = new_eph.orbit_ecc; 170 ep->Cus = new_eph.lat_sin_corr; 171 ep->sqrt_A = new_eph.orbit_semimaj; 172 ep->Cic = new_eph.incl_cos_corr; 173 ep->OMEGA0 = new_eph.right_asc; 174 ep->Cis = new_eph.incl_sin_corr; 175 ep->i0 = new_eph.orbit_incl; 176 ep->Crc = new_eph.orbit_cos_corr; 177 ep->omega = new_eph.arg_of_perigee; 178 ep->OMEGADOT = new_eph.right_asc_rate; 179 ep->IDOT = new_eph.incl_rate; 180 ep->TGD = new_eph.group_delay; 181 182 // Pass back to parent class 183 // -------------------- 184 emit _ephSender.newGPSEph(ep); 185 } 186 } 187 188 // 2/1/2008 SPG End 123 189 124 190 // Unprocessed bytes remain in buffer 125 191 // ---------------------------------- 126 192 _buffer = _buffer.substr(numbytes); 127 128 193 return success; 129 194 }
Note:
See TracChangeset
for help on using the changeset viewer.