- Timestamp:
- Aug 3, 2014, 11:52:30 AM (11 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/options.h
r5750 r5752 11 11 class t_options { 12 12 public: 13 class t_optBias { 14 public: 15 t_optBias(char system, t_lc::type tLC) : _system(system), _tLC(tLC) {} 16 char _system; 17 t_lc::type _tLC; 18 }; 19 13 20 t_options(); 14 21 ~t_options(); … … 17 24 bool useGlonass(); 18 25 bool xyzAprRoverSet(); 26 bool estTropo(); 19 27 std::vector<t_lc::type> LCs(); 20 28 double maxRes(t_lc::type tLC); … … 39 47 std::vector<t_lc::type> _lcGLONASS; 40 48 std::vector<t_lc::type> _lcGalileo; 49 std::vector<t_optBias> _estBias; 41 50 42 51 ColumnVector _xyzAprRover; -
trunk/BNC/src/PPP/parlist.cpp
r5743 r5752 7 7 #include "parlist.h" 8 8 #include "satobs.h" 9 9 10 #include "station.h" 10 #include "tropo.h" 11 #include "iono.h" 12 #include "utils.h" 13 #include "genconst.h" 11 #include "bncutils.h" 12 #include "bncconst.h" 13 #include "pppClient.h" 14 14 15 15 using namespace BNC; … … 33 33 case crdX: 34 34 _epoSpec = true; 35 _sigma0 = OPT-> sigmaCrd();35 _sigma0 = OPT->_sigCrd[0]; 36 36 break; 37 37 case crdY: 38 38 _epoSpec = true; 39 _sigma0 = OPT-> sigmaCrd();39 _sigma0 = OPT->_sigCrd[1]; 40 40 break; 41 41 case crdZ: 42 42 _epoSpec = true; 43 _sigma0 = OPT-> sigmaCrd();43 _sigma0 = OPT->_sigCrd[2]; 44 44 break; 45 45 case clkR: … … 57 57 offGG = PPP_CLIENT->offGG(); 58 58 } 59 _x0 = nint((obs->obsValue(tLC) - offGG - obs->cmpValue(tLC)) / obs->lambda(tLC));59 _x0 = floor((obs->obsValue(tLC) - offGG - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 60 60 break; 61 61 } … … 72 72 case trp: 73 73 _epoSpec = false; 74 _sigma0 = OPT->sigmaTropo(); 75 _noise = OPT->noiseTropo(); 76 break; 77 case iono: 78 if (OPT->noiseIono() > 0.0) { 79 _epoSpec = false; 80 } 81 else { 82 _epoSpec = true; 83 } 84 _sigma0 = OPT->sigmaIono(); 85 _noise = OPT->noiseIono(); 74 _sigma0 = OPT->_sigTropo; 75 _noise = OPT->_noiseTropo; 86 76 break; 87 77 case bias: … … 100 90 // 101 91 //////////////////////////////////////////////////////////////////////////// 102 double t_param::partial(const bncTime& epoTime, const t_satObs* obs,92 double t_param::partial(const bncTime& /* epoTime */, const t_satObs* obs, 103 93 const t_lc::type& tLC) const { 104 94 … … 144 134 return 0.0; 145 135 case trp: 146 return t_tropo::mf(OPT->tropoMF(), epoTime, sta->ellApr()[0], 147 sta->ellApr()[1], sta->ellApr()[2], obs->eleSat()); 148 case iono: 149 if (obs->prn() == _prn) { 150 return t_iono::dLCdI(tLC, obs->prn().system(), obs->channel()); 151 } 152 else { 153 return 0.0; 154 } 136 return 1.0 / sin(obs->eleSat()); 155 137 case bias: 156 138 if (tLC == _tLC && obs->prn().system() == _prn.system()) { … … 191 173 ss << "TRP "; 192 174 break; 193 case iono:194 ss << "IONO " << _prn.toString();195 break;196 175 case bias: 197 176 ss << "BIAS " << _prn.system() << ' ' << left << setw(3) << t_lc::toString(_tLC); … … 237 216 } 238 217 239 else if (par->type() == t_param::amb || par->type() == t_param::iono) {218 else if (par->type() == t_param::amb) { 240 219 if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 3600.0)) { 241 220 remove = true; … … 298 277 // Receiver Biases 299 278 // --------------- 300 for (unsigned ii = 0; ii < OPT-> estBias().size(); ii++) {301 const t_options::t_optBias& optBias = OPT-> estBias()[ii];279 for (unsigned ii = 0; ii < OPT->_estBias.size(); ii++) { 280 const t_options::t_optBias& optBias = OPT->_estBias[ii]; 302 281 required.push_back(new t_param(t_param::bias, t_prn(optBias._system, 1), optBias._tLC)); 303 282 } … … 316 295 const t_satObs* satObs = obsVector[jj]; 317 296 required.push_back(new t_param(t_param::amb, satObs->prn(), tLC, &obsVector)); 318 }319 }320 321 // Stochastic Ionosphere322 //----------------------323 if (OPT->estIono()) {324 for (unsigned jj = 0; jj < obsVector.size(); jj++) {325 const t_satObs* satObs = obsVector[jj];326 required.push_back(new t_param(t_param::iono, satObs->prn(), t_lc::dummy));327 297 } 328 298 } … … 365 335 } 366 336 367 return t_irc::success;337 return success; 368 338 } 369 339 … … 398 368 << setw(8) << setprecision(4) << sqrt(QQ[ind][ind]); 399 369 if (par->type() == t_param::amb) { 400 LOG << " el = " << setw(6) << setprecision(2) << par->ambEleSat() * t_genConst::rho_deg370 LOG << " el = " << setw(6) << setprecision(2) << par->ambEleSat() * 180.0 / M_PI 401 371 << " epo = " << setw(4) << par->ambNumEpo(); 402 372 } -
trunk/BNC/src/PPP/parlist.h
r5743 r5752 14 14 class t_param { 15 15 public: 16 enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, trp, iono,bias};16 enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, trp, bias}; 17 17 18 18 t_param(e_type type, const t_prn& prn, t_lc::type tLC, -
trunk/BNC/src/bncutils.cpp
r5310 r5752 285 285 } 286 286 287 // Jacobian XYZ --> NEU 288 //////////////////////////////////////////////////////////////////////////// 289 void jacobiXYZ_NEU(const double* Ell, Matrix& jacobi) { 290 291 Tracer tracer("jacobiXYZ_NEU"); 292 293 double sinPhi = sin(Ell[0]); 294 double cosPhi = cos(Ell[0]); 295 double sinLam = sin(Ell[1]); 296 double cosLam = cos(Ell[1]); 297 298 jacobi(1,1) = - sinPhi * cosLam; 299 jacobi(1,2) = - sinPhi * sinLam; 300 jacobi(1,3) = cosPhi; 301 302 jacobi(2,1) = - sinLam; 303 jacobi(2,2) = cosLam; 304 jacobi(2,3) = 0.0; 305 306 jacobi(3,1) = cosPhi * cosLam; 307 jacobi(3,2) = cosPhi * sinLam; 308 jacobi(3,3) = sinPhi; 309 } 310 311 // Jacobian Ell --> XYZ 312 //////////////////////////////////////////////////////////////////////////// 313 void jacobiEll_XYZ(const double* Ell, Matrix& jacobi) { 314 315 Tracer tracer("jacobiEll_XYZ"); 316 317 double sinPhi = sin(Ell[0]); 318 double cosPhi = cos(Ell[0]); 319 double sinLam = sin(Ell[1]); 320 double cosLam = cos(Ell[1]); 321 double hh = Ell[2]; 322 323 double bell = t_CST::aell*(1.0-1.0/t_CST::fInv); 324 double e2 = (t_CST::aell*t_CST::aell-bell*bell)/(t_CST::aell*t_CST::aell) ; 325 double nn = t_CST::aell/sqrt(1.0-e2*sinPhi*sinPhi) ; 326 327 jacobi(1,1) = -(nn+hh) * sinPhi * cosLam; 328 jacobi(1,2) = -(nn+hh) * cosPhi * sinLam; 329 jacobi(1,3) = cosPhi * cosLam; 330 331 jacobi(2,1) = -(nn+hh) * sinPhi * sinLam; 332 jacobi(2,2) = (nn+hh) * cosPhi * cosLam; 333 jacobi(2,3) = cosPhi * sinLam; 334 335 jacobi(3,1) = (nn*(1.0-e2)+hh) * cosPhi; 336 jacobi(3,2) = 0.0; 337 jacobi(3,3) = sinPhi; 338 } 339 340 // Covariance Matrix in NEU 341 //////////////////////////////////////////////////////////////////////////// 342 void covariXYZ_NEU(const SymmetricMatrix& QQxyz, const double* Ell, 343 SymmetricMatrix& Qneu) { 344 345 Tracer tracer("covariXYZ_NEU"); 346 347 Matrix CC(3,3); 348 jacobiXYZ_NEU(Ell, CC); 349 Qneu << CC * QQxyz * CC.t(); 350 } 351 352 // Covariance Matrix in XYZ 353 //////////////////////////////////////////////////////////////////////////// 354 void covariNEU_XYZ(const SymmetricMatrix& QQneu, const double* Ell, 355 SymmetricMatrix& Qxyz) { 356 357 Tracer tracer("covariNEU_XYZ"); 358 359 Matrix CC(3,3); 360 jacobiXYZ_NEU(Ell, CC); 361 Qxyz << CC.t() * QQneu * CC; 362 } 363 287 364 // Fourth order Runge-Kutta numerical integrator for ODEs 288 365 //////////////////////////////////////////////////////////////////////////// -
trunk/BNC/src/bncutils.h
r5310 r5752 58 58 void neu2xyz(const double* Ell, const double* neu, double* xyz); 59 59 60 void jacobiXYZ_NEU(const double* Ell, Matrix& jacobi); 61 62 void jacobiEll_XYZ(const double* Ell, Matrix& jacobi); 63 64 void covariXYZ_NEU(const SymmetricMatrix& Qxyz, const double* Ell, 65 SymmetricMatrix& Qneu); 66 67 void covariNEU_XYZ(const SymmetricMatrix& Qneu, const double* Ell, 68 SymmetricMatrix& Qxyz); 69 60 70 ColumnVector rungeKutta4(double xi, const ColumnVector& yi, double dx, 61 71 double* acc, -
trunk/BNC/src/src.pri
r5745 r5752 61 61 PPP/pppThread.h PPP/pppClient.h \ 62 62 PPP/obspool.h PPP/station.h PPP/filter.h PPP/ephpool.h \ 63 PPP/satobs.h PPP/satbias.h 63 PPP/satobs.h PPP/satbias.h PPP/parlist.h 64 64 65 65 HEADERS += serial/qextserialbase.h serial/qextserialport.h … … 92 92 PPP/pppThread.cpp PPP/pppClient.cpp \ 93 93 PPP/obspool.cpp PPP/station.cpp PPP/filter.cpp PPP/ephpool.cpp \ 94 PPP/satobs.cpp PPP/satbias.cpp 94 PPP/satobs.cpp PPP/satbias.cpp PPP/parlist.cpp 95 95 96 96 SOURCES += serial/qextserialbase.cpp serial/qextserialport.cpp
Note:
See TracChangeset
for help on using the changeset viewer.