- Timestamp:
- Dec 30, 2014, 3:04:57 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r6486 r6519 207 207 //////////////////////////////////////////////////////////////////////////// 208 208 void t_bncCore::slotNewGPSEph(t_ephGPS eph) { 209 210 QMutexLocker locker(&_mutex); 209 QMutexLocker locker(&_mutex); 210 211 t_irc irc = _ephUser.putNewEph(&eph, true); 212 if (eph.checkState() == t_eph::bad) { 213 return; 214 } 211 215 212 216 emit newGPSEph(eph); 213 217 214 218 printEphHeader(); 215 216 if (_ephUser.putNewEph(&eph, true) == success) { 217 printEph(eph, true); 218 } 219 else { 220 printEph(eph, false); 221 } 219 printEph(eph, (irc == success)); 222 220 } 223 221 … … 225 223 //////////////////////////////////////////////////////////////////////////// 226 224 void t_bncCore::slotNewGlonassEph(t_ephGlo eph) { 227 228 QMutexLocker locker(&_mutex); 225 QMutexLocker locker(&_mutex); 226 227 t_irc irc = _ephUser.putNewEph(&eph, true); 228 if (eph.checkState() == t_eph::bad) { 229 return; 230 } 229 231 230 232 emit newGlonassEph(eph); 231 233 232 234 printEphHeader(); 233 234 if (_ephUser.putNewEph(&eph, true) == success) { 235 printEph(eph, true); 236 } 237 else { 238 printEph(eph, false); 239 } 235 printEph(eph, (irc == success)); 240 236 } 241 237 … … 243 239 //////////////////////////////////////////////////////////////////////////// 244 240 void t_bncCore::slotNewGalileoEph(t_ephGal eph) { 245 246 QMutexLocker locker(&_mutex); 241 QMutexLocker locker(&_mutex); 242 243 t_irc irc = _ephUser.putNewEph(&eph, true); 244 if (eph.checkState() == t_eph::bad) { 245 return; 246 } 247 247 248 248 emit newGalileoEph(eph); 249 249 250 250 printEphHeader(); 251 252 if (_ephUser.putNewEph(&eph, true) == success) { 253 printEph(eph, true); 254 } 255 else { 256 printEph(eph, false); 257 } 251 printEph(eph, (irc == success)); 258 252 } 259 253 … … 261 255 //////////////////////////////////////////////////////////////////////////// 262 256 void t_bncCore::slotNewSBASEph(t_ephSBAS eph) { 263 264 QMutexLocker locker(&_mutex); 257 QMutexLocker locker(&_mutex); 258 259 t_irc irc = _ephUser.putNewEph(&eph, true); 260 if (eph.checkState() == t_eph::bad) { 261 return; 262 } 265 263 266 264 emit newSBASEph(eph); 267 265 268 266 printEphHeader(); 269 270 if (_ephUser.putNewEph(&eph, true) == success) { 271 printEph(eph, true); 272 } 273 else { 274 printEph(eph, false); 275 } 267 printEph(eph, (irc == success)); 276 268 } 277 269 -
trunk/BNC/src/bncephuser.cpp
r6518 r6519 103 103 // 104 104 //////////////////////////////////////////////////////////////////////////// 105 t_irc bncEphUser::putNewEph( constt_eph* eph, bool check) {105 t_irc bncEphUser::putNewEph(t_eph* eph, bool check) { 106 106 107 107 QMutexLocker locker(&_mutex); … … 163 163 // 164 164 //////////////////////////////////////////////////////////////////////////// 165 void bncEphUser::checkEphemeris( constt_eph* eph) {165 void bncEphUser::checkEphemeris(t_eph* eph) { 166 166 167 if (!eph || eph->checkState() == t_eph::ok || eph->checkState() == t_eph::bad) { 168 return; 169 } 170 171 // Simple Check - check satellite radial distance 172 // ---------------------------------------------- 173 ColumnVector xc(4); 174 ColumnVector vv(3); 175 176 if (eph->getCrd(eph->TOC(), xc, vv, false) != success) { 177 eph->setCheckState(t_eph::bad); 178 return; 179 } 180 181 double rr = xc.Rows(1,3).norm_Frobenius(); 182 183 if (rr < 2.e7 || rr > 4.e7) { 184 eph->setCheckState(t_eph::bad); 185 return; 186 } 167 187 } -
trunk/BNC/src/bncephuser.h
r6518 r6519 47 47 virtual ~bncEphUser(); 48 48 49 t_irc putNewEph( constt_eph* newEph, bool check);49 t_irc putNewEph(t_eph* newEph, bool check); 50 50 51 51 t_eph* ephLast(const QString& prn) { … … 72 72 73 73 private: 74 void checkEphemeris( constt_eph* eph);74 void checkEphemeris(t_eph* eph); 75 75 QMutex _mutex; 76 76 static const unsigned _maxQueueSize = 5; -
trunk/BNC/src/ephemeris.h
r6518 r6519 32 32 bool isNewerThan(const t_eph* eph) const {return earlierTime(eph, this);} 33 33 e_checkState checkState() const {return _checkState;} 34 void setCheckState(e_checkState checkState) {_checkState = checkState;} 34 35 t_prn prn() const {return _prn;} 35 36 t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
Note:
See TracChangeset
for help on using the changeset viewer.