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


Ignore:
Timestamp:
Nov 22, 2022, 1:49:32 PM (17 months ago)
Author:
stuerze
Message:

minor changes regarrding sinex tro files

File:
1 edited

Legend:

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

    r9424 r9889  
    3131  : bncoutf(sklFileName, intr, sampl) {
    3232
    33   _opt       = opt;
     33  _opt   = opt;
    3434  _sampl =  sampl;
    3535
     
    8181  QString epo  = QString("%1").arg(numEpochs, 5, 10, QLatin1Char('0'));
    8282  QString ac   = QString("%1").arg(settings.value("PPP/snxtroAc").toString(),3,QLatin1Char(' '));
    83   QString sol  = QString("%1").arg(settings.value("PPP/snxtroSol").toString(),4,QLatin1Char(' '));
    84   QString corr = settings.value("PPP/corrMount").toString();
     83  QString sol  = QString("   %1").arg(settings.value("PPP/snxtroSol").toString(),1,QLatin1Char(' '));
     84  QString corr = "";
     85  if      (settings.value("PPP/dataSource").toString() == "Real-Time Streams") {
     86    corr = settings.value("PPP/corrMount").toString();
     87  }
     88  else if (settings.value("PPP/dataSource").toString() == "RINEX Files") {
     89    corr = settings.value("PPP/corrFile").toString();
     90  }
     91
     92  QString signalPriorities = QString::fromStdString(_opt->_signalPriorities);
     93  if (!signalPriorities.size()) {
     94    signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX";
     95  }
     96  QStringList priorList = signalPriorities.split(" ", QString::SkipEmptyParts);
     97  QStringList frqStrList;
     98  for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
     99    t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
     100    char frqSys = t_frequency::toString(frqType)[0];
     101    char frqNum = t_frequency::toString(frqType)[1];
     102    QStringList hlp;
     103    for (int ii = 0; ii < priorList.size(); ii++) {
     104      if (priorList[ii].indexOf(":") != -1) {
     105        hlp = priorList[ii].split(":", QString::SkipEmptyParts);
     106        if (hlp.size() == 2 && hlp[0].length() == 1 && hlp[0][0] == frqSys) {
     107          hlp = hlp[1].split("&", QString::SkipEmptyParts);
     108        }
     109        if (hlp.size() == 2 && hlp[0].indexOf(frqNum) != -1) {
     110          frqStrList.append(QString("%1%2").arg(frqSys).arg(frqNum));
     111        }
     112      }
     113    }
     114  }
    85115
    86116  _out << "%=TRO 2.00 " << ac.toStdString() << " "
     
    93123  _out << " OUTPUT             " << "Total Troposphere Zenith Path Delay Product" << endl;
    94124  _out << " SOFTWARE           " <<  BNCPGMNAME <<  endl;
    95   _out << " INPUT              " << "Ntrip streams, additional Orbit and Clock information from "
    96                                  << corr.toStdString() <<endl;
     125  _out << " INPUT              " << "Observations_: " << _opt->_roverName.substr(0,9)
     126                                 << ", SSR corrections: "  << corr.toStdString() << endl;
    97127  _out << "-FILE/REFERENCE" << endl << endl;
    98128
     
    114144  }
    115145  _out << "+SITE/ID" << endl;
    116   _out << "*CODE PT DOMES____ T _STATION DESCRIPTION__ APPROX_LON_ APPROX_LAT_ _APP_H_" << endl;
    117   _out << " " << _opt->_roverName.substr(0,4) << "  A           P "
     146  _out << "*CODE      PT DOMES____ T _STATION DESCRIPTION__ APPROX_LON_ APPROX_LAT_ _APP_H_" << endl;
     147  _out << " " << _opt->_roverName.substr(0,9) << "  A           P "
    118148       << country.toStdString() << "                   "
    119149       << QString(" %1").arg(lonD, 3, 10, QLatin1Char(' ')).toStdString()
     
    129159  if (!_opt->_recNameRover.empty()) {
    130160    _out << "+SITE/RECEIVER" << endl;
    131     _out << "*SITE PT SOLN T DATA_START__ DATA_END____ DESCRIPTION_________ S/N__ FIRMWARE___" << endl;
    132     _out << " " << _opt->_roverName.substr(0,4) << "  A "  <<  sol.toStdString() << " P "
     161    _out << "*SITE      PT SOLN T DATA_START__ DATA_END____ DESCRIPTION_________ S/N__ FIRMWARE___" << endl;
     162    _out << " " << _opt->_roverName.substr(0,9) << "  A "  <<  sol.toStdString() << " P "
    133163         << startTime.toStdString() << " " << endTime.toStdString()
    134164         << QString(" %1").arg(_opt->_recNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
     
    138168
    139169  _out << "+SITE/ANTENNA" << endl;
    140   _out << "*SITE PT SOLN T DATA_START__ DATA_END____ DESCRIPTION_________ S/N__" << endl;
    141   _out << " " << _opt->_roverName.substr(0,4) << "  A "  <<  sol.toStdString() << " P "
     170  _out << "*SITE      PT SOLN T DATA_START__ DATA_END____ DESCRIPTION_________ S/N__" << endl;
     171  _out << " " << _opt->_roverName.substr(0,9) << "  A "  <<  sol.toStdString() << " P "
    142172       << startTime.toStdString() << " " << endTime.toStdString() << " "
    143173       << _opt->_antNameRover << " -----" << endl;
     
    151181      _out << "*DESCRIPTION_________ S/N__ L1->ARP(m)__________ L2->ARP(m)__________ AZ_EL____" << endl;
    152182      _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    153            <<  " -----"
    154            << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::G1).toStdString()
    155            << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::G2).toStdString()
    156            <<  " ---------"
    157         << endl;
     183           <<  " -----";
     184           for (int i = 0; i < frqStrList.size(); ++i) {
     185             if (frqStrList.at(i).contains('G')) {//cout << frqStrList.at(i).toStdString() << endl;
     186               _out << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::toInt(frqStrList.at(i).toStdString())).toStdString();
     187             }
     188           }
     189      _out << " ---------" << endl;
    158190      _out << "-SITE/GPS_PHASE_CENTER" << endl << endl;
    159191    }
     
    163195      _out << "*DESCRIPTION_________ S/N__ L1->ARP(m)__________ L2->ARP(m)__________ AZ_EL____" << endl;
    164196      _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    165            <<  " -----"
    166            << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::R1).toStdString()
    167            << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::R2).toStdString()
    168            <<  " ---------"
    169         << endl;
     197           <<  " -----";
     198           for (int i = 0; i < frqStrList.size(); ++i) {
     199             if (frqStrList.at(i).contains('R')) {//cout << frqStrList.at(i).toStdString() << endl;
     200               _out << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::toInt(frqStrList.at(i).toStdString())).toStdString();
     201             }
     202           }
     203      _out << " ---------" << endl;
    170204      _out << "-SITE/GLONASS_PHASE_CENTER" << endl << endl;
    171205    }
     
    175209      _out << "*DESCRIPTION_________ S/N__ L1->ARP(m)__________ L2->ARP(m)__________ AZ_EL____" << endl;
    176210      _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    177            <<  " -----"
    178            << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::E1).toStdString()
    179            << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::E5).toStdString()
    180         << endl;
     211           <<  " -----";
     212           for (int i = 0; i < frqStrList.size(); ++i) {
     213             if (frqStrList.at(i).contains('E')) {//cout << frqStrList.at(i).toStdString() << endl;
     214               _out << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::toInt(frqStrList.at(i).toStdString())).toStdString();
     215             }
     216           }
     217      _out << " ---------" << endl;
    181218      _out << "-SITE/GALILEO_PHASE_CENTER" << endl << endl;
    182219    }
     
    186223      _out << "*DESCRIPTION_________ S/N__ L1->ARP(m)__________ L2->ARP(m)__________ AZ_EL____" << endl;
    187224      _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    188            <<  " -----"
    189            << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::C2).toStdString()
    190            << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::C6).toStdString()
    191         << endl;
     225               <<  " -----";
     226               for (int i = 0; i < frqStrList.size(); ++i) {
     227                 if (frqStrList.at(i).contains('C')) {//cout << frqStrList.at(i).toStdString() << endl;
     228                   _out << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::toInt(frqStrList.at(i).toStdString())).toStdString();
     229                 }
     230               }
     231      _out << " ---------" << endl;
    192232      _out << "-SITE/BEIDOU_PHASE_CENTER" << endl << endl;
    193233    }
     
    198238  _out << "+SITE/ECCENTRICITY" << endl;
    199239  _out << "*                                             UP______ NORTH___ EAST____" << endl;
    200   _out << "*SITE PT SOLN T DATA_START__ DATA_END____ AXE ARP->BENCHMARK(M)_________" << endl;
    201   _out << " " << _opt->_roverName.substr(0,4) << "  A "  <<  sol.toStdString() << " P "
     240  _out << "*SITE      PT SOLN T DATA_START__ DATA_END____ AXE ARP->BENCHMARK(M)_________" << endl;
     241  _out << " " << _opt->_roverName.substr(0,9) << "  A "  <<  sol.toStdString() << " P "
    202242       << startTime.toStdString() << " " << endTime.toStdString() << " UNE"
    203243       << QString("%1").arg(_opt->_neuEccRover(3), 9, 'f', 4, QLatin1Char(' ')).toStdString()
     
    207247
    208248  _out << "+TROP/COORDINATES" << endl;
    209   _out << "*SITE PT SOLN T STA_X_______ STA_Y_______ STA_Z_______ SYSTEM REMARK" << endl;
    210   _out << " " << _opt->_roverName.substr(0,4) << "  A "  <<  sol.toStdString() << " P"
     249  _out << "*SITE      PT SOLN T STA_X_______ STA_Y_______ STA_Z_______ SYSTEM REMARK" << endl;
     250  _out << " " << _opt->_roverName.substr(0,9) << "  A "  <<  sol.toStdString() << " P"
    211251       << QString(" %1").arg(_opt->_xyzAprRover(1), 12, 'f', 3, QLatin1Char(' ')).toStdString()
    212252       << QString(" %1").arg(_opt->_xyzAprRover(2), 12, 'f', 3, QLatin1Char(' ')).toStdString()
    213253       << QString(" %1").arg(_opt->_xyzAprRover(3), 12, 'f', 3, QLatin1Char(' ')).toStdString()
    214        << " ITRF14 " << ac.toStdString() << endl;
     254       << " IGS20 " << ac.toStdString() << endl;
    215255  _out << "-TROP/COORDINATES"<< endl << endl;
    216256
     
    228268
    229269  _out << "+TROP/SOLUTION" << endl;
    230   _out << "*SITE EPOCH_______ TROTOT STDEV" << endl;
     270  _out << "*SITE      EPOCH_______ TROTOT STDEV" << endl;
    231271}
    232272
     
    246286  if ((reopen(GPSWeek, GPSWeeks) == success) &&
    247287      (fmod(daysec, double(_sampl)) == 0.0)) {
    248     _out << ' '  << staID.left(4).data() << ' ' << time.toStdString() << ' '
     288    _out << ' '  << staID.left(9).data() << ' ' << time.toStdString() << ' '
    249289         << noshowpos << setw(6) << setprecision(1) << trotot * 1000.0
    250290         << noshowpos << setw(6) << setprecision(1) << stdev  * 1000.0 << endl;
Note: See TracChangeset for help on using the changeset viewer.