Changeset 8484 in ntrip for branches/BNC_2.12/src/upload
- Timestamp:
- Sep 18, 2018, 12:50:00 PM (6 years ago)
- Location:
- branches/BNC_2.12/src/upload
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp
r8411 r8484 330 330 for (int ii = 1; ii < lines.size(); ii++) { 331 331 QString key; // prn or key VTEC, IND (phase bias indicators) 332 ColumnVector rtnAPC; 333 ColumnVector rtnVel; 334 ColumnVector rtnCoM; 335 double rtnClk; 332 double rtnUra; // [m] 333 ColumnVector rtnAPC; // [m, m, m] 334 ColumnVector rtnVel; // [m/s, m/s, m/s]] 335 ColumnVector rtnCoM; // [m, m, m] 336 ColumnVector rtnClk; // [m, m/s, m/s²] 337 ColumnVector rtnClkSig; // [m, m/s, m/s²] 336 338 t_prn prn; 337 339 … … 432 434 } 433 435 } 434 else if (key == " Clk") {436 else if (key == "Ura") { 435 437 in >> numVal; 436 438 if (numVal == 1) 437 in >> rtnClk; 439 in >> rtnUra; 440 } 441 else if (key == "Clk") { 442 rtnClk.ReSize(3); 443 for (int ii = 0; ii < 3; ii++) { 444 rtnClk[ii] = 0.0; 445 } 446 in >> numVal; 447 for (int ii = 0; ii < numVal; ii++) { 448 in >> rtnClk[ii]; 449 } 450 } 451 else if (key == "ClkSig") { 452 rtnClkSig.ReSize(3); 453 for (int ii = 0; ii < 3; ii++) { 454 rtnClkSig[ii] = 0.0; 455 } 456 in >> numVal; 457 for (int ii = 0; ii < numVal; ii++) { 458 in >> rtnClkSig[ii]; 459 } 438 460 } 439 461 else if (key == "Vel") { … … 523 545 if (sd) { 524 546 QString outLine; 525 processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, 526 rtnClk, rtnVel, rtnCoM, sd, outLine);547 processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, rtnUra, 548 rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine); 527 549 } 528 550 … … 2240 2262 void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek, 2241 2263 double GPSweeks, const QString& prn, const ColumnVector& rtnAPC, 2242 double rtnClk, const ColumnVector& rtnVel, const ColumnVector& rtnCoM, 2264 double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel, 2265 const ColumnVector& rtnCoM, const ColumnVector& rtnClkSig, 2243 2266 struct ClockOrbit::SatData* sd, QString& outLine) { 2244 2267 2245 2268 // Broadcast Position and Velocity 2246 2269 // ------------------------------- 2247 ColumnVector xB( 4);2270 ColumnVector xB(7); 2248 2271 ColumnVector vB(3); 2249 2272 eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false); … … 2273 2296 // Clock Correction 2274 2297 // ---------------- 2275 double dClk = rtnClk - (xB(4) - dc) * t_CST::c; 2298 double dClkA0 = rtnClk(1) - (xB(5) - dc) * t_CST::c; 2299 double dClkA1 = rtnClk(2) - xB(6) * t_CST::c; 2300 double dClkA2 = rtnClk(3) - xB(7) * t_CST::c; 2276 2301 2277 2302 if (sd) { 2278 2303 sd->ID = prn.mid(1).toInt(); 2279 2304 sd->IOD = eph->IOD(); 2280 sd->Clock.DeltaA0 = dClk; 2281 sd->Clock.DeltaA1 = 0.0; // TODO 2282 sd->Clock.DeltaA2 = 0.0; // TODO 2283 sd->Orbit.DeltaRadial = rsw(1); 2305 sd->Clock.DeltaA0 = dClkA0; 2306 sd->Clock.DeltaA1 = dClkA1; 2307 sd->Clock.DeltaA2 = dClkA2; 2308 sd->UserRangeAccuracy = rtnUra; 2309 sd->Orbit.DeltaRadial = rsw(1); 2284 2310 sd->Orbit.DeltaAlongTrack = rsw(2); 2285 2311 sd->Orbit.DeltaCrossTrack = rsw(3); 2286 sd->Orbit.DotDeltaRadial = dotRsw(1);2312 sd->Orbit.DotDeltaRadial = dotRsw(1); 2287 2313 sd->Orbit.DotDeltaAlongTrack = dotRsw(2); 2288 2314 sd->Orbit.DotDeltaCrossTrack = dotRsw(3); 2289 2315 } 2290 2316 2291 outLine.sprintf("%d %.1f %s %u %10.3f %8.3f %8.3f %8.3f\n", GPSweek,2292 GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClk , rsw(1), rsw(2),2293 rsw( 3));2317 outLine.sprintf("%d %.1f %s %u %10.3f %8.3f %8.3f %8.3f %8.3f %8.3f\n", GPSweek, 2318 GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClkA0, dClkA1, dClkA2, 2319 rsw(1), rsw(2), rsw(3)); 2294 2320 2295 2321 double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c; 2296 double sp3Clk = (rtnClk - relativity) / t_CST::c; // in seconds 2322 double clkRnx = (rtnClk[0] - relativity) / t_CST::c; // in seconds 2323 double clkRnxRate = rtnClk[1] / t_CST::c; // [s/s = -] 2324 double clkRnxAcc = rtnClk[2] / t_CST::c; // [s/s² ) -/s] 2297 2325 2298 2326 if (_rnx) { 2299 _rnx->write(GPSweek, GPSweeks, prn, sp3Clk); 2327 double clkRnxSig = rtnClkSig[0] / t_CST::c; // in seconds 2328 double clkRnxRateSig = rtnClkSig[1] / t_CST::c; // [s/s = -] 2329 double clkRnxAccSig = rtnClkSig[2] / t_CST::c; // [s/s² ) -/s] 2330 _rnx->write(GPSweek, GPSweeks, prn, clkRnx, clkRnxRate, clkRnxAcc, 2331 clkRnxSig, clkRnxRateSig, clkRnxAccSig); 2300 2332 } 2301 2333 if (_sp3) { 2302 _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk);2334 _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate); 2303 2335 } 2304 2336 } … … 2356 2388 meanSta(3) = 0.0; // TODO 2357 2389 } 2358 2390 2359 2391 // Clock correction proportional to topocentric distance to satellites 2360 2392 // ------------------------------------------------------------------- -
branches/BNC_2.12/src/upload/bncrtnetuploadcaster.h
r8415 r8484 32 32 double GPSweeks, const QString& prn, 33 33 const ColumnVector& rtnAPC, 34 double rtnClk, 34 double ura, 35 const ColumnVector& rtnClk, 35 36 const ColumnVector& rtnVel, 36 37 const ColumnVector& rtnCoM, 38 const ColumnVector& rtnClkSig, 37 39 struct ClockOrbit::SatData* sd, 38 40 QString& outLine);
Note:
See TracChangeset
for help on using the changeset viewer.