Changeset 7980 in ntrip


Ignore:
Timestamp:
Jul 21, 2016, 10:31:16 AM (8 years ago)
Author:
stuerze
Message:

System and frequency specific signal priorities are added for RINEX3 to RINEX2 conversion and the default 'Signal priority' list is improved

Location:
trunk/BNC/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bnchelp.html

    r7955 r7980  
    15321532</p>
    15331533<p>
    1534 Default 'Signal priority' list is an empty option string, meaning a priority sequence of 'CWPX_?' attributes when mapping RINEX 3 to RINEX 2. The meaning of this sequence of characters - take it as an example - is as follows:
     1534Signal priorities can be specified as equal for all systems, as system specific or as system and frequency specific. For example:</li>
     1535<ul>
     1536<li>'CWPX_?' (General signal priorities valid for all GNSS)</li>
     1537<li>'C:IQX I:ABCX' (System specific signal priorities for BDS and IRNSS)</li>
     1538<li>'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX' (System and frequency specific signal priorities)</li>
     1539</ul>
     1540</p>
     1541<p>
     1542The default 'Signal priority' list is defined as follows:
     1543<ul>
     1544 <li>'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX'</li>
     1545</ul>
     1546
     1547As an example the 'Signal priority' of 'CWPX_?' is explained in more detail:
    15351548<ul>
    15361549<li>Signals with attribute 'C' enjoy the highest priority. If such a Version 3 observation becomes available, it is presented as RINEX Version 2 observation if that is the format you wish to see. Observations with other attributes are being ignored.</li>
     
    15411554</p>
    15421555
    1543 <p>
    1544 Signal priorities can be specified either as equal for all systems or system specific. The following are example priority strings:</li>
    1545 <ul>
    1546 <li>CWPX_? (Same signal priorities valid for all systems)</li>
    1547 <li>G:CWPX_? R:PCX_? E:CPX_? (Specific signal priorities for GPS, GLONASS and Galileo system)</li>
    1548 </ul>
    1549 
    1550 </p>
    15511556<p>
    15521557You may like to specify your own 'Signal priority' string(s) for producing RINEX Version 2 files. If you neither convert observation streams to RINEX Version 2 nor concatenate RINEX Version 3 to Version 2 files, then the 'Version 2' option is meaningless.
  • trunk/BNC/src/bncmain.cpp

    r7976 r7980  
    106106      "   rnxOnlyWithSKL {Using RINEX skeleton file is mandatory [integer number: 0=no,2=yes]}\n"
    107107      "   rnxScript      {File upload script, full path [character string]}\n"
    108       "   rnxV2Priority  {Priority of signal attributes [character string, list separated by blank character, example: G:CWPX_? R:CP]}\n"
     108      "   rnxV2Priority  {Priority of signal attributes [character string, list separated by blank character, example: G:12&PWCSLXYN G:5&IQX C:IQX]}\n"
    109109      "   rnxV3          {Produce version 3 file contents [integer number: 0=no,2=yes]}\n"
    110110      "   rnxV3filenames {Produce version 3 filenames [integer number: 0=no,2=yes]}\n"
     
    129129      "   reqcRnxVersion        {RINEX version [integer number: 2|3]}\n"
    130130      "   reqcSampling          {RINEX output file sampling rate [integer number of seconds: 0|5|10|15|20|25|30|35|40|45|50|55|60]}\n"
    131       "   reqcV2Priority        {Version 2 priority of signal attributes [character string, list separated by blank character, example: G:CWPX_? R:CP]}\n"
     131      "   reqcV2Priority        {Version 2 priority of signal attributes [character string, list separated by blank character, example: G:12&PWCSLXYN G:5&IQX C:IQX]}\n"
    132132      "   reqcStartDateTime     {Start time [character string, example: 1967-11-02T00:00:00]}\n"
    133133      "   reqcEndDateTime       {Stop time [character string, example: 2099-01-01T00:00:00 }\n"
  • trunk/BNC/src/bncsettings.cpp

    r7889 r7980  
    134134    setValue_p("reqcOldReceiverNumber", "");
    135135    setValue_p("reqcUseObsTypes",     "");
    136     setValue_p("reqcV2Priority",      "");
     136    setValue_p("reqcV2Priority",      "G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX");
    137137    // SP3
    138138    setValue_p("sp3CompFile",         "");
  • trunk/BNC/src/bncwindow.cpp

    r7963 r7980  
    223223  QString hlp = settings.value("rnxV2Priority").toString();
    224224  if (hlp.isEmpty()) {
    225     hlp = "CWPX_?";
     225    hlp = "G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX";
    226226  }
    227227  _rnxV2Priority = new QLineEdit(hlp);
     
    706706  _rnxSamplSpinBox->setMaximumWidth(9*ww);
    707707
    708   _rnxV2Priority->setMaximumWidth(19*ww);
    709 
    710708  oLayout->addWidget(new QLabel("Saving RINEX observation files.<br>"),0, 0, 1,50);
    711709  oLayout->addWidget(new QLabel("Directory"),                      1, 0);
     
    721719  oLayout->addWidget(new QLabel("Script (full path)"),             4, 0);
    722720  oLayout->addWidget(_rnxScrpLineEdit,                             4, 1, 1, 15);
    723   oLayout->addWidget(new QLabel("Version 2"),                      5, 0);
    724   oLayout->addWidget(_rnxV2Priority,                               5, 1);
    725   oLayout->addWidget(new QLabel("Signal priority"),                5, 2);
     721  oLayout->addWidget(new QLabel("Version 2 signal priority"),      5, 0);
     722  oLayout->addWidget(_rnxV2Priority,                               5, 1, 1, 15);
    726723  oLayout->addWidget(new QLabel("Version 3"),                      6, 0);
    727724  oLayout->addWidget(_rnxV3CheckBox,                               6, 1);
     
    12701267  _rnxFileCheckBox->setWhatsThis(tr("<p>Tick check box 'Skeleton mandatory' in case you want that RINEX files are only produced if skeleton files are available for BNC. If no skeleton file is available for a particular source then no RINEX Observation file will be produced from the affected stream.</p><p>Note that a skeleton file contains RINEX header information such as receiver and antenna types. In case of stream conversion to RINEX Version 3, a skeleton file should also contain information on potentially available observation types. A missing skeleton file will therefore enforce BNC to only save a default set of RINEX 3 observation types.</p>"));
    12711268  _rnxScrpLineEdit->setWhatsThis(tr("<p>Whenever a RINEX Observation file is finally saved, you may want to compress, copy or upload it immediately, for example via FTP. BNC allows you to execute a script/batch file to carry out such operation.</p><p>Specify the full path of a script or batch file. BNC will pass the full RINEX Observation file path to the script as command line parameter (%1 on Windows systems, $1 on Unix/Linux/Mac systems).</p>"));
    1272   _rnxV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used to map observations with RINEX Version 3 attributes from incoming streams to Version 2. The underscore character '_' stands for undefined attributes. A question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified either as equal for all systems or as system specific. The following are example priority strings:</li><ul><li>'CWPX_?' (Same signal priorities valid for all systems)</li><li>'G:CWPX_? R:PCX_? E:CPX_?' (Specific signal priorities for GPS, GLONASS and Galileo system)</li></ul>Default is priority list 'CWPX_?'.</p>"));
     1269  _rnxV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used to map observations with RINEX Version 3 attributes from incoming streams to Version 2. The underscore character '_' stands for undefined attributes. A question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified as equal for all systems, as system specific or as system and freq. specific. For example: </li><ul><li>'CWPX_?' (General signal priorities valid for all GNSS) </li><li>'C:IQX I:ABCX' (System specific signal priorities for BDS and IRNSS) </li><li>'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX' (System and frequency specific signal priorities) </li></ul>Default is the following priority list 'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX'.</p>"));
    12731270  _rnxV3CheckBox->setWhatsThis(tr("<p>The default format for RINEX Observation files is RINEX Version 2.</p><p>Select 'Version 3' if you want to save observations in RINEX Version 3 format.</p>"));
    12741271  _rnxV3filenameCheckBox->setWhatsThis(tr("<p>Tick 'Version 3 filenames' to let BNC create so-called extended filenames following the RINEX Version 3 standard.</p><p>Default is an empty check box, meaning to create filenames following the RINEX Version 2 standard although the file content is saved in RINEX Version 3 format.</p>"));
     
    24092406    enable1 = _rnxV3CheckBox->isChecked();
    24102407    if (enable && enable1) {
    2411     enableWidget(false, _rnxV2Priority);
     2408      enableWidget(false, _rnxV2Priority);
    24122409    }
    24132410    if (enable && !enable1) {
    2414     enableWidget(true, _rnxV2Priority);
     2411      enableWidget(true, _rnxV2Priority);
    24152412    }
    24162413  }
  • trunk/BNC/src/reqcdlg.cpp

    r7678 r7980  
    3535 * Created:    28-Mar-2012
    3636 *
    37  * Changes:   
     37 * Changes:
    3838 *
    3939 * -----------------------------------------------------------------------*/
     
    138138  QString hlp = settings.value("reqcV2Priority").toString();
    139139  if (hlp.isEmpty()) {
    140     hlp = "CWPX_?";
     140    hlp = "G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX";
    141141  }
    142142  _reqcV2Priority = new QLineEdit(hlp);
     
    152152  grid->addWidget(_reqcSampling,                  ir, 4);
    153153  ++ir;
    154   grid->addWidget(new QLabel("Version 2 Signal Priority"), ir, 1);
    155   grid->addWidget(_reqcV2Priority,                ir, 2);
     154  grid->addWidget(new QLabel("Version 2 signal priority"), ir, 1);
     155  grid->addWidget(_reqcV2Priority,                          ir, 2, 1, 4);
    156156  ++ir;
    157157  grid->addWidget(new QLabel("Start"),            ir, 1);
     
    230230  // WhatsThis, RINEX Editing & QC
    231231  // -----------------------------
    232   _reqcRnxVersion->setWhatsThis(tr("<p>Select version number of emerging new RINEX file.</p><p>Note the following:</p><p>When converting <u>RINEX Version 2 to Version 3 </u>Observation files, the tracking mode or channel information (signal attribute, see RINEX Version 3 documentation) in the (last out of the three characters) observation code is left blank if unknown.</p><p>When converting <u>RINEX Version 3 to Version 2</u>, the mapping of observations follows a 'Signal priority list' with signal attributes as defined in RINEX Version 3.</p>")); 
     232  _reqcRnxVersion->setWhatsThis(tr("<p>Select version number of emerging new RINEX file.</p><p>Note the following:</p><p>When converting <u>RINEX Version 2 to Version 3 </u>Observation files, the tracking mode or channel information (signal attribute, see RINEX Version 3 documentation) in the (last out of the three characters) observation code is left blank if unknown.</p><p>When converting <u>RINEX Version 3 to Version 2</u>, the mapping of observations follows a 'Signal priority list' with signal attributes as defined in RINEX Version 3.</p>"));
    233233  _reqcSampling->setWhatsThis(tr("<p>Select sampling rate of emerging new RINEX Observation file.</p><p>'0 sec' means that observations from all epochs in the RINEX input file will become part of the RINEX output file.</p>"));
    234   _reqcV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used in post processing mode to map RINEX Version 3 observation files to Version 2. The underscore character '_' stands for undefined attributes. The question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified either as equal for all systems or as system specifics. The following are example priority strings:</li><ul><li>'CWPX_?' (Same signal priorities valid for all systems)</li><li>'G:CWPX_? R:PCX_? E:CPX_?' (Specific signal priorities for GPS, GLONASS and Galileo system)</li></ul>Default is priority list 'CWPX_?'.</p>"));
     234  _reqcV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used to map observations with RINEX Version 3 attributes from incoming streams to Version 2. The underscore character '_' stands for undefined attributes. A question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified as equal for all systems, as system specific or as system and freq. specific. For example: </li><ul><li>'CWPX_?' (General signal priorities valid for all GNSS) </li><li>'C:IQX I:ABCX' (System specific signal priorities for BDS and IRNSS) </li><li>'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX' (System and frequency specific signal priorities) </li></ul>Default is the following priority list 'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX'.</p>"));
    235235  _reqcStartDateTime->setWhatsThis(tr("<p>Specify begin of emerging new RINEX Observation file.</p>"));
    236236  _reqcEndDateTime->setWhatsThis(tr("<p>Specify end of emerging new RINEX Observation file.</p>"));
     
    281281void reqcDlg::closeEvent(QCloseEvent* event) {
    282282
    283   int iRet = QMessageBox::question(this, "Close", "Save Options?", 
     283  int iRet = QMessageBox::question(this, "Close", "Save Options?",
    284284                                   QMessageBox::Yes, QMessageBox::No,
    285285                                   QMessageBox::Cancel);
  • trunk/BNC/src/rinex/reqcedit.cpp

    r7942 r7980  
    156156    deleteLater();
    157157  }
     158
    158159}
    159160
     
    643644  int key = 0;
    644645  QString systems = obsFile->header().usedSystems();
    645   QString comment = QString("RINEX 3 => 2 CONVERSION DETAILS:");
     646  QString comment = QString("Signal priorities for RINEX 3 => 2 conversion:");
    646647  QString commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0'));
    647648  txtMap.insert(commentKey, comment);
    648649
    649650  for(int ii = 0; ii < obsFile->numSys(); ii++) {
    650     key++;
    651651    char sys = systems[ii].toAscii();
    652     QString preferredAttrib = obsFile->signalPriorities(sys);
    653     comment = QString("%1: Signal priority = %2").arg(sys).arg(preferredAttrib);
    654     commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0'));
    655652    txtMap.insert(commentKey, comment);
     653    QMap <char, QString>  signalPriorityMap;
     654    QStringList preferredAttribListSys = obsFile->signalPriorities(sys);
    656655    QStringList types = obsFile->header().obsTypes(sys);
    657656    for (int jj = 0; jj < types.size(); jj++) {
    658       key++;
    659657      QString inType = types[jj];
    660       for (int iPref = 0; iPref < preferredAttrib.length(); iPref++) {
    661         if (preferredAttrib[iPref] == '?'                             ||
    662             (inType.length() == 2 && preferredAttrib[iPref] == '_'    ) ||
    663             (inType.length() == 3 && preferredAttrib[iPref] == inType[2]) ) {
    664           QString outType = t_rnxObsFile::type3to2(sys, inType);
    665           comment = QString("%1: %2 => %3").arg(sys).arg(inType).arg(outType);
    666           commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0'));
    667           txtMap.insert(commentKey, comment);
    668           break;
    669         }
    670       }
    671     }
    672   }
    673 }
     658      char band = inType[1].toAscii();
     659      for (int ii = 0; ii < preferredAttribListSys.size(); ii++) {
     660        QString preferredAttrib;
     661        if (preferredAttribListSys[ii].indexOf("&") != -1) {
     662          QStringList hlp = preferredAttribListSys[ii].split("&", QString::SkipEmptyParts);
     663          if (hlp.size() == 2 && hlp[0].contains(band)) {
     664            preferredAttrib = hlp[1];
     665          }
     666        }
     667        else {
     668          preferredAttrib = preferredAttribListSys[ii];
     669        }
     670        if (!signalPriorityMap.contains(band) && !preferredAttrib.isEmpty()){
     671          signalPriorityMap[band] = preferredAttrib;
     672        }
     673      }
     674    }
     675    QMapIterator<char, QString> it(signalPriorityMap);
     676    while (it.hasNext()) {
     677        it.next();
     678        key++;
     679        comment = QString("%1 band %2: %3").arg(sys).arg(it.key()).arg(it.value());
     680        commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0'));
     681        txtMap.insert(commentKey, comment);
     682    }
     683  }
     684}
  • trunk/BNC/src/rinex/rnxobsfile.cpp

    r7894 r7980  
    13031303  }
    13041304  *stream << endl;
     1305
    13051306  for (unsigned iSat = 0; iSat < epo->rnxSat.size(); iSat++) {
    1306 
    13071307    const t_rnxSat& rnxSat = epo->rnxSat[iSat];
    13081308    char            sys    = rnxSat.prn.system();
    1309 
    13101309    for (int iTypeV2 = 0; iTypeV2 < header.nTypes(sys); iTypeV2++) {
    13111310      if (iTypeV2 > 0 && iTypeV2 % 5 == 0) {
     
    13141313      QString typeV2 = header.obsType(sys, iTypeV2);
    13151314      bool    found  = false;
    1316 
    1317       QString preferredAttrib = signalPriorities(sys);
    1318       for (int iPref = 0; iPref < preferredAttrib.length(); iPref++) {
     1315      QStringList preferredAttribList = signalPriorities(sys);
     1316      QString preferredAttrib;
     1317      for (int ii = 0; ii < preferredAttribList.size(); ii++) {
     1318        if (preferredAttribList[ii].indexOf("&") != -1) {
     1319          QStringList hlp = preferredAttribList[ii].split("&", QString::SkipEmptyParts);
     1320          if (hlp.size() == 2 && hlp[0].contains(typeV2[1])) {
     1321            preferredAttrib = hlp[1];
     1322          }
     1323        }
     1324        else {
     1325          preferredAttrib = preferredAttribList[ii];
     1326        }
     1327      }
     1328
     1329      for (int iPref = 0; iPref < preferredAttribList.size(); iPref++) {
    13191330        QMapIterator<QString, t_rnxObs> itObs(rnxSat.obs);
    13201331        while (itObs.hasNext()) {
     
    15451556// Tracking Mode Priorities
    15461557////////////////////////////////////////////////////////////////////////////
    1547 QString t_rnxObsFile::signalPriorities(char sys) {
     1558QStringList t_rnxObsFile::signalPriorities(char sys) {
    15481559
    15491560  bncSettings settings;
    1550 
     1561 
    15511562  QStringList priorList;
    15521563  QString reqcAction = settings.value("reqcAction").toString();
     
    15551566  // ---------------------------------------------------
    15561567  if (reqcAction == "Edit/Concatenate") {
    1557   priorList = settings.value("reqcV2Priority").toString().split(" ", QString::SkipEmptyParts);
     1568    priorList = settings.value("reqcV2Priority").toString().split(" ", QString::SkipEmptyParts);
    15581569  }
    15591570
     
    15611572  // ----------------------------
    15621573  else {
    1563   priorList = settings.value("rnxV2Priority").toString().split(" ", QString::SkipEmptyParts);
    1564   }
    1565 
    1566   if (priorList.empty()) {
    1567     priorList << "CWPX_?";
    1568   }
    1569 
    1570   QString result;
     1574    priorList = settings.value("rnxV2Priority").toString().split(" ", QString::SkipEmptyParts);
     1575  }
     1576
     1577  QStringList result;
    15711578  for (int ii = 0; ii < priorList.size(); ii++) {
    15721579    if (priorList[ii].indexOf(":") != -1) {
    15731580      QStringList hlp = priorList[ii].split(":", QString::SkipEmptyParts);
    15741581      if (hlp.size() == 2 && hlp[0].length() == 1 && hlp[0][0] == sys) {
    1575         result = hlp[1];
     1582        result.append(hlp[1]);
     1583      }
     1584    }
     1585    else {
     1586      result.append(priorList[ii]);
     1587    }
     1588  }
     1589
     1590  if (result.empty()) {
     1591    switch (sys) {
     1592      case 'G':
     1593        result << "G:12&PWCSLXYN G:5&IQX";
    15761594        break;
    1577       }
    1578     }
    1579     else {
    1580       result = priorList[ii];
    1581     }
    1582   }
    1583 
     1595      case 'R':
     1596        result << "R:12&PC R:3&IQX";
     1597        break;
     1598      case 'E':
     1599        result << "E:16&BCX E:578&IQX";
     1600        break;
     1601      case 'J':
     1602        result << "J:1&SLXCZ J:26&SLX J:5&IQX";
     1603        break;
     1604      case 'C':
     1605        result << "C:IQX";
     1606        break;
     1607      case 'I':
     1608        result << "I:ABCX";
     1609        break;
     1610      case 'S':
     1611        result << "S:1&C S:5&IQX";
     1612        break;
     1613    }
     1614  }
    15841615  return result;
    15851616}
  • trunk/BNC/src/rinex/rnxobsfile.h

    r7817 r7980  
    207207  static QString type2to3(char sys, const QString& typeV2);
    208208  static QString type3to2(char sys, const QString& typeV3);
    209   static QString signalPriorities(char sys);
     209  static QStringList signalPriorities(char sys);
    210210
    211211  static void writeEpoch(QTextStream* stream, const t_rnxObsHeader& header, const t_rnxEpo* epo) {
Note: See TracChangeset for help on using the changeset viewer.