Changeset 8484 in ntrip for branches/BNC_2.12/src/RTCM
- Timestamp:
- Sep 18, 2018, 12:50:00 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/RTCM/rtcm_utils.cpp
r6139 r8484 10 10 11 11 void resolveEpoch (double secsHour, 12 int refWeek, double refSecs, 12 int refWeek, double refSecs, 13 13 int& epochWeek, double& epochSecs) { 14 14 15 const double secsPerWeek = 604800.0; 15 const double secsPerWeek = 604800.0; 16 16 17 17 epochWeek = refWeek; 18 18 epochSecs = secsHour + 3600.0*(floor((refSecs-secsHour)/3600.0+0.5)); 19 19 20 20 if (epochSecs<0 ) { epochWeek--; epochSecs+=secsPerWeek; }; 21 21 if (epochSecs>secsPerWeek) { epochWeek++; epochSecs-=secsPerWeek; }; … … 29 29 double& xSat, double& ySat, double& zSat, double& clkSat) { 30 30 31 const double omega_earth = 7292115.1467e-11; 32 const double secsPerWeek = 604800.0; 31 const double omega_earth = 7292115.1467e-11; 32 const double secsPerWeek = 604800.0; 33 33 34 34 // Initial values 35 35 // -------------- 36 36 rho = 0.0; 37 ColumnVector xc( 4);37 ColumnVector xc(7); 38 38 ColumnVector vv(3); 39 39 eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false); … … 45 45 ////cout << "----- cmpRho -----\n"; 46 46 ////eph->print(cout); 47 ////cout << " pos " << setw(4) << GPSWeek 47 ////cout << " pos " << setw(4) << GPSWeek 48 48 //// << " " << setw(14) << setprecision(6) << GPSWeeks 49 49 //// << " " << setw(13) << setprecision(3) << xSat … … 57 57 do { 58 58 rhoLast = rho; 59 59 60 60 // Correction station position due to Earth Rotation 61 61 // ------------------------------------------------- 62 62 double dPhi = omega_earth * rho / c_light; 63 double xRec = stax * cos(dPhi) - stay * sin(dPhi); 64 double yRec = stay * cos(dPhi) + stax * sin(dPhi); 63 double xRec = stax * cos(dPhi) - stay * sin(dPhi); 64 double yRec = stay * cos(dPhi) + stax * sin(dPhi); 65 65 double zRec = staz; 66 66 … … 81 81 GPSWeek_tot += 1; 82 82 } 83 83 84 84 eph->getCrd(bncTime(GPSWeek_tot, GPSWeeks_tot), xc, vv, false); 85 85 xSat = xc(1); … … 94 94 rho = sqrt(dx*dx + dy*dy + dz*dz); 95 95 96 ////cout << " scrd " << setw(4) << GPSWeek_tot 96 ////cout << " scrd " << setw(4) << GPSWeek_tot 97 97 //// << " " << setw(15) << setprecision(8) << GPSWeeks_tot 98 98 //// << " " << setw(13) << setprecision(3) << xSat … … 108 108 //// << " rho " << setw(13) << setprecision(3) << rho 109 109 //// << endl; 110 110 111 111 112 112 ////cout.setf(ios::fixed); 113 113 //// 114 ////cout << "niter " << setw(3) << ++niter 114 ////cout << "niter " << setw(3) << ++niter 115 115 //// << " " << setw(14) << setprecision(3) << rhoLast 116 116 //// << " " << setw(14) << setprecision(3) << rho
Note:
See TracChangeset
for help on using the changeset viewer.