Changeset 75 in ntrip for trunk/BNC/bncrinex.cpp


Ignore:
Timestamp:
Aug 27, 2006, 9:59:32 AM (18 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncrinex.cpp

    r74 r75  
    1616 * -----------------------------------------------------------------------*/
    1717
     18#include <iomanip>
     19
    1820#include "bncrinex.h"
     21
     22#include "RTCM3/rtcm3torinex.h"
     23
     24using namespace std;
    1925
    2026// Constructor
     
    4147void bncRinex::dumpEpoch() {
    4248
    43   QListIterator<Observation*> it(_obs);
     49  // Easy Return
     50  // -----------
     51  if (_obs.isEmpty()) {
     52    return;
     53  }
     54
     55  // Time of Epoch
     56  // -------------
     57  struct converttimeinfo cti;
     58  Observation* firstObs = *_obs.begin();
     59  converttime(&cti, firstObs->GPSWeek, firstObs->GPSWeeks);
     60
     61  cout.setf(std::ios::fixed);
     62
     63  cout << setw(3)  << cti.year%100
     64       << setw(3)  << cti.month
     65       << setw(3)  << cti.day
     66       << setw(3)  << cti.hour
     67       << setw(3)  << cti.minute
     68       << setw(11) << setprecision(7)
     69       << cti.second + fmod(firstObs->sec, 1.0)
     70       << "  " << 0 << setw(3)  << _obs.size();
     71
     72  QListIterator<Observation*> it(_obs); int iSat = 0;
    4473  while (it.hasNext()) {
    45     Observation* obs = it.next();
    46     cout <<       obs->StatID    << " "
    47          << (int) obs->SVPRN     << " "
    48          << (int) obs->GPSWeek   << " "
    49          <<       obs->GPSWeeks  << " "
    50          <<       obs->sec       << " "
    51          <<       obs->pCodeIndicator << " "
    52          <<       obs->cumuLossOfCont << " "
    53          <<       obs->C1        << " "
    54          <<       obs->P2        << " "
    55          <<       obs->L1        << " "
    56          <<       obs->L2        << endl;
    57     delete obs;
     74    iSat++;
     75    Observation* ob = it.next();
     76    cout << " " << setw(2) << ob->SVPRN;
     77    if (iSat == 12 && it.hasNext()) {
     78      cout << endl << "                                ";
     79      iSat = 0;
     80    }
    5881  }
     82  cout << endl;
     83
     84  cout.precision(3);
     85
     86  it.toFront();
     87  while (it.hasNext()) {
     88    Observation* ob = it.next();
     89    cout << setw(14) << ob->C1
     90         << setw(14) << ob->P2
     91         << setw(14) << ob->L1
     92         << setw(14) << ob->L2 << endl;
     93    delete ob;
     94  }
     95
    5996  _obs.clear();
    6097}
Note: See TracChangeset for help on using the changeset viewer.