Changeset 1029 in ntrip for trunk/BNC/bncrinex.cpp
- Timestamp:
- Aug 8, 2008, 8:02:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncrinex.cpp
r1024 r1029 93 93 _rinexVers = 2; 94 94 } 95 96 _approxPos[0] = _approxPos[1] = _approxPos[2] = 0.0;97 95 } 98 96 … … 449 447 // ------------------ 450 448 else { 449 double approxPos[3]; approxPos[0] = approxPos[1] = approxPos[2] = 0.0; 451 450 double antennaNEU[3]; antennaNEU[0] = antennaNEU[1] = antennaNEU[2] = 0.0; 452 451 … … 478 477 << setw(20) << " " << "ANT # / TYPE" << endl; 479 478 _out.unsetf(ios::left); 480 _out << setw(14) << setprecision(4) << _approxPos[0]481 << setw(14) << setprecision(4) << _approxPos[1]482 << setw(14) << setprecision(4) << _approxPos[2]479 _out << setw(14) << setprecision(4) << approxPos[0] 480 << setw(14) << setprecision(4) << approxPos[1] 481 << setw(14) << setprecision(4) << approxPos[2] 483 482 << " " << "APPROX POSITION XYZ" << endl; 484 483 _out << setw(14) << setprecision(4) << antennaNEU[0] … … 566 565 double sec = double(datTim.time().second()) + fmod(fObs->_o.GPSWeeks,1.0); 567 566 568 // Epoch header line:RINEX Version 3569 // --------------- -------------------567 // RINEX Version 3 568 // --------------- 570 569 if (_rinexVers == 3) { 570 char sbasflag = 'S'; 571 571 _out << datTim.toString("> yyyy MM dd hh mm ").toAscii().data() 572 572 << setw(10) << setprecision(7) << sec 573 573 << " " << 0 << setw(3) << dumpList.size() << endl; 574 } 575 // Epoch header line: RINEX Version 2 576 // ---------------------------------- 574 575 QListIterator<p_obs> it(dumpList); 576 while (it.hasNext()) { 577 p_obs obs = it.next(); 578 // Changed data output, C1P, C2C|X, L2C|X, S2C|X added. Changed Output for SBAS Perlt 579 if (sbasflag != obs->_o.satSys) { 580 _out << obs->_o.satSys 581 << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ') 582 << setw(14) << setprecision(3) << obs->_o.C1 << " " 583 << setw(14) << setprecision(3) << obs->_o.P1 << " " 584 << setw(14) << setprecision(3) << obs->_o.L1 << " " 585 << setw(1) << obs->_o.SNR1 586 << setw(14) << setprecision(3) << obs->_o.S1 << " " 587 << setw(14) << setprecision(3) << obs->_o.C2 << " " 588 << setw(14) << setprecision(3) << obs->_o.P2 << " " ; 589 if ((obs->_o.C2 != 0.0) && (obs->_o.P2 == 0.0)) { 590 _out << setw(14) << setprecision(3) << obs->_o.L2 << " " 591 << setw(1) << obs->_o.SNR2 592 << setw(14) << setprecision(3) << obs->_o.S2 << " " 593 << " 0.000 0.000 "; 594 } 595 else { 596 _out << " 0.000 0.000 " 597 << setw(14) << setprecision(3) << obs->_o.L2 << " " 598 << setw(1) << obs->_o.SNR2 599 << setw(14) << setprecision(3) << obs->_o.S2; 600 } 601 _out << endl; 602 } 603 else { 604 _out << obs->_o.satSys 605 << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ') 606 << setw(14) << setprecision(3) << obs->_o.C1 << " " 607 << setw(14) << setprecision(3) << obs->_o.P1 << " " 608 << setw(14) << setprecision(3) << obs->_o.L1 << " " 609 << setw(1) << obs->_o.SNR1 610 << setw(14) << setprecision(3) << obs->_o.S1 << endl; 611 } 612 delete obs; 613 } 614 } 615 616 // RINEX Version 2 617 // --------------- 577 618 else { 578 619 _out << datTim.toString(" yy MM dd hh mm ").toAscii().data() 579 620 << setw(10) << setprecision(7) << sec 580 621 << " " << 0 << setw(3) << dumpList.size(); 581 622 582 623 QListIterator<p_obs> it(dumpList); int iSat = 0; 583 624 while (it.hasNext()) { … … 591 632 } 592 633 _out << endl; 593 } 594 595 QListIterator<p_obs> it(dumpList); 596 while (it.hasNext()) { 597 p_obs obs = it.next(); 598 599 // Cycle slips detection 600 // --------------------- 601 int prn = 0; 602 switch (obs->_o.satSys) { 603 case 'G': prn = obs->_o.satNum; break; 604 case 'R': prn = obs->_o.satNum + 200; break; 605 default: prn = obs->_o.satNum; 606 } 607 608 int lli1 = 0; 609 int lli2 = 0; 610 if ( _slip_cnt_L1.find(prn) != _slip_cnt_L1.end() && 611 _slip_cnt_L1.find(prn).value() != obs->_o.slip_cnt_L1 ) { 612 lli1 = 1; 613 } 614 if ( _slip_cnt_L2.find(prn) != _slip_cnt_L2.end() && 615 _slip_cnt_L2.find(prn).value() != obs->_o.slip_cnt_L2 ) { 616 lli2 = 1; 617 } 618 _slip_cnt_L1[prn]= obs->_o.slip_cnt_L1; 619 _slip_cnt_L2[prn]= obs->_o.slip_cnt_L2; 620 621 // RINEX Version 3 622 // --------------- 623 if (_rinexVers == 3) { 624 char sbasflag = 'S'; 625 // Changed data output, C1P, C2C|X, L2C|X, S2C|X added. Changed Output for SBAS Perlt 626 if (sbasflag != obs->_o.satSys) { 627 _out << obs->_o.satSys 628 << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ') 629 << setw(14) << setprecision(3) << obs->_o.C1 << " " 630 << setw(14) << setprecision(3) << obs->_o.P1 << " " 631 << setw(14) << setprecision(3) << obs->_o.L1 << lli1 632 << setw(1) << obs->_o.SNR1 633 << setw(14) << setprecision(3) << obs->_o.S1 << " " 634 << setw(14) << setprecision(3) << obs->_o.C2 << " " 635 << setw(14) << setprecision(3) << obs->_o.P2 << " " ; 636 if ((obs->_o.C2 != 0.0) && (obs->_o.P2 == 0.0)) { 637 _out << setw(14) << setprecision(3) << obs->_o.L2 << lli2 638 << setw(1) << obs->_o.SNR2 639 << setw(14) << setprecision(3) << obs->_o.S2 << " " 640 << " 0.000 0.000 "; 641 } 642 else { 643 _out << " 0.000 0.000 " 644 << setw(14) << setprecision(3) << obs->_o.L2 << " " 645 << setw(1) << obs->_o.SNR2 646 << setw(14) << setprecision(3) << obs->_o.S2; 647 } 648 _out << endl; 649 } 650 else { 651 _out << obs->_o.satSys 652 << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ') 653 << setw(14) << setprecision(3) << obs->_o.C1 << " " 654 << setw(14) << setprecision(3) << obs->_o.P1 << " " 655 << setw(14) << setprecision(3) << obs->_o.L1 << lli1 656 << setw(1) << obs->_o.SNR1 657 << setw(14) << setprecision(3) << obs->_o.S1 << endl; 658 } 659 } 660 661 // RINEX Version 2 662 // --------------- 663 else { 634 635 it.toFront(); 636 while (it.hasNext()) { 637 p_obs obs = it.next(); 638 664 639 char lli = ' '; 665 640 char snr = ' '; … … 668 643 _out << setw(14) << setprecision(3) << obs->_o.P1 << lli << snr; 669 644 _out << setw(14) << setprecision(3) << obs->_o.P2 << lli << snr; 670 _out << setw(14) << setprecision(3) << obs->_o.L1 << lli 1645 _out << setw(14) << setprecision(3) << obs->_o.L1 << lli 671 646 << setw(1) << obs->_o.SNR1 << endl; 672 _out << setw(14) << setprecision(3) << obs->_o.L2 << lli 2647 _out << setw(14) << setprecision(3) << obs->_o.L2 << lli 673 648 << setw(1) << obs->_o.SNR2; 674 649 _out << setw(14) << setprecision(3) << obs->_o.S1 ; 675 650 _out << setw(16) << setprecision(3) << obs->_o.S2 ; 676 651 _out << endl; 677 }678 679 delete obs;652 653 delete obs; 654 } 680 655 } 681 656
Note:
See TracChangeset
for help on using the changeset viewer.