Changeset 7521 in ntrip for trunk/BNC/src/bncsinextro.cpp


Ignore:
Timestamp:
Oct 19, 2015, 12:53:07 PM (9 years ago)
Author:
stuerze
Message:

minor changes to allow sinex troposphere file writing in version 2.0

File:
1 edited

Legend:

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

    r6658 r7521  
    3030                         int sampl)
    3131  : bncoutf(sklFileName, intr, sampl) {
     32
    3233  _opt       = opt;
    3334  (!sampl) ? _sampl = 1 : _sampl =  sampl;
     35
     36  if (!_opt->_antexFileName.empty()) {
     37    _antex = new bncAntex(_opt->_antexFileName.c_str());
     38  }
     39  else {
     40    _antex = 0;
     41  }
    3442}
    3543
     
    3846bncSinexTro::~bncSinexTro() {
    3947  closeFile();
     48  if (_antex)
     49    delete _antex;
    4050}
    4151
     
    4555  int    GPSWeek;
    4656  double GPSWeeks;
     57  bncSettings settings;
    4758  GPSweekFromDateAndTime(datTim, GPSWeek, GPSWeeks);
    4859  int daysec    = int(fmod(GPSWeeks, 86400.0));
     
    5869                                       .arg(84600    , 5, 10);
    5970
    60 
    61   _out << "%=TRO 0.01 BNC " << creationTime.toStdString() << " BNC "
     71  QString intStr = settings.value("PPP/snxtroIntr").toString();
     72  int intr, indHlp = 0;
     73  if      ((indHlp = intStr.indexOf("min")) != -1) {
     74    intr = intStr.left(indHlp-1).toInt();
     75    intr *= 60;
     76  }
     77  else if ((indHlp = intStr.indexOf("hour")) != -1) {
     78    intr = intStr.left(indHlp-1).toInt();
     79    intr *= 3600;
     80  }
     81  else if ((indHlp = intStr.indexOf("day")) != -1) {
     82    intr = intStr.left(indHlp-1).toInt();
     83    intr *= 86400;
     84  }
     85
     86
     87  QString numberOfEpochs = QString("%1").arg(intr/_sampl, 5, 10, QLatin1Char('0'));
     88  _out << "%=TRO 2.00 BNC " << creationTime.toStdString() << " BNC "
    6289       << startTime.toStdString() << " " << endTime.toStdString() << " P "
    63        << _opt->_roverName.substr(0,4)   << endl;
     90       << numberOfEpochs.toStdString() << " 0 " << " T "  << endl;
    6491
    6592
     
    6895  _out << " OUTPUT             " << "Total Troposphere Zenith Path Delay Product" << endl;
    6996  _out << " SOFTWARE           " << BNCPGMNAME <<  endl;
    70   _out << " HARDWARE           " << BNC_OS << endl;
    7197  _out << " INPUT              " << "Orbit and Clock information used from BRDC and RTCM-SSR streams" << endl;
    7298  _out << "-FILE/REFERENCE" << endl << endl;
     99
     100
     101  _out << "+SITE/ID" << endl;
     102  _out << "-SITE/ID" << endl << endl;
     103
     104
     105  _out << "+SITE/RECEIVER" << endl;
     106  _out << "*SITE PT SOLN T DATA_START__ DATA_END____ DESCRIPTION_________ S/N__ FIRMWARE___" << endl;
     107  _out << " " << _opt->_roverName.substr(0,4) << "  A    1 P "
     108       << startTime.toStdString() << " " << endTime.toStdString() << " " << _opt->_recNameRover << endl;
     109  _out << "-SITE/RECEIVER" << endl << endl;
     110
     111
     112  _out << "+SITE/ANTENNA" << endl;
     113  _out << "*SITE PT SOLN T DATA_START__ DATA_END____ DESCRIPTION_________ S/N__" << endl;
     114  _out << " " << _opt->_roverName.substr(0,4) << "  A    1 P "
     115       << startTime.toStdString() << " " << endTime.toStdString() << " " << _opt->_antNameRover << endl;
     116  _out << "-SITE/ANTENNA" << endl << endl;
     117
     118  if (_antex) {
     119    if (_opt->_LCsGPS.size()) {
     120      _out << "+SITE/GPS_PHASE_CENTER" << endl;
     121      _out << "*                           UP____ NORTH_ EAST__ UP____ NORTH_ EAST__ " << endl;
     122      _out << "*DESCRIPTION_________ S/N__ L1->ARP(M)__________ __L2->ARP(M)________ AZ_EL_____" << endl;
     123      _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
     124           <<  "      "
     125           << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::G1).toStdString()
     126           << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::G2).toStdString()
     127        << endl;
     128      _out << "-SITE/GPS_PHASE_CENTER" << endl << endl;
     129    }
     130    if (_opt->_LCsGLONASS.size()) {
     131      _out << "+SITE/GLONASS_PHASE_CENTER" << endl;
     132      _out << "*                           UP____ NORTH_ EAST__ UP____ NORTH_ EAST__ " << endl;
     133      _out << "*DESCRIPTION_________ S/N__ L1->ARP(M)__________ __L2->ARP(M)________ AZ_EL_____" << endl;
     134      _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
     135           <<  "      "
     136           << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::R1).toStdString()
     137           << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::R2).toStdString()
     138        << endl;
     139      _out << "-SITE/GLONASS_PHASE_CENTER" << endl << endl;
     140    }
     141    if (_opt->_LCsGalileo.size()) {
     142      _out << "+SITE/GALILEO_PHASE_CENTER" << endl;
     143      _out << "*                           UP____ NORTH_ EAST__ UP____ NORTH_ EAST__ " << endl;
     144      _out << "*DESCRIPTION_________ S/N__ L1->ARP(M)__________ __L2->ARP(M)________ AZ_EL_____" << endl;
     145      _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
     146           <<  "      "
     147           << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::E1).toStdString()
     148           << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::E5).toStdString()
     149        << endl;
     150      _out << "-SITE/GALILEO_PHASE_CENTER" << endl << endl;
     151    }
     152    if (_opt->_LCsBDS.size()) {
     153      _out << "+SITE/BEIDOU_PHASE_CENTER" << endl;
     154      _out << "*                           UP____ NORTH_ EAST__ UP____ NORTH_ EAST__ " << endl;
     155      _out << "*DESCRIPTION_________ S/N__ L1->ARP(M)__________ __L2->ARP(M)________ AZ_EL_____" << endl;
     156      _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
     157           <<  "      "
     158           << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::C2).toStdString()
     159           << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::C7).toStdString()
     160        << endl;
     161      _out << "-SITE/BEIDOU_PHASE_CENTER" << endl << endl;
     162    }
     163  }
     164
     165  _out << "+SITE/ECCENTRICITY" << endl;
     166  _out << "*                                             UP______ NORTH___ EAST____" << endl;
     167  _out << "*SITE PT SOLN T DATA_START__ DATA_END____ AXE ARP->BENCHMARK(M)_________" << endl;
     168  _out << " " << _opt->_roverName.substr(0,4) << "  A    1 P "
     169       << startTime.toStdString() << " " << endTime.toStdString() << " " << " UNE"
     170       << QString("%1").arg(_opt->_neuEccRover(3), 9, 'f', 4, QLatin1Char(' ')).toStdString()
     171       << QString("%1").arg(_opt->_neuEccRover(1), 9, 'f', 4, QLatin1Char(' ')).toStdString()
     172       << QString("%1").arg(_opt->_neuEccRover(2), 9, 'f', 4, QLatin1Char(' ')).toStdString() << endl;
     173  _out << "-SITE/ANTENNA" << endl << endl;
     174
     175
     176  _out << "+TROP/COORDINATES" << endl;
     177  _out << "*SITE PT SOLN T __STA_X_____ __STA_Y_____ __STA_Z_____ SYSTEM REMRK" << endl;
     178  _out << " " << _opt->_roverName.substr(0,4) << "  A    1 P"
     179       << QString("%1").arg(_opt->_xyzAprRover(1), 13, 'f', 3, QLatin1Char(' ')).toStdString()
     180       << QString("%1").arg(_opt->_xyzAprRover(2), 13, 'f', 3, QLatin1Char(' ')).toStdString()
     181       << QString("%1").arg(_opt->_xyzAprRover(3), 13, 'f', 3, QLatin1Char(' ')).toStdString()
     182       << " ITRF08"<< endl;
     183  _out << "-TROP/COORDINATES"<< endl << endl;
    73184
    74185
     
    86197
    87198
    88   _out << "+TROP/STA_COORDINATES" << endl;
    89   _out << "*SITE PT SOLN T STA_X_______ STA_Y_______ STA_Z_______ SYSTEM REMARK" << endl;
    90   _out << " " << _opt->_roverName.substr(0,4) << "  A    1 P "
    91        << setw(12) << setprecision(3) << _opt->_xyzAprRover(1) << " "
    92        << setw(12) << setprecision(3) << _opt->_xyzAprRover(2) << " "
    93        << setw(12) << setprecision(3) << _opt->_xyzAprRover(3) << " ITRF08" << endl;
    94   _out << "-TROP/STA_COORDINATES"  << endl << endl;
    95 
    96 
    97199  _out << "+TROP/SOLUTION" << endl;
    98200  _out << "*SITE EPOCH_______ TROTOT STDEV" << endl;
Note: See TracChangeset for help on using the changeset viewer.