Changeset 10130 in ntrip


Ignore:
Timestamp:
Jul 21, 2023, 7:25:42 AM (9 months ago)
Author:
stuerze
Message:
 
Location:
trunk/BNC/src
Files:
3 edited

Legend:

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

    r9675 r10130  
    118118}
    119119
     120// Print
     121////////////////////////////////////////////////////////////////////////////
     122QString bncAntex::snxCodeSinexString(const std::string& antName) {
     123
     124  if (antName.find("NULLANTENNA") != string::npos) {
     125    return QString(" ----------");
     126  }
     127
     128  QString antNameQ = antName.c_str();
     129  if (_maps.find(antNameQ) == _maps.end()) {
     130    return QString(" ----------");
     131  }
     132  else {
     133    return QString(" %1").arg(_maps[antNameQ]->snxCode, 10, QLatin1Char(' '));
     134  }
     135}
     136
    120137// Read ANTEX File
    121138////////////////////////////////////////////////////////////////////////////
     
    182199        inLine >> newAntMap->zen1 >> newAntMap->zen2 >> newAntMap->dZen;
    183200      }
     201      else if (line.indexOf("SINEX CODE") == 60) {
     202        QTextStream inLine(&line, QIODevice::ReadOnly);
     203        inLine >> newAntMap->snxCode;
     204      }
    184205
    185206      // Start of Frequency
  • trunk/BNC/src/bncantex.h

    r9587 r10130  
    4141  void    print() const;
    4242  QString pcoSinexString(const std::string& antName, t_frequency::type frqType);
     43  QString snxCodeSinexString(const std::string& antName);
    4344  double  satCorr(const QString& prn, t_frequency::type frqType,
    4445                  double eleSat, double azSat, bool& found) const;
     
    6364   public:
    6465    t_antMap() {
    65       zen1 = 0.0;
    66       zen2 = 0.0;
    67       dZen = 0.0;
     66      zen1    = 0.0;
     67      zen2    = 0.0;
     68      dZen    = 0.0;
     69      snxCode = "";
    6870    }
    6971    ~t_antMap() {
     
    7880    double                             zen2;
    7981    double                             dZen;
     82    QString                            snxCode;
    8083    QMap<t_frequency::type, t_frqMap*> frqMap;
    8184    bncTime                            validFrom;
  • trunk/BNC/src/bncsinextro.cpp

    r10127 r10130  
    3232
    3333  _opt   = opt;
    34   _sampl =  sampl;
     34  _sampl = sampl;
    3535
    3636  _antex = 0;
     
    5454  int daysec    = int(fmod(GPSWeeks, 86400.0));
    5555  int dayOfYear = datTim.date().dayOfYear();
    56   QString yy    = datTim.toString("yy");
    57   QString creationTime = QString("%1:%2:%3").arg(yy)
     56  QString yyyy  = datTim.toString("yyyy");
     57  QString creationTime = QString("%1:%2:%3").arg(yyyy)
    5858                                            .arg(dayOfYear, 3, 10, QLatin1Char('0'))
    5959                                            .arg(daysec   , 5, 10, QLatin1Char('0'));
     
    7575  int nominalStartSec = daysec - (int(fmod(double(daysec), double(intr))));
    7676  int nominalEndSec = nominalStartSec + intr - _sampl;
    77   QString endTime = QString("%1:%2:%3").arg(yy)
     77  QString endTime = QString("%1:%2:%3").arg(yyyy)
    7878                                       .arg(dayOfYear     , 3, 10, QLatin1Char('0'))
    7979                                       .arg(nominalEndSec , 5, 10, QLatin1Char('0'));
     
    8989    corr = settings.value("PPP/corrFile").toString();
    9090  }
    91 
    9291  QString signalPriorities = QString::fromStdString(_opt->_signalPriorities);
    9392  if (!signalPriorities.size()) {
     
    117116       << creationTime.toStdString() << " " << ac.toStdString() << " "
    118117       << startTime.toStdString()    << " " << endTime.toStdString() << " P "
    119        << epo.toStdString() << " 0 " << " T " << endl;
     118       << _opt->_roverName.substr(0,9) << endl;
    120119  _out << "*-------------------------------------------------------------------------------" << endl;
    121120  _out << "+FILE/REFERENCE" << endl;
     
    124123  _out << " OUTPUT             " << "Total Troposphere Zenith Path Delay Product" << endl;
    125124  _out << " SOFTWARE           " <<  BNCPGMNAME <<  endl;
    126   _out << " INPUT              " << "OBS: "    << _opt->_roverName.substr(0,9) << ", SSR: "  << corr.toStdString() << endl;
    127   _out << " VERSON NUMBER      " <<  QString("%1").arg(solId, 10, QLatin1Char(' ')).toStdString() << endl;
     125  _out << " INPUT              " << "OBS: "    << _opt->_roverName.substr(0,9) << ", SSR: " << corr.toStdString() << endl;
     126  _out << " VERSON NUMBER      " <<  QString("%1").arg(solId, 3, QLatin1Char('0')).toStdString() << endl;
    128127  _out << "-FILE/REFERENCE" << endl;
    129128  _out << "*-------------------------------------------------------------------------------" << endl;
    130129
    131 
     130  QString systems;
     131  if (settings.value("PPP/lcGPS"    ).toString() != "no") {systems += "G, ";}
     132  if (settings.value("PPP/lcGLONASS").toString() != "no") {systems += "R, ";}
     133  if (settings.value("PPP/lcGalileo").toString() != "no") {systems += "E, ";}
     134  if (settings.value("PPP/lcBDS"    ).toString() != "no") {systems += "C";}
    132135  QString blqFileName = QString::fromStdString(_opt->_blqFileName);
    133136  QString blqFileBaseName;
     
    141144    }
    142145  }
     146  bool eleWeighting = false;
     147  if (settings.value("PPP/eleWgtCode").toInt() > 0 ||
     148      settings.value("PPP/eleWgtCode").toInt() > 0 ) {
     149    eleWeighting = true;
     150  }
     151
    143152  _out << "+TROP/DESCRIPTION" << endl;
    144153  _out << "*KEYWORD______________________ VALUE(S)______________" << endl;
    145   _out << " SAMPLING INTERVAL                               "
    146        << setw(4) << _sampl << endl;
    147   _out << " SAMPLING TROP                                   "
    148        << setw(4) << _sampl << endl;
    149   _out << " ELEVATION CUTOFF ANGLE                          "
    150        << setw(4) <<  int(_opt->_minEle * 180.0/M_PI) << endl;
     154  _out << " TROPO SAMPLING INTERVAL       " << setw(22) << 1 << endl;
     155  _out << " DATA SAMPLING TROP            " << setw(22) << _sampl << endl;
     156  _out << " ELEVATION CUTOFF ANGLE        " << setw(22) <<  int(_opt->_minEle * 180.0/M_PI) << endl;
     157  _out << " OBSERVATION WEIGHTING         " << ((eleWeighting) ? "SINEL" : "") << endl;
     158  _out << " GNSS SYSTEMS                  " << systems.toStdString()  << endl;
     159  _out << " TIME SYSTEM                   " << "G"      << endl;
     160  _out << " TROPO MODELING METHOD         " << "KALMAN FILTER"  << endl;
    151161  if (! blqFileName.isEmpty()) {
    152162    _out << " OCEAN TIDE LOADING MODEL      " << blqFileBaseName.toStdString() + blqFileExtension.toStdString() << endl;
    153163  }
    154164  _out << " TROP MAPPING FUNCTION         " << "Saastamoinen" << endl;
    155   _out << " SOLUTION_FIELDS_1             " << "TROTOT STDEV" << endl;
     165  _out << " TROPO PARAMETER NAMES         " << "TROTOT STDEV" << endl;
     166  _out << " TROPO PARAMETER UNITS         " << "1e+03  1e+03" << endl;
    156167  _out << "-TROP/DESCRIPTION"<< endl;
    157168  _out << "*-------------------------------------------------------------------------------" << endl;
     
    185196
    186197  _out << "+TROP/COORDINATES" << endl;
    187   _out << "*SITE      PT SOLN T STA_X_______ STA_Y_______ STA_Z_______ SYSTEM REMARK" << endl;
     198  _out << "*STATION__ PT SOLN T __DATA_START__ __DATA_END____ __STA_X_____ __STA_Y_____ __STA_Z_____ SYSTEM REMRK" << endl;
    188199  _out << " " << _opt->_roverName.substr(0,9) << "  A "
    189        <<  solId.toStdString() << " P"
     200       << QString("%1").arg(solId, 4, QLatin1Char(' ')).toStdString() << " P "
     201       << startTime.toStdString() << " " << endTime.toStdString()
    190202       << QString(" %1").arg(_opt->_xyzAprRover(1), 12, 'f', 3, QLatin1Char(' ')).toStdString()
    191203       << QString(" %1").arg(_opt->_xyzAprRover(2), 12, 'f', 3, QLatin1Char(' ')).toStdString()
    192204       << QString(" %1").arg(_opt->_xyzAprRover(3), 12, 'f', 3, QLatin1Char(' ')).toStdString()
    193        << " IGS20 " << ac.toStdString() << endl;
     205       << QString(" %1").arg("IGS20", 6, QLatin1Char(' ')).toStdString()
     206       << QString(" %1").arg(ac,      5, QLatin1Char(' ')).toStdString() << endl;
    194207  _out << "-TROP/COORDINATES"<< endl;
    195208  _out << "*-------------------------------------------------------------------------------" << endl;
     
    197210
    198211  _out << "+SITE/ECCENTRICITY" << endl;
    199   _out << "*                                             UP______ NORTH___ EAST____" << endl;
    200   _out << "*SITE      PT SOLN T DATA_START__ DATA_END____ AXE ARP->BENCHMARK(M)_________" << endl;
     212  _out << "*                                                     UP______ NORTH___ EAST____" << endl;
     213  _out << "*STATION__ PT SOLN T __DATA_START__ __DATA_END____ AXE MARKER->ARP(m)__________" << endl;
    201214  _out << " " << _opt->_roverName.substr(0,9) << "  A "
    202        <<  solId.toStdString() << " P "
    203        << startTime.toStdString() << " " << endTime.toStdString() << " UNE"
    204        << QString("%1").arg(_opt->_neuEccRover(3), 9, 'f', 4, QLatin1Char(' ')).toStdString()
    205        << QString("%1").arg(_opt->_neuEccRover(1), 9, 'f', 4, QLatin1Char(' ')).toStdString()
    206        << QString("%1").arg(_opt->_neuEccRover(2), 9, 'f', 4, QLatin1Char(' ')).toStdString() << endl;
     215       << QString("%1").arg(solId, 4, QLatin1Char(' ')).toStdString() << " P "
     216       << startTime.toStdString() << " " << endTime.toStdString()
     217       << QString(" %1").arg("UNE", 3, QLatin1Char(' ')).toStdString()
     218       << QString("%1").arg(_opt->_neuEccRover(3), 8, 'f', 4, QLatin1Char(' ')).toStdString()
     219       << QString("%1").arg(_opt->_neuEccRover(1), 8, 'f', 4, QLatin1Char(' ')).toStdString()
     220       << QString("%1").arg(_opt->_neuEccRover(2), 8, 'f', 4, QLatin1Char(' ')).toStdString() << endl;
    207221  _out << "-SITE/ECCENTRICITY" << endl;
    208222  _out << "*-------------------------------------------------------------------------------" << endl;
     
    211225    _out << "+SITE/RECEIVER" << endl;
    212226    _out << "*STATION__ PT SOLN T __DATA_START__ __DATA_END____ DESCRIPTION_________ S/N_________________ FIRMW______" << endl;
    213     _out << " " << _opt->_roverName.substr(0,9) << "  A "  <<  solId.toStdString() << " P "
     227    _out << " " << _opt->_roverName.substr(0,9) << "  A "
     228         << QString("%1").arg(solId, 4, QLatin1Char(' ')).toStdString() << " P "
    214229         << startTime.toStdString() << " " << endTime.toStdString()
    215230         << QString(" %1").arg(_opt->_recNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    216          << " -----" << " -----------" << endl;
     231         << " --------------------" << " -----------" << endl;
    217232    _out << "-SITE/RECEIVER" << endl;
    218233    _out << "*-------------------------------------------------------------------------------" << endl;
    219234  }
    220 
    221   _out << "+SITE/ANTENNA" << endl;
    222   _out << "*STATION__ PT SOLN T __DATA_START__ __DATA_END____ DESCRIPTION_________ S/N_________________ PCV_MODEL_" << endl;
    223   _out << " " << _opt->_roverName.substr(0,9) << "  A "  <<  solId.toStdString() << " P "
    224        << startTime.toStdString() << " " << endTime.toStdString() << " "
    225        << _opt->_antNameRover << " -----" << endl;
    226   _out << "-SITE/ANTENNA" << endl;
    227   _out << "*-------------------------------------------------------------------------------" << endl;
    228 
    229235  if (!_opt->_antexFileName.empty()) {
    230236    _antex = new bncAntex(_opt->_antexFileName.c_str());
    231     if (_opt->_LCsGPS.size()) {
    232       _out << "+SITE/GPS_PHASE_CENTER" << endl;
    233       _out << "*                           UP____ NORTH_ EAST__ UP____ NORTH_ EAST__" << endl;
    234       _out << "*DESCRIPTION_________ S/N__ L1->ARP(m)__________ L2->ARP(m)__________ AZ_EL____" << endl;
    235       _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    236            <<  " -----";
    237            for (int i = 0; i < frqStrList.size(); ++i) {
    238              if (frqStrList.at(i).contains('G')) {//cout << frqStrList.at(i).toStdString() << endl;
    239                _out << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::toInt(frqStrList.at(i).toStdString())).toStdString();
    240              }
    241            }
    242       _out << " ---------" << endl;
    243       _out << "-SITE/GPS_PHASE_CENTER" << endl;
    244       _out << "*-------------------------------------------------------------------------------" << endl;
    245     }
    246     if (_opt->_LCsGLONASS.size()) {
    247       _out << "+SITE/GLONASS_PHASE_CENTER" << endl;
    248       _out << "*                           UP____ NORTH_ EAST__ UP____ NORTH_ EAST__" << endl;
    249       _out << "*DESCRIPTION_________ S/N__ L1->ARP(m)__________ L2->ARP(m)__________ AZ_EL____" << endl;
    250       _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    251            <<  " -----";
    252            for (int i = 0; i < frqStrList.size(); ++i) {
    253              if (frqStrList.at(i).contains('R')) {//cout << frqStrList.at(i).toStdString() << endl;
    254                _out << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::toInt(frqStrList.at(i).toStdString())).toStdString();
    255              }
    256            }
    257       _out << " ---------" << endl;
    258       _out << "-SITE/GLONASS_PHASE_CENTER" << endl;
    259       _out << "*-------------------------------------------------------------------------------" << endl;
    260     }
    261     if (_opt->_LCsGalileo.size()) {
    262       _out << "+SITE/GALILEO_PHASE_CENTER" << endl;
    263       _out << "*                           UP____ NORTH_ EAST__ UP____ NORTH_ EAST__" << endl;
    264       _out << "*DESCRIPTION_________ S/N__ L1->ARP(m)__________ L2->ARP(m)__________ AZ_EL____" << endl;
    265       _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    266            <<  " -----";
    267            for (int i = 0; i < frqStrList.size(); ++i) {
    268              if (frqStrList.at(i).contains('E')) {//cout << frqStrList.at(i).toStdString() << endl;
    269                _out << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::toInt(frqStrList.at(i).toStdString())).toStdString();
    270              }
    271            }
    272       _out << " ---------" << endl;
    273       _out << "-SITE/GALILEO_PHASE_CENTER" << endl;
    274       _out << "*-------------------------------------------------------------------------------" << endl;
    275     }
    276     if (_opt->_LCsBDS.size()) {
    277       _out << "+SITE/BEIDOU_PHASE_CENTER" << endl;
    278       _out << "*                           UP____ NORTH_ EAST__ UP____ NORTH_ EAST__" << endl;
    279       _out << "*DESCRIPTION_________ S/N__ L1->ARP(m)__________ L2->ARP(m)__________ AZ_EL____" << endl;
    280       _out << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
    281                <<  " -----";
    282                for (int i = 0; i < frqStrList.size(); ++i) {
    283                  if (frqStrList.at(i).contains('C')) {//cout << frqStrList.at(i).toStdString() << endl;
    284                    _out << _antex->pcoSinexString(_opt->_antNameRover, t_frequency::toInt(frqStrList.at(i).toStdString())).toStdString();
    285                  }
    286                }
    287       _out << " ---------" << endl;
    288       _out << "-SITE/BEIDOU_PHASE_CENTER" << endl;
    289       _out << "*-------------------------------------------------------------------------------" << endl;
    290     }
     237    _out << "+SITE/ANTENNA" << endl;
     238    _out << "*STATION__ PT SOLN T __DATA_START__ __DATA_END____ DESCRIPTION_________ S/N_________________ PCV_MODEL_" << endl;
     239    _out << " " << _opt->_roverName.substr(0,9) << "  A "
     240         << QString("%1").arg(solId, 4, QLatin1Char(' ')).toStdString() << " P "
     241         << startTime.toStdString() << " " << endTime.toStdString()
     242         << QString(" %1").arg(_opt->_antNameRover.c_str(), 20,QLatin1Char(' ')).toStdString()
     243         << " --------------------" << _antex->snxCodeSinexString(_opt->_antNameRover).toStdString() << endl;
     244    _out << "-SITE/ANTENNA" << endl;
     245    _out << "*-------------------------------------------------------------------------------" << endl;
    291246    delete _antex;
    292247    _antex = 0;
    293   }
    294 
     248}
    295249  _out << "+TROP/SOLUTION" << endl;
    296250  _out << "*STATION__ ____EPOCH_____ TROTOT STDDEV " << endl;
Note: See TracChangeset for help on using the changeset viewer.