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