Changeset 6795 in ntrip for trunk


Ignore:
Timestamp:
Apr 23, 2015, 5:33:29 PM (10 years ago)
Author:
stuerze
Message:

Receiver Number, Antenna Number and Antenna Eccentricity are now additional editable RINEX header fields

Location:
trunk/BNC/src
Files:
4 edited

Legend:

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

    r6744 r6795  
    5757  const QString timeFmtString = "yyyy-MM-dd hh:mm:ss";
    5858
    59   _reqcRnxVersion      = new QComboBox(this);
    60   _reqcSampling        = new QSpinBox(this);
    61   _reqcStartDateTime   = new QDateTimeEdit(this);
     59  _reqcRnxVersion        = new QComboBox(this);
     60  _reqcSampling          = new QSpinBox(this);
     61  _reqcStartDateTime     = new QDateTimeEdit(this);
    6262  _reqcStartDateTime->setDisplayFormat(timeFmtString);
    63   _reqcEndDateTime     = new QDateTimeEdit(this);
     63  _reqcEndDateTime       = new QDateTimeEdit(this);
    6464  _reqcEndDateTime->setDisplayFormat(timeFmtString);
    65   _reqcRunBy           = new QLineEdit(this);
    66   _reqcUseObsTypes     = new QLineEdit(this);
    67   _reqcComment         = new QLineEdit(this);
    68   _reqcOldMarkerName   = new QLineEdit(this);
    69   _reqcNewMarkerName   = new QLineEdit(this);
    70   _reqcOldAntennaName  = new QLineEdit(this);
    71   _reqcNewAntennaName  = new QLineEdit(this);
    72   _reqcOldReceiverName = new QLineEdit(this);
    73   _reqcNewReceiverName = new QLineEdit(this);
     65  _reqcRunBy             = new QLineEdit(this);
     66  _reqcUseObsTypes       = new QLineEdit(this);
     67  _reqcComment           = new QLineEdit(this);
     68  _reqcOldMarkerName     = new QLineEdit(this);
     69  _reqcNewMarkerName     = new QLineEdit(this);
     70  _reqcOldAntennaName    = new QLineEdit(this);
     71  _reqcNewAntennaName    = new QLineEdit(this);
     72  _reqcOldAntennaNumber  = new QLineEdit(this);
     73  _reqcNewAntennaNumber  = new QLineEdit(this);
     74  _reqcOldAntennadN      = new QLineEdit(this);
     75  _reqcNewAntennadN      = new QLineEdit(this);
     76  _reqcOldAntennadE      = new QLineEdit(this);
     77  _reqcNewAntennadE      = new QLineEdit(this);
     78  _reqcOldAntennadU      = new QLineEdit(this);
     79  _reqcNewAntennadU      = new QLineEdit(this);
     80  _reqcOldReceiverName   = new QLineEdit(this);
     81  _reqcNewReceiverName   = new QLineEdit(this);
     82  _reqcOldReceiverNumber = new QLineEdit(this);
     83  _reqcNewReceiverNumber = new QLineEdit(this);
     84
    7485
    7586  _reqcRnxVersion->setEditable(false);
     
    111122  _reqcOldAntennaName->setText(settings.value("reqcOldAntennaName").toString());
    112123  _reqcNewAntennaName->setText(settings.value("reqcNewAntennaName").toString());
     124  _reqcOldAntennaNumber->setText(settings.value("reqcOldAntennaNumber").toString());
     125  _reqcNewAntennaNumber->setText(settings.value("reqcNewAntennaNumber").toString());
     126  _reqcOldAntennadN->setText(settings.value("reqcOldAntennadN").toString());
     127  _reqcNewAntennadN->setText(settings.value("reqcNewAntennadN").toString());
     128  _reqcOldAntennadE->setText(settings.value("reqcOldAntennadE").toString());
     129  _reqcNewAntennadE->setText(settings.value("reqcNewAntennadE").toString());
     130  _reqcOldAntennadU->setText(settings.value("reqcOldAntennadU").toString());
     131  _reqcNewAntennadU->setText(settings.value("reqcNewAntennadU").toString());
    113132  _reqcOldReceiverName->setText(settings.value("reqcOldReceiverName").toString());
    114133  _reqcNewReceiverName->setText(settings.value("reqcNewReceiverName").toString());
     134  _reqcOldReceiverNumber->setText(settings.value("reqcOldReceiverNumber").toString());
     135  _reqcNewReceiverNumber->setText(settings.value("reqcNewReceiverNumber").toString());
     136
    115137
    116138  QString hlp = settings.value("reqcV2Priority").toString();
     
    158180  grid->addWidget(_reqcNewAntennaName,            ir, 3, 1, 2);
    159181  ++ir;
     182  grid->addWidget(new QLabel("Antenna Number"),   ir, 0);
     183  grid->addWidget(_reqcOldAntennaNumber,          ir, 1, 1, 2);
     184  grid->addWidget(_reqcNewAntennaNumber,          ir, 3, 1, 2);
     185  ++ir;
     186  grid->addWidget(new QLabel("Antenna ecc. dN"),  ir, 0);
     187  grid->addWidget(_reqcOldAntennadN,              ir, 1, 1, 2);
     188  grid->addWidget(_reqcNewAntennadN,              ir, 3, 1, 2);
     189  ++ir;
     190  grid->addWidget(new QLabel("Antenna ecc. dE"),  ir, 0);
     191  grid->addWidget(_reqcOldAntennadE,              ir, 1, 1, 2);
     192  grid->addWidget(_reqcNewAntennadE,              ir, 3, 1, 2);
     193  ++ir;
     194  grid->addWidget(new QLabel("Antenna ecc. dU"),  ir, 0);
     195  grid->addWidget(_reqcOldAntennadU,              ir, 1, 1, 2);
     196  grid->addWidget(_reqcNewAntennadU,              ir, 3, 1, 2);
     197  ++ir;
    160198  grid->addWidget(new QLabel("Receiver Name"),    ir, 0);
    161199  grid->addWidget(_reqcOldReceiverName,           ir, 1, 1, 2);
    162200  grid->addWidget(_reqcNewReceiverName,           ir, 3, 1, 2);
     201  ++ir;
     202  grid->addWidget(new QLabel("Receiver Number"),  ir, 0);
     203  grid->addWidget(_reqcOldReceiverNumber,         ir, 1, 1, 2);
     204  grid->addWidget(_reqcNewReceiverNumber,         ir, 3, 1, 2);
     205
    163206
    164207  slotReqcTextChanged();
     
    194237  _reqcOldAntennaName->setWhatsThis(tr("<p>Enter old antenna name in RINEX observation file.</p><p>Default is an empty option field.</p>"));
    195238  _reqcNewAntennaName->setWhatsThis(tr("<p>Enter new antenna name in RINEX observation file.</p><p>If option 'Old Antenna Name' is either left blank or its contents is specified as given in the RINEX input file, then the antenna name in the RINEX output file will be specified by 'New Antenna Name'</p><p>Default is an empty option field, meaning that the contents of the antenna name data field in the RINEX file will not be changed.</p>"));
     239  _reqcOldAntennaNumber->setWhatsThis(tr("<p>Enter old antenna number in RINEX observation file.</p><p>Default is an empty option field.</p>"));
     240  _reqcNewAntennaNumber->setWhatsThis(tr("<p>Enter new antenna number in RINEX observation file.</p><p>If option 'Old Antenna Number' is either left blank or its contents is specified as given in the RINEX input file, then the antenna number in the RINEX output file will be specified by 'New Antenna Number'</p><p>Default is an empty option field, meaning that the contents of the antenna number data field in the RINEX file will not be changed.</p>"));
     241  _reqcOldAntennadN->setWhatsThis(tr("<p>Enter old north antenna eccentricity in RINEX observation file.</p><p>Default is an empty option field.</p>"));
     242  _reqcNewAntennadN->setWhatsThis(tr("<p>Enter new north antenna eccentricity in RINEX observation file.</p><p>If option 'Old Antenna North Eccentricity' is either left blank or its contents is specified as given in the RINEX input file, then the north antenna eccentricity in the RINEX output file will be specified by 'New North Antenna Eccentricity'</p><p>Default is an empty option field, meaning that the contents of the north antenna eccentricity data field in the RINEX file will not be changed.</p>"));
     243  _reqcOldAntennadE->setWhatsThis(tr("<p>Enter old east antenna eccentricity in RINEX observation file.</p><p>Default is an empty option field.</p>"));
     244  _reqcNewAntennadE->setWhatsThis(tr("<p>Enter new east antenna eccentricity in RINEX observation file.</p><p>If option 'Old Antenna East Eccentricity' is either left blank or its contents is specified as given in the RINEX input file, then the east antenna eccentricity in the RINEX output file will be specified by 'New East Antenna Eccentricity'</p><p>Default is an empty option field, meaning that the contents of the east antenna eccentricity data field in the RINEX file will not be changed.</p>"));
     245  _reqcOldAntennadU->setWhatsThis(tr("<p>Enter old up antenna eccentricity in RINEX observation file.</p><p>Default is an empty option field.</p>"));
     246  _reqcNewAntennadU->setWhatsThis(tr("<p>Enter new up antenna eccentricity in RINEX observation file.</p><p>If option 'Old Antenna Up Eccentricity' is either left blank or its contents is specified as given in the RINEX input file, then the up antenna eccentricity in the RINEX output file will be specified by 'New Up Antenna Eccentricity'</p><p>Default is an empty option field, meaning that the contents of the up antenna eccentricity data field in the RINEX file will not be changed.</p>"));
    196247  _reqcOldReceiverName->setWhatsThis(tr("<p>Enter old receiver name in RINEX observation file.<p>Default is an empty option field.</p></p>"));
    197248  _reqcNewReceiverName->setWhatsThis(tr("<p>Enter new receiver name in RINEX observation file.</p><p>If option 'Old Receiver Name' is either left blank or its contents is specified as given in the RINEX input file, then the receiver name in the RINEX output file will be specified by 'New Receiver Name'</p><p>Default is an empty option field, meaning that the contents of the receiver name data field in the RINEX file will not be changed.</p>"));
     249  _reqcOldReceiverNumber->setWhatsThis(tr("<p>Enter old receiver number in RINEX observation file.<p>Default is an empty option field.</p></p>"));
     250  _reqcNewReceiverNumber->setWhatsThis(tr("<p>Enter new receiver number in RINEX observation file.</p><p>If option 'Old Receiver Number' is either left blank or its contents is specified as given in the RINEX input file, then the receiver number in the RINEX output file will be specified by 'New Receiver Number'</p><p>Default is an empty option field, meaning that the contents of the receiver number data field in the RINEX file will not be changed.</p>"));
    198251  _reqcComment->setWhatsThis(tr("<p>Specifying a comment line text to be added to the emerging new RINEX file header is an option. Any introduction of newline specification '\\n' in this enforces the beginning of a further comment line. The  comment line(s) will be added to the header after the 'PGM / RUN BY / DATE' record.</p><p>Default is an empty option field meaning that no additional comment line is added to the RINEX header.</p>"));
    199252  _reqcRunBy->setWhatsThis(tr("<p>Specify a 'RUN BY' string to be included in the emerging new RINEX file header.</p><p>Default is an empty option field meanig the operator's user ID is used as 'RUN BY' string.</p>"));
     
    247300  bncSettings settings;
    248301
    249   settings.setValue("reqcRnxVersion"     , _reqcRnxVersion->currentText());   
    250   settings.setValue("reqcSampling"       , _reqcSampling->value());     
    251   settings.setValue("reqcV2Priority"     , _reqcV2Priority->text());
    252   settings.setValue("reqcStartDateTime"  , _reqcStartDateTime->dateTime().toString(Qt::ISODate));
    253   settings.setValue("reqcEndDateTime"    , _reqcEndDateTime->dateTime().toString(Qt::ISODate));   
    254   settings.setValue("reqcRunBy"          , _reqcRunBy->text());
    255   settings.setValue("reqcUseObsTypes"    , _reqcUseObsTypes->text());
    256   settings.setValue("reqcComment"        , _reqcComment->text());
    257   settings.setValue("reqcOldMarkerName"  , _reqcOldMarkerName->text());
    258   settings.setValue("reqcNewMarkerName"  , _reqcNewMarkerName->text());
    259   settings.setValue("reqcOldAntennaName" , _reqcOldAntennaName->text());
    260   settings.setValue("reqcNewAntennaName" , _reqcNewAntennaName->text());
    261   settings.setValue("reqcOldReceiverName", _reqcOldReceiverName->text());
    262   settings.setValue("reqcNewReceiverName", _reqcNewReceiverName->text());
     302  settings.setValue("reqcRnxVersion"       , _reqcRnxVersion->currentText());
     303  settings.setValue("reqcSampling"         , _reqcSampling->value());
     304  settings.setValue("reqcV2Priority"       , _reqcV2Priority->text());
     305  settings.setValue("reqcStartDateTime"    , _reqcStartDateTime->dateTime().toString(Qt::ISODate));
     306  settings.setValue("reqcEndDateTime"      , _reqcEndDateTime->dateTime().toString(Qt::ISODate));
     307  settings.setValue("reqcRunBy"            , _reqcRunBy->text());
     308  settings.setValue("reqcUseObsTypes"      , _reqcUseObsTypes->text());
     309  settings.setValue("reqcComment"          , _reqcComment->text());
     310  settings.setValue("reqcOldMarkerName"    , _reqcOldMarkerName->text());
     311  settings.setValue("reqcNewMarkerName"    , _reqcNewMarkerName->text());
     312  settings.setValue("reqcOldAntennaName"   , _reqcOldAntennaName->text());
     313  settings.setValue("reqcNewAntennaName"   , _reqcNewAntennaName->text());
     314  settings.setValue("reqcOldAntennaNumber" , _reqcOldAntennaNumber->text());
     315  settings.setValue("reqcNewAntennaNumber" , _reqcNewAntennaNumber->text());
     316  settings.setValue("reqcOldAntennadN"     , _reqcOldAntennadN->text());
     317  settings.setValue("reqcNewAntennadN"     , _reqcNewAntennadN->text());
     318  settings.setValue("reqcOldAntennadE"     , _reqcOldAntennadE->text());
     319  settings.setValue("reqcNewAntennadE"     , _reqcNewAntennadE->text());
     320  settings.setValue("reqcOldAntennadU"     , _reqcOldAntennadU->text());
     321  settings.setValue("reqcNewAntennadU"     , _reqcNewAntennadU->text());
     322  settings.setValue("reqcNewAntennaNumber" , _reqcNewAntennaNumber->text());
     323  settings.setValue("reqcOldReceiverName"  , _reqcOldReceiverName->text());
     324  settings.setValue("reqcNewReceiverName"  , _reqcNewReceiverName->text());
     325  settings.setValue("reqcOldReceiverNumber", _reqcOldReceiverNumber->text());
     326  settings.setValue("reqcNewReceiverNumber", _reqcNewReceiverNumber->text());
    263327}
    264328
  • trunk/BNC/src/reqcdlg.h

    r6676 r6795  
    6666   QLineEdit*     _reqcOldAntennaName;
    6767   QLineEdit*     _reqcNewAntennaName;
     68   QLineEdit*     _reqcOldAntennaNumber;
     69   QLineEdit*     _reqcNewAntennaNumber;
     70   QLineEdit*     _reqcOldAntennadN;
     71   QLineEdit*     _reqcNewAntennadN;
     72   QLineEdit*     _reqcOldAntennadE;
     73   QLineEdit*     _reqcNewAntennadE;
     74   QLineEdit*     _reqcOldAntennadU;
     75   QLineEdit*     _reqcNewAntennadU;
    6876   QLineEdit*     _reqcOldReceiverName;
    6977   QLineEdit*     _reqcNewReceiverName;
     78   QLineEdit*     _reqcOldReceiverNumber;
     79   QLineEdit*     _reqcNewReceiverNumber;
    7080   QPushButton*   _buttonOK;
    7181   QPushButton*   _buttonCancel;
  • trunk/BNC/src/rinex/reqcedit.cpp

    r6602 r6795  
    339339  }
    340340
     341  QString oldAntennaNumber  = settings.value("reqcOldAntennaNumber").toString();
     342  QString newAntennaNumber  = settings.value("reqcNewAntennaNumber").toString();
     343  if (!newAntennaNumber.isEmpty()) {
     344    if (oldAntennaNumber.isEmpty() ||
     345        QRegExp(oldAntennaNumber).exactMatch(obsFile.antennaNumber())) {
     346      obsFile.setAntennaNumber(newAntennaNumber);
     347    }
     348  }
     349
     350
     351  const ColumnVector& obsFileAntNEU = obsFile.antNEU();
     352  QString oldAntennadN = settings.value("reqcOldAntennadN").toString();
     353  QString newAntennadN = settings.value("reqcNewAntennadN").toString();
     354  if(!newAntennadN.isEmpty()) {
     355    if (oldAntennadN.isEmpty() ||
     356        oldAntennadN.toDouble() == obsFileAntNEU(1)) {
     357      obsFile.setAntennaN(newAntennadN.toDouble());
     358    }
     359  }
     360  QString oldAntennadE = settings.value("reqcOldAntennadE").toString();
     361  QString newAntennadE = settings.value("reqcNewAntennadE").toString();
     362  if(!newAntennadE.isEmpty()) {
     363    if (oldAntennadE.isEmpty() ||
     364        oldAntennadE.toDouble() == obsFileAntNEU(2)) {
     365      obsFile.setAntennaE(newAntennadE.toDouble());
     366    }
     367  }
     368  QString oldAntennadU = settings.value("reqcOldAntennadU").toString();
     369  QString newAntennadU = settings.value("reqcNewAntennadU").toString();
     370  if(!newAntennadU.isEmpty()) {
     371    if (oldAntennadU.isEmpty() ||
     372        oldAntennadU.toDouble() == obsFileAntNEU(3)) {
     373      obsFile.setAntennaU(newAntennadU.toDouble());
     374    }
     375  }
     376
    341377  QString oldReceiverType = settings.value("reqcOldReceiverName").toString();
    342378  QString newReceiverType = settings.value("reqcNewReceiverName").toString();
     
    345381        QRegExp(oldReceiverType).exactMatch(obsFile.receiverType())) {
    346382      obsFile.setReceiverType(newReceiverType);
     383    }
     384  }
     385
     386  QString oldReceiverNumber = settings.value("reqcOldReceiverNumber").toString();
     387  QString newReceiverNumber = settings.value("reqcNewReceiverNumber").toString();
     388  if (!newReceiverNumber.isEmpty()) {
     389    if (oldReceiverNumber.isEmpty() ||
     390        QRegExp(oldReceiverNumber).exactMatch(obsFile.receiverNumber())) {
     391      obsFile.setReceiverNumber(newReceiverNumber);
    347392    }
    348393  }
  • trunk/BNC/src/rinex/rnxobsfile.h

    r6719 r6795  
    139139  }
    140140  const QString& antennaName() const {return _header._antennaName;}
     141  const QString& antennaNumber() const {return _header._antennaNumber;}
    141142  const QString& markerName() const {return _header._markerName;}
    142143  const QString& markerNumber() const {return _header._markerNumber;}
    143144  const QString& receiverType() const {return _header._receiverType;}
     145  const QString& receiverNumber() const {return _header._receiverNumber;}
    144146
    145147  void setInterval(double interval) {_header._interval = interval;}
    146148  void setAntennaName(const QString& antennaName) {_header._antennaName = antennaName;}
     149  void setAntennaNumber(const QString& antennaNumber) {_header._antennaNumber = antennaNumber;}
     150  void setAntennaN(double antN) {_header._antNEU(1) = antN;}
     151  void setAntennaE(double antE) {_header._antNEU(2) = antE;}
     152  void setAntennaU(double antU) {_header._antNEU(3) = antU;}
     153
    147154  void setMarkerName(const QString& markerName) {_header._markerName = markerName;}
    148155  void setReceiverType(const QString& receiverType) {_header._receiverType = receiverType;}
     156  void setReceiverNumber(const QString& receiverNumber) {_header._receiverNumber = receiverNumber;}
    149157
    150158  const ColumnVector& xyz() const {return _header._xyz;}
Note: See TracChangeset for help on using the changeset viewer.