Changeset 6213 in ntrip
- Timestamp:
- Oct 5, 2014, 5:15:25 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/ephemeris.cpp
r6141 r6213 44 44 xc.ReSize(4); 45 45 vv.ReSize(3); 46 position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data()); 46 if (position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data()) != success) { 47 return failure; 48 } 47 49 if (useCorr) { 48 50 if (_orbCorr && _clkCorr) { … … 128 130 // Compute GPS Satellite Position (virtual) 129 131 //////////////////////////////////////////////////////////////////////////// 130 void t_ephGPS::position(int GPSweek, double GPSweeks, 131 double* xc, 132 double* vv) const { 133 132 t_irc t_ephGPS::position(int GPSweek, double GPSweeks, double* xc, double* vv) const { 134 133 135 134 static const double omegaEarth = 7292115.1467e-11; … … 141 140 double a0 = _sqrt_A * _sqrt_A; 142 141 if (a0 == 0) { 143 return ;142 return failure; 144 143 } 145 144 … … 207 206 // ----------------------- 208 207 xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c; 208 209 return success; 209 210 } 210 211 … … 248 249 // Compute Glonass Satellite Position (virtual) 249 250 //////////////////////////////////////////////////////////////////////////// 250 void t_ephGlo::position(int GPSweek, double GPSweeks, 251 double* xc, double* vv) const { 251 t_irc t_ephGlo::position(int GPSweek, double GPSweeks, double* xc, double* vv) const { 252 252 253 253 static const double nominalStep = 10.0; … … 257 257 258 258 double dtPos = bncTime(GPSweek, GPSweeks) - _tt; 259 260 if (fabs(dtPos) > 24*3600.0) { 261 return failure; 262 } 259 263 260 264 int nSteps = int(fabs(dtPos) / nominalStep) + 1; … … 284 288 double dtClk = bncTime(GPSweek, GPSweeks) - _TOC; 285 289 xc[3] = -_tau + _gamma * dtClk; 290 291 return success; 286 292 } 287 293 … … 442 448 // Compute Galileo Satellite Position (virtual) 443 449 //////////////////////////////////////////////////////////////////////////// 444 void t_ephGal::position(int GPSweek, double GPSweeks, 445 double* xc, 446 double* vv) const { 450 t_irc t_ephGal::position(int GPSweek, double GPSweeks, double* xc, double* vv) const { 447 451 448 452 static const double omegaEarth = 7292115.1467e-11; … … 454 458 double a0 = _sqrt_A * _sqrt_A; 455 459 if (a0 == 0) { 456 return ;460 return failure; 457 461 } 458 462 … … 521 525 // xc(4) -= 4.442807633e-10 * _e * sqrt(a0) *sin(E); 522 526 xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c; 527 528 return success; 523 529 } 524 530 -
trunk/BNC/src/ephemeris.h
r6141 r6213 41 41 42 42 protected: 43 virtual voidposition(int GPSweek, double GPSweeks, double* xc, double* vv) const = 0;43 virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const = 0; 44 44 t_prn _prn; 45 45 bncTime _TOC; … … 65 65 66 66 private: 67 virtual voidposition(int GPSweek, double GPSweeks, double* xc, double* vv) const;67 virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const; 68 68 69 69 double _clock_bias; // [s] … … 119 119 120 120 private: 121 virtual voidposition(int GPSweek, double GPSweeks, double* xc, double* vv) const;121 virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const; 122 122 static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv, double* acc); 123 123 … … 159 159 160 160 private: 161 virtual voidposition(int GPSweek, double GPSweeks, double* xc, double* vv) const;161 virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const; 162 162 163 163 double _clock_bias; // [s] -
trunk/BNC/src/rinex/reqcanalyze.cpp
r6137 r6213 538 538 ColumnVector xc(4); 539 539 ColumnVector vv(3); 540 eph->getCrd(bncTime(oneObs->_GPSWeek, oneObs->_GPSWeeks), xc, vv, false); 541 542 double rho, eleSat, azSat; 543 topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat); 544 545 aziDeg = azSat * 180.0/M_PI; 546 zenDeg = 90.0 - eleSat * 180.0/M_PI; 547 zenFlag = true; 540 if (eph->getCrd(bncTime(oneObs->_GPSWeek, oneObs->_GPSWeeks), xc, vv, false) == success) { 541 double rho, eleSat, azSat; 542 topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat); 543 aziDeg = azSat * 180.0/M_PI; 544 zenDeg = 90.0 - eleSat * 180.0/M_PI; 545 zenFlag = true; 546 } 548 547 } 549 548 } … … 742 741 } 743 742 if (eph) { 744 ++nSatUsed;745 743 ColumnVector xSat(4); 746 744 ColumnVector vv(3); 747 eph->getCrd(_currEpo->tt, xSat, vv, false); 748 ColumnVector dx = xSat.Rows(1,3) - xyzSta; 749 double rho = dx.norm_Frobenius(); 750 AA(nSatUsed,1) = dx(1) / rho; 751 AA(nSatUsed,2) = dx(2) / rho; 752 AA(nSatUsed,3) = dx(3) / rho; 753 AA(nSatUsed,4) = 1.0; 745 if (eph->getCrd(_currEpo->tt, xSat, vv, false) == success) { 746 ++nSatUsed; 747 ColumnVector dx = xSat.Rows(1,3) - xyzSta; 748 double rho = dx.norm_Frobenius(); 749 AA(nSatUsed,1) = dx(1) / rho; 750 AA(nSatUsed,2) = dx(2) / rho; 751 AA(nSatUsed,3) = dx(3) / rho; 752 AA(nSatUsed,4) = 1.0; 753 } 754 754 } 755 755 }
Note:
See TracChangeset
for help on using the changeset viewer.