Changeset 2058 in ntrip
- Timestamp:
- Dec 1, 2009, 11:49:03 AM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r2057 r2058 42 42 43 43 #include "bncmodel.h" 44 #include "bncpppclient.h" 45 #include "bancroft.h" 44 46 45 47 using namespace std; … … 55 57 } 56 58 59 // Constructor 60 //////////////////////////////////////////////////////////////////////////// 61 bncModel::bncModel() { 62 _xcBanc.ReSize(4); 63 } 64 65 // Destructor 66 //////////////////////////////////////////////////////////////////////////// 67 bncModel::~bncModel() { 68 } 69 70 // Bancroft Solution 71 //////////////////////////////////////////////////////////////////////////// 72 t_irc bncModel::cmpBancroft(t_epoData* epoData) { 73 74 const unsigned MINOBS = 4; 75 76 if (epoData->size() < MINOBS) { 77 return failure; 78 } 79 80 Matrix BB(epoData->size(), 4); 81 82 QMapIterator<QString, t_satData*> it(epoData->satData); 83 int iObs = 0; 84 while (it.hasNext()) { 85 it.next(); 86 QString prn = it.key(); 87 t_satData* satData = it.value(); 88 ++iObs; 89 BB(iObs, 1) = satData->xx(1); 90 BB(iObs, 2) = satData->xx(2); 91 BB(iObs, 3) = satData->xx(3); 92 BB(iObs, 4) = satData->P3 + satData->clk; 93 } 94 95 bancroft(BB, _xcBanc); 96 97 return success; 98 } -
trunk/BNC/bncmodel.h
r2057 r2058 27 27 28 28 #include <QtCore> 29 #include <newmat.h> 29 30 30 #include <newmat.h> 31 #include "bncconst.h" 32 33 class t_epoData; 31 34 32 35 class bncParam { 33 36 public: 37 enum type {CRD_X, CRD_Y, CRD_Z, TROPO, AMB_L3}; 34 38 bncParam(); 35 39 ~bncParam(); 40 double x0; 41 }; 36 42 43 class bncModel { 44 public: 45 bncModel(); 46 ~bncModel(); 47 t_irc cmpBancroft(t_epoData* epoData); 48 const ColumnVector& xcBanc() const {return _xcBanc;} 49 37 50 private: 51 Matrix _QQ; 52 ColumnVector _xx; 53 ColumnVector _xcBanc; 38 54 }; 39 55 -
trunk/BNC/bncpppclient.cpp
r2055 r2058 46 46 #include "bncutils.h" 47 47 #include "bncconst.h" 48 #include "b ancroft.h"48 #include "bncmodel.h" 49 49 50 50 extern "C" { … … 59 59 _staID = staID; 60 60 _epoData = 0; 61 _model = new bncModel(); 61 62 } 62 63 … … 64 65 //////////////////////////////////////////////////////////////////////////// 65 66 bncPPPclient::~bncPPPclient() { 67 delete _model; 66 68 delete _epoData; 67 69 QMapIterator<QString, t_eph*> it(_eph); … … 288 290 void bncPPPclient::processEpoch() { 289 291 290 const unsigned MINOBS = 4;291 292 292 // Data Pre-Processing 293 293 // ------------------- … … 305 305 } 306 306 307 if (_epoData->size() < MINOBS) {308 return;309 }310 311 307 // Bancroft Solution 312 308 // ----------------- 313 Matrix BB(_epoData->size(), 4); 314 315 QMapIterator<QString, t_satData*> it(_epoData->satData); 316 int iObs = 0; 317 while (it.hasNext()) { 318 it.next(); 319 QString prn = it.key(); 320 t_satData* satData = it.value(); 321 ++iObs; 322 BB(iObs, 1) = satData->xx(1); 323 BB(iObs, 2) = satData->xx(2); 324 BB(iObs, 3) = satData->xx(3); 325 BB(iObs, 4) = satData->P3 + satData->clk; 326 } 327 328 ColumnVector pos(4); 329 bancroft(BB, pos); 309 if (_model->cmpBancroft(_epoData) != success) { 310 return; 311 } 330 312 331 313 ostringstream str; 332 314 str.setf(ios::fixed); 333 str << " PPP " 315 str << " PPP " << _staID.data() << " " 334 316 << _epoData->tt.timestr(1) << " " << _epoData->size() << " " 335 << setw(14) << setprecision(3) << pos(1)<< " "336 << setw(14) << setprecision(3) << pos(2)<< " "337 << setw(14) << setprecision(3) << pos(3);317 << setw(14) << setprecision(3) << _model->xcBanc()(1) << " " 318 << setw(14) << setprecision(3) << _model->xcBanc()(2) << " " 319 << setw(14) << setprecision(3) << _model->xcBanc()(3); 338 320 339 321 emit newMessage(QString(str.str().c_str()).toAscii(), true); -
trunk/BNC/bncpppclient.h
r2057 r2058 34 34 #include "RTCM/GPSDecoder.h" 35 35 #include "RTCM3/ephemeris.h" 36 37 class bncModel; 36 38 37 39 class t_satData { … … 102 104 QMap<QString, t_corr*> _corr; 103 105 t_epoData* _epoData; 106 bncModel* _model; 104 107 }; 105 108
Note:
See TracChangeset
for help on using the changeset viewer.