Changeset 7983 in ntrip


Ignore:
Timestamp:
Jul 21, 2016, 11:27:01 AM (8 years ago)
Author:
stuerze
Message:

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

Location:
branches/BNC_2.12/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/bnchelp.html

    r7956 r7983  
    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.
  • branches/BNC_2.12/src/bncmain.cpp

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

    r7513 r7983  
    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",         "");
  • branches/BNC_2.12/src/bncwindow.cpp

    r7950 r7983  
    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);
     
    681681  _rnxSamplSpinBox->setMaximumWidth(9*ww);
    682682
    683   _rnxV2Priority->setMaximumWidth(19*ww);
    684 
    685683  oLayout->addWidget(new QLabel("Saving RINEX observation files.<br>"),0, 0, 1,50);
    686684  oLayout->addWidget(new QLabel("Directory"),                      1, 0);
     
    696694  oLayout->addWidget(new QLabel("Script (full path)"),             4, 0);
    697695  oLayout->addWidget(_rnxScrpLineEdit,                             4, 1, 1, 15);
    698   oLayout->addWidget(new QLabel("Version 2"),                      5, 0);
    699   oLayout->addWidget(_rnxV2Priority,                               5, 1);
    700   oLayout->addWidget(new QLabel("Signal priority"),                5, 2);
     696  oLayout->addWidget(new QLabel("Version 2 signal priority"),      5, 0);
     697  oLayout->addWidget(_rnxV2Priority,                               5, 1, 1, 15);
    701698  oLayout->addWidget(new QLabel("Version 3"),                      6, 0);
    702699  oLayout->addWidget(_rnxV3CheckBox,                               6, 1);
     
    12521249  _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>"));
    12531250  _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>"));
    1254   _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>"));
     1251  _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>"));
    12551252  _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>"));
    12561253  _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>"));
  • branches/BNC_2.12/src/reqcdlg.cpp

    r7678 r7983  
    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);
     
    232232  _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>"));
  • branches/BNC_2.12/src/rinex/reqcedit.cpp

    r7941 r7983  
    643643  int key = 0;
    644644  QString systems = obsFile->header().usedSystems();
    645   QString comment = QString("RINEX 3 => 2 CONVERSION DETAILS:");
     645  QString comment = QString("Signal priorities for RINEX 3 => 2 conversion:");
    646646  QString commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0'));
    647647  txtMap.insert(commentKey, comment);
    648648
    649649  for(int ii = 0; ii < obsFile->numSys(); ii++) {
    650     key++;
    651650    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'));
    655651    txtMap.insert(commentKey, comment);
     652    QMap <char, QString>  signalPriorityMap;
     653    QStringList preferredAttribListSys = obsFile->signalPriorities(sys);
    656654    QStringList types = obsFile->header().obsTypes(sys);
    657655    for (int jj = 0; jj < types.size(); jj++) {
    658       key++;
    659656      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 }
     657      char band = inType[1].toAscii();
     658      for (int ii = 0; ii < preferredAttribListSys.size(); ii++) {
     659        QString preferredAttrib;
     660        if (preferredAttribListSys[ii].indexOf("&") != -1) {
     661          QStringList hlp = preferredAttribListSys[ii].split("&", QString::SkipEmptyParts);
     662          if (hlp.size() == 2 && hlp[0].contains(band)) {
     663            preferredAttrib = hlp[1];
     664          }
     665        }
     666        else {
     667          preferredAttrib = preferredAttribListSys[ii];
     668        }
     669        if (!signalPriorityMap.contains(band) && !preferredAttrib.isEmpty()){
     670          signalPriorityMap[band] = preferredAttrib;
     671        }
     672      }
     673    }
     674    QMapIterator<char, QString> it(signalPriorityMap);
     675    while (it.hasNext()) {
     676        it.next();
     677        key++;
     678        comment = QString("%1 band %2: %3").arg(sys).arg(it.key()).arg(it.value());
     679        commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0'));
     680        txtMap.insert(commentKey, comment);
     681    }
     682  }
     683}
  • branches/BNC_2.12/src/rinex/rnxobsfile.cpp

    r7895 r7983  
    12731273  }
    12741274}
    1275 
    12761275// Write Data Epoch (RINEX Version 2)
    12771276////////////////////////////////////////////////////////////////////////////
     
    13031302  }
    13041303  *stream << endl;
     1304 
    13051305  for (unsigned iSat = 0; iSat < epo->rnxSat.size(); iSat++) {
    1306 
    13071306    const t_rnxSat& rnxSat = epo->rnxSat[iSat];
    13081307    char            sys    = rnxSat.prn.system();
    1309 
    13101308    for (int iTypeV2 = 0; iTypeV2 < header.nTypes(sys); iTypeV2++) {
    13111309      if (iTypeV2 > 0 && iTypeV2 % 5 == 0) {
     
    13141312      QString typeV2 = header.obsType(sys, iTypeV2);
    13151313      bool    found  = false;
    1316 
    1317       QString preferredAttrib = signalPriorities(sys);
    1318       for (int iPref = 0; iPref < preferredAttrib.length(); iPref++) {
     1314      QStringList preferredAttribList = signalPriorities(sys);
     1315      QString preferredAttrib;
     1316      for (int ii = 0; ii < preferredAttribList.size(); ii++) {
     1317        if (preferredAttribList[ii].indexOf("&") != -1) {
     1318          QStringList hlp = preferredAttribList[ii].split("&", QString::SkipEmptyParts);
     1319          if (hlp.size() == 2 && hlp[0].contains(typeV2[1])) {
     1320            preferredAttrib = hlp[1];
     1321          }
     1322        }
     1323        else {
     1324          preferredAttrib = preferredAttribList[ii];
     1325        }
     1326      }
     1327
     1328      for (int iPref = 0; iPref < preferredAttribList.size(); iPref++) {
    13191329        QMapIterator<QString, t_rnxObs> itObs(rnxSat.obs);
    13201330        while (itObs.hasNext()) {
     
    13581368}
    13591369
     1370
    13601371// Write Data Epoch (RINEX Version 3)
    13611372////////////////////////////////////////////////////////////////////////////
     
    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}
  • branches/BNC_2.12/src/rinex/rnxobsfile.h

    r7817 r7983  
    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.