Changeset 5802 in ntrip for trunk/BNC/src
- Timestamp:
- Aug 6, 2014, 10:35:19 AM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r5788 r5802 55 55 #include "bncutils.h" 56 56 #include "station.h" 57 #include "bnctides.h"58 57 #include "bncantex.h" 59 58 #include "filter.h" … … 82 81 _staRover = new t_station(); 83 82 _filter = new t_filter(); 83 _tides = new t_tides(); 84 84 85 85 if (!_opt->_antexFile.empty()) { … … 103 103 delete _antex; 104 104 delete _filter; 105 delete _tides; 105 106 clearObs(); 106 107 } … … 379 380 // Tides 380 381 // ----- 381 ColumnVector hlp = station->xyzApr(); 382 tides(time, hlp); 383 station->setTideDspl(hlp - station->xyzApr()); 382 station->setTideDspl( _tides->displacement(time, station->xyzApr()) ); 384 383 385 384 // Observation model -
trunk/BNC/src/PPP/pppClient.h
r5779 r5802 7 7 #include "ephemeris.h" 8 8 #include "options.h" 9 #include "pppModel.h" 9 10 10 11 class bncAntex; … … 65 66 std::ostringstream* _log; 66 67 t_options* _opt; 68 t_tides* _tides; 67 69 }; 68 70 -
trunk/BNC/src/PPP/pppModel.cpp
r5801 r5802 208 208 return dX; 209 209 } 210 211 // Constructor 212 /////////////////////////////////////////////////////////////////////////// 213 t_windUp::t_windUp() { 214 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) { 215 sumWind[ii] = 0.0; 216 lastEtime[ii] = 0.0; 217 } 218 } 219 220 // Phase Wind-Up Correction 221 /////////////////////////////////////////////////////////////////////////// 222 double t_windUp::value(const bncTime& etime, const ColumnVector& rRec, 223 t_prn prn, const ColumnVector& rSat) { 224 225 if (etime.mjddec() != lastEtime[prn.toInt()]) { 226 227 // Unit Vector GPS Satellite --> Receiver 228 // -------------------------------------- 229 ColumnVector rho = rRec - rSat; 230 rho /= rho.norm_Frobenius(); 231 232 // GPS Satellite unit Vectors sz, sy, sx 233 // ------------------------------------- 234 ColumnVector sz = -rSat / rSat.norm_Frobenius(); 235 236 ColumnVector xSun = Sun(etime.mjddec()); 237 xSun /= xSun.norm_Frobenius(); 238 239 ColumnVector sy = crossproduct(sz, xSun); 240 ColumnVector sx = crossproduct(sy, sz); 241 242 // Effective Dipole of the GPS Satellite Antenna 243 // --------------------------------------------- 244 ColumnVector dipSat = sx - rho * DotProduct(rho,sx) 245 - crossproduct(rho, sy); 246 247 // Receiver unit Vectors rx, ry 248 // ---------------------------- 249 ColumnVector rx(3); 250 ColumnVector ry(3); 251 252 double recEll[3]; xyz2ell(rRec.data(), recEll) ; 253 double neu[3]; 254 255 neu[0] = 1.0; 256 neu[1] = 0.0; 257 neu[2] = 0.0; 258 neu2xyz(recEll, neu, rx.data()); 259 260 neu[0] = 0.0; 261 neu[1] = -1.0; 262 neu[2] = 0.0; 263 neu2xyz(recEll, neu, ry.data()); 264 265 // Effective Dipole of the Receiver Antenna 266 // ---------------------------------------- 267 ColumnVector dipRec = rx - rho * DotProduct(rho,rx) 268 + crossproduct(rho, ry); 269 270 // Resulting Effect 271 // ---------------- 272 double alpha = DotProduct(dipSat,dipRec) / 273 (dipSat.norm_Frobenius() * dipRec.norm_Frobenius()); 274 275 if (alpha > 1.0) alpha = 1.0; 276 if (alpha < -1.0) alpha = -1.0; 277 278 double dphi = acos(alpha) / 2.0 / M_PI; // in cycles 279 280 if ( DotProduct(rho, crossproduct(dipSat, dipRec)) < 0.0 ) { 281 dphi = -dphi; 282 } 283 284 if (lastEtime[prn.toInt()] == 0.0) { 285 sumWind[prn.toInt()] = dphi; 286 } 287 else { 288 sumWind[prn.toInt()] = nint(sumWind[prn.toInt()] - dphi) + dphi; 289 } 290 291 lastEtime[prn.toInt()] = etime.mjddec(); 292 } 293 294 return sumWind[prn.toInt()]; 295 } -
trunk/BNC/src/PPP/pppModel.h
r5801 r5802 39 39 }; 40 40 41 class t_windUp { 42 public: 43 t_windUp(); 44 ~t_windUp() {}; 45 double value(const bncTime& etime, const ColumnVector& rRec, t_prn prn, 46 const ColumnVector& rSat); 47 private: 48 double lastEtime[t_prn::MAXPRN+1]; 49 double sumWind[t_prn::MAXPRN+1]; 50 }; 51 41 52 #endif -
trunk/BNC/src/PPP/windup.cpp
r5753 r5802 5 5 #include "windup.h" 6 6 #include "bncutils.h" 7 #include "bnctides.h"8 7 9 8 using namespace std; -
trunk/BNC/src/bncantex.cpp
r5755 r5802 43 43 44 44 #include "bncantex.h" 45 #include " bnctides.h"45 #include "PPP/pppModel.h" 46 46 47 47 using namespace std; … … 236 236 sz /= sqrt(DotProduct(sz,sz)); 237 237 238 ColumnVector xSun = Sun(Mjd);238 ColumnVector xSun = t_astro::Sun(Mjd); 239 239 xSun /= sqrt(DotProduct(xSun,xSun)); 240 240 -
trunk/BNC/src/bncmodel.cpp
r5794 r5802 50 50 #include "bancroft.h" 51 51 #include "bncutils.h" 52 #include " bnctides.h"52 #include "PPP/pppModel.h" 53 53 #include "bncantex.h" 54 54 #include "pppopt.h" … … 187 187 } 188 188 189 _tides = new t_tides; 190 189 191 // Bancroft Coordinates 190 192 // -------------------- … … 213 215 } 214 216 delete _epoData_sav; 217 delete _tides; 215 218 } 216 219 … … 338 341 xRec(3) = z(); 339 342 340 tides(_time, xRec);343 xRec += _tides->displacement(_time, xRec); 341 344 342 345 satData->rho = (satData->xx - xRec).norm_Frobenius(); … … 980 983 ColumnVector sz = -rSat / rSat.norm_Frobenius(); 981 984 982 ColumnVector xSun = Sun(Mjd);985 ColumnVector xSun = t_astro::Sun(Mjd); 983 986 xSun /= xSun.norm_Frobenius(); 984 987 -
trunk/BNC/src/bncmodel.h
r5750 r5802 38 38 class t_pppOpt; 39 39 class bncPPPclient; 40 class t_tides; 40 41 41 42 class bncParam { … … 164 165 QStringList _outlierGlo; 165 166 bncAntex* _antex; 167 t_tides* _tides; 166 168 }; 167 169
Note:
See TracChangeset
for help on using the changeset viewer.