Changeset 8354 in ntrip for trunk


Ignore:
Timestamp:
May 18, 2018, 2:24:46 PM (6 years ago)
Author:
stuerze
Message:

inidividual satellite system will eb considerred during concatenation of epehemris files

Location:
trunk/BNC/src
Files:
10 edited

Legend:

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

    r8215 r8354  
    305305    QString ephFileNameGPS = _ephPath + "BRDC";
    306306
    307     bool ephV3filenames = settings.value("ephV3filenames").toBool();
     307    bool ephV3 = (_rinexVers == 3)? true : false;
    308308
    309309    QString hlpStr = bncRinex::nextEpochStr(datTim,
    310                          settings.value("ephIntr").toString(), ephV3filenames);
     310                         settings.value("ephIntr").toString(), ephV3);
    311311
    312312    if (_rinexVers == 3) {
    313       if (ephV3filenames) {
    314         QString country = "WRD"; // WORLD
    315         QString monNum = "0";
    316         QString recNum = "0";
    317         ephFileNameGPS += QString("%1").arg(monNum, 1, 10) +
    318                           QString("%1").arg(recNum, 1, 10) +
    319                           country +
    320                           "_S_" +     // stream
    321                           QString("%1").arg(datTim.date().year()) +
    322                           QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
    323                           hlpStr +   // HM_period
    324                           "_MN.rnx"; // mixed BRDC
    325       }
    326       else { // RNX v3 with old filenames
    327         ephFileNameGPS +=  QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
    328                            hlpStr + datTim.toString(".yyP");
    329       }
     313      QString country = "WRD"; // WORLD
     314      QString monNum = "0";
     315      QString recNum = "0";
     316      ephFileNameGPS += QString("%1").arg(monNum, 1, 10) +
     317                        QString("%1").arg(recNum, 1, 10) +
     318                        country +
     319                        "_S_" +     // stream
     320                        QString("%1").arg(datTim.date().year()) +
     321                        QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
     322                        hlpStr +   // HM_period
     323                        "_MN.rnx"; // mixed BRDC
    330324    }
    331325    else { // RNX v2.11
  • trunk/BNC/src/bncmain.cpp

    r8252 r8354  
    3939 * -----------------------------------------------------------------------*/
    4040
    41 #include <iostream>
    4241#include <unistd.h>
    4342#include <signal.h>
    44 
    4543#include <QApplication>
    4644#include <QFile>
     45#include <iostream>
    4746
    4847#include "app.h"
     
    109108      "   rnxV2Priority  {Priority of signal attributes [character string, list separated by blank character, example: G:12&PWCSLXYN G:5&IQX C:IQX]}\n"
    110109      "   rnxV3          {Produce version 3 file contents [integer number: 0=no,2=yes]}\n"
    111       "   rnxV3filenames {Produce version 3 filenames [integer number: 0=no,2=yes]}\n"
    112110      "\n"
    113111      "RINEX Ephemeris Panel keys:\n"
     
    116114      "   ephOutPort     {Output port [integer number]}\n"
    117115      "   ephV3          {Produce version 3 file contents [integer number: 0=no,2=yes]}\n"
    118       "   ephV3filenames {Produce version 3 filenames [integer number: 0=no,2=yes]}\n"
    119116      "\n"
    120117      "RINEX Editing and QC Panel keys:\n"
  • trunk/BNC/src/bncrinex.cpp

    r8288 r8354  
    9494  _writeRinexFileOnlyWithSkl = settings.value("rnxOnlyWithSKL").toBool();
    9595
    96   _rnxV3filenames = settings.value("rnxV3filenames").toBool();
     96  _rnxV3 = (Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) ? true : false;
    9797}
    9898
     
    209209////////////////////////////////////////////////////////////////////////////
    210210QString bncRinex::nextEpochStr(const QDateTime& datTim,
    211                                const QString& intStr, bool rnxV3filenames,
     211                               const QString& intStr, bool rnxV3,
    212212                               QDateTime* nextEpoch) {
    213213
     
    221221  if ( indHlp != -1) {
    222222    int step = intStr.left(indHlp-1).toInt();
    223     if (rnxV3filenames) {
     223    if (rnxV3) {
    224224      epoStr +=  QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H
    225225    } else {
     
    248248      }
    249249    }
    250     if (rnxV3filenames) {
     250    if (rnxV3) {
    251251      epoStr += QString("_%1M").arg(step, 2, 10, QChar('0'));                // period
    252252    }
     
    254254  else if (intStr == "1 hour") {
    255255    int step = intStr.left(indHlp-1).toInt();
    256     if (rnxV3filenames) {
     256    if (rnxV3) {
    257257      epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0'));  // H
    258258      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                     // M
     
    272272  else {
    273273    int step = intStr.left(indHlp-1).toInt();
    274     if (rnxV3filenames) {
     274    if (rnxV3) {
    275275      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // H
    276276      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // M
     
    303303
    304304  QString hlpStr = nextEpochStr(datTim, settings.value("rnxIntr").toString(),
    305                                 _rnxV3filenames, &_nextCloseEpoch);
     305                                _rnxV3, &_nextCloseEpoch);
    306306
    307307  int statIDlength = _statID.size() -1;
     
    335335  }
    336336
    337   if (_rnxV3filenames) {
     337  if (_rnxV3) {
    338338    QString country;
    339339    QString monNum = "0";
     
    362362            "_MO" + // mixed OBS
    363363            distStr +
    364             ".rnx"; 
     364            ".rnx";
    365365  }
    366366  else {
  • trunk/BNC/src/bncrinex.h

    r7179 r8354  
    3535class bncRinex {
    3636 public:
    37    bncRinex(const QByteArray& statID, const QUrl& mountPoint, 
     37   bncRinex(const QByteArray& statID, const QUrl& mountPoint,
    3838            const QByteArray& latitude, const QByteArray& longitude,
    39             const QByteArray& nmea, const QByteArray& ntripVersion); 
     39            const QByteArray& nmea, const QByteArray& ntripVersion);
    4040   ~bncRinex();
    4141
     
    4646
    4747   static QString nextEpochStr(const QDateTime& datTim,
    48                                const QString& intStr, 
    49                                bool rnxV3filenames,
     48                               const QString& intStr,
     49                               bool rnxV3,
    5050                               QDateTime* nextEpoch = 0);
    5151   static std::string asciiSatLine(const t_satObs& obs);
     
    7070   QString         _sklName;
    7171   bool            _writeRinexFileOnlyWithSkl;
    72    bool            _rnxV3filenames;
     72   bool            _rnxV3;
    7373   QByteArray      _latitude;
    7474   QByteArray      _longitude;
  • trunk/BNC/src/bncsettings.cpp

    r8171 r8354  
    9292    setValue_p("rnxScript",           "");
    9393    setValue_p("rnxV3",               "0");
    94     setValue_p("rnxV3filenames",      "0");
    9594    // RINEX Ephemeris
    9695    setValue_p("ephPath",             "");
     
    9897    setValue_p("ephOutPort",          "");
    9998    setValue_p("ephV3",               "0");
    100     setValue_p("ephV3filenames",      "0");
    10199    // Reqc
    102100    setValue_p("reqcAction",          "");
     
    110108    setValue_p("reqcRnxVersion",      "");
    111109    setValue_p("reqcSampling",        "");
    112     setValue_p("reqcStartDateTime",   "");
    113     setValue_p("reqcEndDateTime",     "");
     110    setValue_p("reqcStartDateTime",   "1967-11-02T00:00:00");
     111    setValue_p("reqcEndDateTime",     "2099-01-01T00:00:00");
    114112    setValue_p("reqcLogSummaryOnly",  "");
    115113    setValue_p("reqcRunBy",           "");
  • trunk/BNC/src/bncwindow.cpp

    r8276 r8354  
    240240  _rnxV3CheckBox      = new QCheckBox();
    241241  _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
    242   _rnxV3filenameCheckBox = new QCheckBox();
    243   _rnxV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3filenames").toInt()));
    244242  QString hlp = settings.value("rnxV2Priority").toString();
    245243  if (hlp.isEmpty()) {
     
    266264  _ephV3CheckBox = new QCheckBox();
    267265  _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
    268 
    269   _ephV3filenameCheckBox = new QCheckBox();
    270   _ephV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("ephV3filenames").toInt()));
    271266
    272267  connect(_ephOutPortLineEdit, SIGNAL(textChanged(const QString &)),
     
    764759  oLayout->addWidget(new QLabel("Version 3"),                      6, 0);
    765760  oLayout->addWidget(_rnxV3CheckBox,                               6, 1);
    766   oLayout->addWidget(new QLabel("Version 3 filenames"),            6, 2);
    767   oLayout->addWidget(_rnxV3filenameCheckBox,                       6, 3);
    768761  oLayout->addWidget(new QLabel(""),                               7, 1);
    769762  oLayout->setRowStretch(8, 999);
     
    787780  eLayout->addWidget(new QLabel("Version 3"),                     4, 0);
    788781  eLayout->addWidget(_ephV3CheckBox,                              4, 1);
    789   eLayout->addWidget(new QLabel("Version 3 filenames"),           4, 2);
    790   eLayout->addWidget(_ephV3filenameCheckBox,                      4, 3);
    791782  eLayout->setRowStretch(5, 999);
    792783
     
    13101301  _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_'. <i>[key: rnxV2Priority]</i></p>"));
    13111302  _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. <i>[key: rnxV3]</i></p>"));
    1312   _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. <i>[key: rnxV3filenames]</i></p>"));
    13131303
    13141304  // WhatsThis, RINEX Ephemeris
     
    13181308  _ephOutPortLineEdit->setWhatsThis(tr("<p>BNC can produce ephemeris data in RINEX Navigation ASCII format on your local host through an IP port.</p><p>Specify a port number here to activate this function. <i>[key: ephOutPort]</i></p>"));
    13191309  _ephV3CheckBox->setWhatsThis(tr("<p>The default format for output of RINEX Navigation data containing Broadcast Ephemeris is RINEX Version 2.</p><p>Select 'Version 3' if you want to output ephemeris in RINEX Version 3 format. <i>[key: ephV3]</i></p>"));
    1320   _ephV3filenameCheckBox->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. <i>[key: ephV3filenames]</i></p>"));
    13211310
    13221311  // WhatsThis, RINEX Editing & QC
     
    15121501  delete _rnxScrpLineEdit;
    15131502  delete _rnxV3CheckBox;
    1514   delete _rnxV3filenameCheckBox;
    15151503  delete _rnxV2Priority;
    15161504  delete _ephPathLineEdit;
     
    15181506  delete _ephOutPortLineEdit;
    15191507  delete _ephV3CheckBox;
    1520   delete _ephV3filenameCheckBox;
    15211508  delete _corrPathLineEdit;
    15221509  delete _corrIntrComboBox;
     
    19621949  settings.setValue("rnxSkel",     _rnxSkelLineEdit->text());
    19631950  settings.setValue("rnxOnlyWithSKL",_rnxFileCheckBox->checkState());
    1964   settings.setValue("rnxV3filenames",_rnxV3filenameCheckBox->checkState());
    19651951  settings.setValue("rnxScript",   _rnxScrpLineEdit->text());
    1966   (_rnxV3filenameCheckBox->checkState()) ?
    1967     settings.setValue("rnxV3",       _rnxV3filenameCheckBox->checkState()) :
    1968     settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
    19691952  settings.setValue("rnxV2Priority",_rnxV2Priority->text());
    19701953// RINEX Ephemeris
     
    19721955  settings.setValue("ephIntr",       _ephIntrComboBox->currentText());
    19731956  settings.setValue("ephOutPort",    _ephOutPortLineEdit->text());
    1974   settings.setValue("ephV3filenames", _ephV3filenameCheckBox->checkState());
    1975   (_ephV3filenameCheckBox->checkState()) ?
    1976     settings.setValue("ephV3",       _ephV3filenameCheckBox->checkState()) :
    1977     settings.setValue("ephV3",       _ephV3CheckBox->checkState());
    19781957// Broadcast Corrections
    19791958  settings.setValue("corrPath",    _corrPathLineEdit->text());
     
    24852464    enableWidget(enable, _ephIntrComboBox);
    24862465    enableWidget(enable, _ephV3CheckBox);
    2487     enableWidget(enable, _ephV3filenameCheckBox);
    24882466  }
    24892467
  • trunk/BNC/src/bncwindow.h

    r8252 r8354  
    164164    QLineEdit* _rnxV2Priority;
    165165    QCheckBox* _ephV3CheckBox;
    166     QCheckBox* _ephV3filenameCheckBox;
    167166    QLineEdit* _rnxSkelLineEdit;
    168167    QCheckBox* _rnxFileCheckBox;
    169     QCheckBox* _rnxV3filenameCheckBox;
    170168    QLineEdit* _rnxScrpLineEdit;
    171169    QLineEdit* _logFileLineEdit;
  • trunk/BNC/src/rinex/reqcedit.cpp

    r8204 r8354  
    561561  bool haveGPS     = false;
    562562  bool haveGlonass = false;
     563  QMap<t_eph::e_type, bool> haveGnss;
    563564  for (int ii = 0; ii < _ephs.size(); ii++) {
    564565    const t_eph* eph = _ephs[ii];
    565     if      (eph->type() == t_eph::GPS) {
    566       haveGPS = true;
    567     }
    568     else if (eph->type() == t_eph::GLONASS) {
    569       haveGlonass = true;
     566    switch (eph->type()) {
     567      case t_eph::GPS:
     568        haveGPS = true;
     569        haveGnss[t_eph::GLONASS] = true;
     570        break;
     571      case t_eph::GLONASS:
     572        haveGlonass = true;
     573        haveGnss[t_eph::GPS] = true;
     574        break;
     575      case t_eph::Galileo:
     576        haveGnss[t_eph::Galileo] = true;
     577        break;
     578      case t_eph::BDS:
     579        haveGnss[t_eph::BDS] = true;
     580        break;
     581      case t_eph::QZSS:
     582        haveGnss[t_eph::QZSS] = true;
     583        break;
     584      case t_eph::IRNSS:
     585        haveGnss[t_eph::IRNSS] = true;
     586        break;
     587      case t_eph::SBAS:
     588        haveGnss[t_eph::SBAS] = true;
     589        break;
     590      default:
     591        haveGnss[t_eph::unknown] = true;
    570592    }
    571593  }
     
    582604  else {
    583605    outNavFile.setVersion(defaultRnxNavVersion2);
     606  }
     607
     608  if (outNavFile.version() > 3.0) {
     609    if (haveGnss.size() > 1) {
     610      outNavFile.setGnssTypeV3(t_eph::unknown);
     611    }
     612    else if (haveGnss.size() == 1){
     613      outNavFile.setGnssTypeV3(haveGnss.firstKey());
     614    }
    584615  }
    585616
  • trunk/BNC/src/rinex/rnxnavfile.cpp

    r8204 r8354  
    294294  }
    295295  else {
    296     *_stream << QString("%1           N: GNSS NAV DATA    M: MIXED")
     296    QString fmt;
     297    t_eph::e_type sys = satSystem();
     298    switch(sys) {
     299      case t_eph::GPS:
     300        fmt.append("%1           N: GNSS NAV DATA    G: GPS");
     301        break;
     302      case t_eph::GLONASS:
     303        fmt.append("%1           N: GNSS NAV DATA    R: GLONASS");
     304        break;
     305      case t_eph::Galileo:
     306        fmt.append("%1           N: GNSS NAV DATA    E: Galileo");
     307        break;
     308      case t_eph::QZSS:
     309        fmt.append("%1           N: GNSS NAV DATA    J: QZSS");
     310        break;
     311      case t_eph::BDS:
     312        fmt.append("%1           N: GNSS NAV DATA    C: BDS");
     313        break;
     314      case t_eph::IRNSS:
     315        fmt.append("%1           N: GNSS NAV DATA    I: IRNSS");
     316        break;
     317      case t_eph::SBAS:
     318        fmt.append("%1           N: GNSS NAV DATA    S: SBAS");
     319        break;
     320      case t_eph::unknown:
     321        fmt.append("%1           N: GNSS NAV DATA    M: MIXED");
     322        break;
     323    }
     324    *_stream << fmt
    297325      .arg(_header._version, 9, 'f', 2)
    298326      .leftJustified(60)
  • trunk/BNC/src/rinex/rnxnavfile.h

    r8127 r8354  
    3030#include "bncconst.h"
    3131#include "bnctime.h"
     32#include "ephemeris.h"
    3233
    3334class t_pppOpt;
     
    5051    double _version;
    5152    bool   _glonass;
     53    t_eph::e_type _satSys;
    5254    QStringList _comments;
    5355  };
     
    6264  bool   glonass() const {return _header._glonass;}
    6365  QStringList comments() const {return _header._comments;}
     66  t_eph::e_type satSystem() const {return _header._satSys;}
    6467  void   setGlonass(bool glo) {_header._glonass = glo;}
     68  void   setGnssTypeV3(t_eph::e_type sys) {_header._satSys = sys;}
    6569  void   writeHeader(const QMap<QString, QString>* txtMap = 0);
    6670  void   writeEph(const t_eph* eph);
Note: See TracChangeset for help on using the changeset viewer.