Changeset 10420 in ntrip


Ignore:
Timestamp:
Apr 9, 2024, 2:25:13 PM (3 months ago)
Author:
stuerze
Message:
 
Location:
trunk/BNC/src
Files:
5 edited

Legend:

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

    r10234 r10420  
    114114    _latencycheck = false;
    115115  }
     116
     117  _NMEASampl = settings.value("serialNMEASampling").toInt();
     118  _NMEALen   = 55;
     119
    116120  initialize();
    117121  initDecoder();
     
    281285    // Manual NMEA
    282286    // -----------
    283     if ((nmeaMode == "Manual GPGGA") || (nmeaMode == "Manual GNGGA")) {
     287    if ((nmeaMode == "Manual GPGGA") ||
     288        (nmeaMode == "Manual GNGGA")) {
    284289      _serialNMEA = MANUAL_NMEA;
    285290      bncSettings settings;
    286       _manualNMEASampl = settings.value("serialManualNMEASampling").toInt();
    287291      QString hlp = settings.value("serialHeightNMEA").toString();
    288292      if (hlp.isEmpty()) {
     
    290294      }
    291295      QByteArray _serialHeightNMEA = hlp.toLatin1();
    292       _manualNMEAString = ggaString(_latitude, _longitude, _serialHeightNMEA,
    293           nmeaMode);
     296      _manualNMEAString = ggaString(_latitude, _longitude, _serialHeightNMEA, nmeaMode);
    294297    }
    295298  }
     
    316319//////////////////////////////////////////////////////////////////////////////
    317320t_irc bncGetThread::initDecoder() {
    318 
    319 
    320321
    321322  _decoder = 0;
     
    978979
    979980    if (_nmea == "yes" && _serialNMEA == MANUAL_NMEA) {
    980       if (_manualNMEASampl) {
     981      if (_NMEASampl) {
    981982        int dt = _lastManualNMEA.secsTo(QDateTime::currentDateTime());
    982         if (dt && (fmod(double(dt), double(_manualNMEASampl)) == 0.0)) {
     983        if (dt && (fmod(double(dt), double(_NMEASampl)) == 0.0)) {
    983984          _query->sendNMEA(_manualNMEAString);
    984985          _lastManualNMEA = QDateTime::currentDateTime();
  • trunk/BNC/src/bncgetthread.h

    r9124 r10420  
    119119   QByteArray                 _manualNMEAString;
    120120   QDateTime                  _lastManualNMEA;
    121    int                        _manualNMEASampl;
     121   int                        _NMEASampl;
     122   int                        _NMEALen;
    122123   int                        _nextSleep;
    123124   int                        _iMount;
  • trunk/BNC/src/bncsettings.cpp

    r10244 r10420  
    156156    setValue_p("serialFileNMEA",      "");
    157157    setValue_p("serialHeightNMEA",    "");
    158     setValue_p("serialManualNMEASampling", "10");
     158    setValue_p("serialNMEASampling", "10");
    159159    // Outages
    160160    setValue_p("adviseObsRate",       "");
  • trunk/BNC/src/bncwindow.cpp

    r10355 r10420  
    380380  _serialHeightNMEALineEdit  = new QLineEdit(settings.value("serialHeightNMEA").toString());
    381381
    382   _serialManualNMEASamplingSpinBox = new QSpinBox();
    383   _serialManualNMEASamplingSpinBox->setMinimum(0);
    384   _serialManualNMEASamplingSpinBox->setMaximum(300);
    385   _serialManualNMEASamplingSpinBox->setSingleStep(10);
    386   _serialManualNMEASamplingSpinBox->setValue(settings.value("serialManualNMEASampling").toInt());
    387   _serialManualNMEASamplingSpinBox->setSuffix(" sec");
     382  _serialNMEASamplingSpinBox = new QSpinBox();
     383  _serialNMEASamplingSpinBox->setMinimum(0);
     384  _serialNMEASamplingSpinBox->setMaximum(300);
     385  _serialNMEASamplingSpinBox->setSingleStep(10);
     386  _serialNMEASamplingSpinBox->setValue(settings.value("serialNMEASampling").toInt());
     387  _serialNMEASamplingSpinBox->setSuffix(" sec");
    388388
    389389  connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
     
    903903  _serialAutoNMEAComboBox->setMaximumWidth(14*ww);
    904904  _serialHeightNMEALineEdit->setMaximumWidth(8*ww);
    905   _serialManualNMEASamplingSpinBox->setMaximumWidth(8*ww);
     905  _serialNMEASamplingSpinBox->setMaximumWidth(8*ww);
    906906
    907907  serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver.<br>"),0,0,1,30);
     
    927927  serLayout->addWidget(_serialHeightNMEALineEdit,                 5,15, 1,11);
    928928  serLayout->addWidget(new QLabel("Sampling"),                    5,25, Qt::AlignRight);
    929   serLayout->addWidget(_serialManualNMEASamplingSpinBox,          5,26, 1,12);
     929  serLayout->addWidget(_serialNMEASamplingSpinBox,          5,26, 1,12);
    930930  serLayout->addWidget(new QLabel(""),                            6, 1);
    931931  serLayout->setRowStretch(7, 999);
     
    14661466  _serialFileNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where NMEA messages coming from your serial connected receiver are saved.</p><p>Default is an empty option field, meaning that NMEA messages will not be saved on disk. <i>[key: serialFileNMEA]</i></p>"));
    14671467  _serialHeightNMEALineEdit->setWhatsThis(tr("<p>Specify an approximate 'Height' above mean sea level in meters for the reference station introduced by option 'Mountpoint'. Together with the latitude and longitude from the source-table, the height information is used to build GGA messages to be sent to the Ntrip Broadcaster.</p><p>For adjusting latitude and longitude values of a VRS stream given in the 'Streams' canvas, you can double click the latitude/longitude data fields, specify appropriate values and then hit Enter.</p><p>This option is only relevant when option 'NMEA' is set to 'Manual GPGGA' or 'Manual GNGGA' respectively. <i>[key: serialHeightNMEA]</i></p>"));
    1468   _serialManualNMEASamplingSpinBox->setWhatsThis(tr("<p>Select a sampling interval in seconds for manual generation and upload of NMEA GGA sentences.</p><p>A sampling rate of '0' means, the a GGA sentence will be send only once to initialize the requested VRS stream. Note that some VRS systems need GGA sentences at regular intervals. <i>[key: serialManualNMEASampling]</i></p>"));
     1468  _serialNMEASamplingSpinBox->setWhatsThis(tr("<p>Select a sampling interval in seconds for manual generation and upload of NMEA GGA sentences.</p><p>A sampling rate of '0' means, a GGA sentence will be send only once to initialize the requested VRS stream. Note that some VRS systems need GGA sentences at regular intervals. <i>[key: serialNMEASampling]</i></p>"));
    14691469
    14701470  // WhatsThis, Outages
     
    17131713  delete _serialFileNMEALineEdit;
    17141714  delete _serialHeightNMEALineEdit;
    1715   delete _serialManualNMEASamplingSpinBox;
     1715  delete _serialNMEASamplingSpinBox;
    17161716  delete _adviseObsRateComboBox;
    17171717  delete _adviseFailSpinBox;
     
    21842184  settings.setValue("serialFileNMEA",    _serialFileNMEALineEdit->text());
    21852185  settings.setValue("serialHeightNMEA",  _serialHeightNMEALineEdit->text());
    2186   settings.setValue("serialManualNMEASampling", _serialManualNMEASamplingSpinBox->value());
     2186  settings.setValue("serialNMEASampling", _serialNMEASamplingSpinBox->value());
    21872187// Outages
    21882188  settings.setValue("adviseObsRate", _adviseObsRateComboBox->currentText());
     
    26992699  // Serial Output
    27002700  // -------------
    2701   if (sender() == 0 || sender() == _serialMountPointLineEdit ||
     2701  if (sender() == 0 ||
     2702      sender() == _serialMountPointLineEdit ||
    27022703      sender() == _serialAutoNMEAComboBox) {
    27032704    enable = !_serialMountPointLineEdit->text().isEmpty();
     
    27092710    enableWidget(enable, _serialFlowControlComboBox);
    27102711    enableWidget(enable, _serialAutoNMEAComboBox);
    2711     bool enable2 = enable && _serialAutoNMEAComboBox->currentText() == "Auto";
    2712     enableWidget(enable2, _serialFileNMEALineEdit);
    2713     bool enable3 = enable && _serialAutoNMEAComboBox->currentText().contains("Manual");
    2714     enableWidget(enable3, _serialHeightNMEALineEdit);
    2715     enableWidget(enable3, _serialManualNMEASamplingSpinBox);
     2712    if (enable && _serialAutoNMEAComboBox->currentText() == "Auto") {
     2713      enableWidget(true, _serialFileNMEALineEdit);
     2714      enableWidget(false, _serialHeightNMEALineEdit);
     2715      enableWidget(true, _serialNMEASamplingSpinBox);
     2716    }
     2717    else if (enable && _serialAutoNMEAComboBox->currentText().contains("Manual")) {
     2718      enableWidget(false, _serialFileNMEALineEdit);
     2719      enableWidget(true,  _serialHeightNMEALineEdit);
     2720      enableWidget(true,  _serialNMEASamplingSpinBox);
     2721    }
     2722    else {
     2723      enableWidget(false, _serialFileNMEALineEdit);
     2724      enableWidget(false, _serialHeightNMEALineEdit);
     2725      enableWidget(false, _serialNMEASamplingSpinBox);
     2726    }
    27162727  }
    27172728
  • trunk/BNC/src/bncwindow.h

    r10244 r10420  
    200200    QLineEdit* _serialFileNMEALineEdit;
    201201    QComboBox* _serialAutoNMEAComboBox;
    202     QSpinBox*  _serialManualNMEASamplingSpinBox;
     202    QSpinBox*  _serialNMEASamplingSpinBox;
    203203
    204204    QLineEdit*   _LatLineEdit;
Note: See TracChangeset for help on using the changeset viewer.