Changeset 8483 in ntrip for trunk/BNC/src/satObs.cpp


Ignore:
Timestamp:
Sep 17, 2018, 2:53:30 PM (6 years ago)
Author:
stuerze
Message:

SSR parameter clock rate, clock drift and URA are added within RTNET format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/satObs.cpp

    r7058 r8483  
    1818}
    1919
    20 // 
     20//
    2121////////////////////////////////////////////////////////////////////////////
    2222void t_clkCorr::writeEpoch(ostream* out, const QList<t_clkCorr>& corrList) {
     
    4343}
    4444
    45 // 
     45//
    4646////////////////////////////////////////////////////////////////////////////
    4747void t_clkCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_clkCorr>& corrList) {
     
    6262    getline(inStream, line);
    6363    istringstream in(line.c_str());
    64    
     64
    6565    in >> corr._prn >> corr._iod >> corr._dClk >> corr._dotDClk >> corr._dotDotDClk;
    6666    if (corr._prn.system() == 'E') {
     
    8585}
    8686
    87 // 
     87//
    8888////////////////////////////////////////////////////////////////////////////
    8989void t_orbCorr::writeEpoch(ostream* out, const QList<t_orbCorr>& corrList) {
     
    113113}
    114114
    115 // 
     115//
    116116////////////////////////////////////////////////////////////////////////////
    117117void t_orbCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_orbCorr>& corrList) {
     
    132132    getline(inStream, line);
    133133    istringstream in(line.c_str());
    134    
     134
    135135    in >> corr._prn      >> corr._iod
    136        >> corr._xr[0]    >> corr._xr[1]    >> corr._xr[2]   
     136       >> corr._xr[0]    >> corr._xr[1]    >> corr._xr[2]
    137137       >> corr._dotXr[0] >> corr._dotXr[1] >> corr._dotXr[2];
    138138
     
    144144}
    145145
    146 //
     146// Constructor
     147////////////////////////////////////////////////////////////////////////////
     148t_URA::t_URA() {
     149  _updateInt  = 0;
     150  _iod        = 0;
     151  _ura        = 0.0;
     152}
     153
     154//
     155////////////////////////////////////////////////////////////////////////////
     156void t_URA::writeEpoch(ostream* out, const QList<t_URA>& corrList) {
     157  if (!out || corrList.size() == 0) {
     158    return;
     159  }
     160  out->setf(ios::fixed);
     161  bncTime epoTime;
     162  QListIterator<t_URA> it(corrList);
     163  while (it.hasNext()) {
     164    const t_URA& corr = it.next();
     165    if (!epoTime.valid()) {
     166      epoTime = corr._time;
     167      *out << "> URA " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " "
     168          <<  corr._updateInt <<  " "
     169           << corrList.size() << ' ' << corr._staID << endl;
     170    }
     171    *out << corr._prn.toString() << ' ' << setw(11) << corr._iod << ' '
     172         << setw(10) << setprecision(4) << corr._ura << endl;
     173  }
     174  out->flush();
     175}
     176
     177//
     178////////////////////////////////////////////////////////////////////////////
     179void t_URA::readEpoch(const string& epoLine, istream& inStream, QList<t_URA>& corrList) {
     180  bncTime      epoTime;
     181  unsigned int updateInt;
     182  int          numCorr;
     183  string       staID;
     184  if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numCorr, staID) != t_corrSSR::URA) {
     185    return;
     186  }
     187  for (int ii = 0; ii < numCorr; ii++) {
     188    t_URA corr;
     189    corr._time      = epoTime;
     190    corr._updateInt = updateInt;
     191    corr._staID     = staID;
     192
     193    string line;
     194    getline(inStream, line);
     195    istringstream in(line.c_str());
     196
     197    in >> corr._prn >> corr._iod >> corr._ura;
     198
     199    corrList.push_back(corr);
     200  }
     201}
     202
     203//
    147204////////////////////////////////////////////////////////////////////////////
    148205void t_satCodeBias::writeEpoch(ostream* out, const QList<t_satCodeBias>& biasList) {
     
    172229}
    173230
    174 // 
     231//
    175232////////////////////////////////////////////////////////////////////////////
    176233void t_satCodeBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satCodeBias>& biasList) {
     
    191248    getline(inStream, line);
    192249    istringstream in(line.c_str());
    193    
     250
    194251    int numBias;
    195252    in >> satCodeBias._prn >> numBias;
     
    207264}
    208265
    209 // 
     266//
    210267////////////////////////////////////////////////////////////////////////////
    211268void t_satPhaseBias::writeEpoch(ostream* out, const QList<t_satPhaseBias>& biasList) {
     
    242299  out->flush();
    243300}
    244  
    245 // 
     301
     302//
    246303////////////////////////////////////////////////////////////////////////////
    247304void t_satPhaseBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satPhaseBias>& biasList) {
     
    290347}
    291348
    292 // 
     349//
    293350////////////////////////////////////////////////////////////////////////////
    294351void t_vTec::write(ostream* out, const t_vTec& vTec) {
     
    306363         << setw(2)  << layer._C.Nrows()-1 << ' '
    307364         << setw(2)  << layer._C.Ncols()-1 << ' '
    308          << setw(10) << setprecision(1) << layer._height << endl 
    309          << setw(10) << setprecision(4) << layer._C 
     365         << setw(10) << setprecision(1) << layer._height << endl
     366         << setw(10) << setprecision(4) << layer._C
    310367         << setw(10) << setprecision(4) << layer._S;
    311368  }
     
    313370}
    314371
    315 // 
     372//
    316373////////////////////////////////////////////////////////////////////////////
    317374void t_vTec::read(const string& epoLine, istream& inStream, t_vTec& vTec) {
     
    357414}
    358415
    359 // 
    360 ////////////////////////////////////////////////////////////////////////////
    361 t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime, 
     416//
     417////////////////////////////////////////////////////////////////////////////
     418t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime,
    362419                                         unsigned int& updateInt, int& numEntries,
    363420                                         string& staID) {
     
    370427  double sec;
    371428
    372   inLine >> epoChar >> typeString 
     429  inLine >> epoChar >> typeString
    373430         >> year >> month >> day >> hour >> min >> sec >> updateInt >> numEntries >> staID;
    374431
     
    390447      return vTec;
    391448    }
     449    else if (typeString == "URA") {
     450      return URA;
     451    }
    392452  }
    393453
Note: See TracChangeset for help on using the changeset viewer.