Changeset 6213 in ntrip for trunk/BNC/src/ephemeris.cpp
- Timestamp:
- Oct 5, 2014, 5:15:25 PM (10 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.