- Timestamp:
- Apr 9, 2024, 2:25:13 PM (8 months ago)
- Location:
- trunk/BNC/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncgetthread.cpp
r10234 r10420 114 114 _latencycheck = false; 115 115 } 116 117 _NMEASampl = settings.value("serialNMEASampling").toInt(); 118 _NMEALen = 55; 119 116 120 initialize(); 117 121 initDecoder(); … … 281 285 // Manual NMEA 282 286 // ----------- 283 if ((nmeaMode == "Manual GPGGA") || (nmeaMode == "Manual GNGGA")) { 287 if ((nmeaMode == "Manual GPGGA") || 288 (nmeaMode == "Manual GNGGA")) { 284 289 _serialNMEA = MANUAL_NMEA; 285 290 bncSettings settings; 286 _manualNMEASampl = settings.value("serialManualNMEASampling").toInt();287 291 QString hlp = settings.value("serialHeightNMEA").toString(); 288 292 if (hlp.isEmpty()) { … … 290 294 } 291 295 QByteArray _serialHeightNMEA = hlp.toLatin1(); 292 _manualNMEAString = ggaString(_latitude, _longitude, _serialHeightNMEA, 293 nmeaMode); 296 _manualNMEAString = ggaString(_latitude, _longitude, _serialHeightNMEA, nmeaMode); 294 297 } 295 298 } … … 316 319 ////////////////////////////////////////////////////////////////////////////// 317 320 t_irc bncGetThread::initDecoder() { 318 319 320 321 321 322 _decoder = 0; … … 978 979 979 980 if (_nmea == "yes" && _serialNMEA == MANUAL_NMEA) { 980 if (_ manualNMEASampl) {981 if (_NMEASampl) { 981 982 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)) { 983 984 _query->sendNMEA(_manualNMEAString); 984 985 _lastManualNMEA = QDateTime::currentDateTime(); -
trunk/BNC/src/bncgetthread.h
r9124 r10420 119 119 QByteArray _manualNMEAString; 120 120 QDateTime _lastManualNMEA; 121 int _manualNMEASampl; 121 int _NMEASampl; 122 int _NMEALen; 122 123 int _nextSleep; 123 124 int _iMount; -
trunk/BNC/src/bncsettings.cpp
r10244 r10420 156 156 setValue_p("serialFileNMEA", ""); 157 157 setValue_p("serialHeightNMEA", ""); 158 setValue_p("serial ManualNMEASampling", "10");158 setValue_p("serialNMEASampling", "10"); 159 159 // Outages 160 160 setValue_p("adviseObsRate", ""); -
trunk/BNC/src/bncwindow.cpp
r10355 r10420 380 380 _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString()); 381 381 382 _serial ManualNMEASamplingSpinBox = new QSpinBox();383 _serial ManualNMEASamplingSpinBox->setMinimum(0);384 _serial ManualNMEASamplingSpinBox->setMaximum(300);385 _serial ManualNMEASamplingSpinBox->setSingleStep(10);386 _serial ManualNMEASamplingSpinBox->setValue(settings.value("serialManualNMEASampling").toInt());387 _serial ManualNMEASamplingSpinBox->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"); 388 388 389 389 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)), … … 903 903 _serialAutoNMEAComboBox->setMaximumWidth(14*ww); 904 904 _serialHeightNMEALineEdit->setMaximumWidth(8*ww); 905 _serial ManualNMEASamplingSpinBox->setMaximumWidth(8*ww);905 _serialNMEASamplingSpinBox->setMaximumWidth(8*ww); 906 906 907 907 serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver.<br>"),0,0,1,30); … … 927 927 serLayout->addWidget(_serialHeightNMEALineEdit, 5,15, 1,11); 928 928 serLayout->addWidget(new QLabel("Sampling"), 5,25, Qt::AlignRight); 929 serLayout->addWidget(_serial ManualNMEASamplingSpinBox, 5,26, 1,12);929 serLayout->addWidget(_serialNMEASamplingSpinBox, 5,26, 1,12); 930 930 serLayout->addWidget(new QLabel(""), 6, 1); 931 931 serLayout->setRowStretch(7, 999); … … 1466 1466 _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>")); 1467 1467 _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 _serial ManualNMEASamplingSpinBox->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>")); 1469 1469 1470 1470 // WhatsThis, Outages … … 1713 1713 delete _serialFileNMEALineEdit; 1714 1714 delete _serialHeightNMEALineEdit; 1715 delete _serial ManualNMEASamplingSpinBox;1715 delete _serialNMEASamplingSpinBox; 1716 1716 delete _adviseObsRateComboBox; 1717 1717 delete _adviseFailSpinBox; … … 2184 2184 settings.setValue("serialFileNMEA", _serialFileNMEALineEdit->text()); 2185 2185 settings.setValue("serialHeightNMEA", _serialHeightNMEALineEdit->text()); 2186 settings.setValue("serial ManualNMEASampling", _serialManualNMEASamplingSpinBox->value());2186 settings.setValue("serialNMEASampling", _serialNMEASamplingSpinBox->value()); 2187 2187 // Outages 2188 2188 settings.setValue("adviseObsRate", _adviseObsRateComboBox->currentText()); … … 2699 2699 // Serial Output 2700 2700 // ------------- 2701 if (sender() == 0 || sender() == _serialMountPointLineEdit || 2701 if (sender() == 0 || 2702 sender() == _serialMountPointLineEdit || 2702 2703 sender() == _serialAutoNMEAComboBox) { 2703 2704 enable = !_serialMountPointLineEdit->text().isEmpty(); … … 2709 2710 enableWidget(enable, _serialFlowControlComboBox); 2710 2711 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 } 2716 2727 } 2717 2728 -
trunk/BNC/src/bncwindow.h
r10244 r10420 200 200 QLineEdit* _serialFileNMEALineEdit; 201 201 QComboBox* _serialAutoNMEAComboBox; 202 QSpinBox* _serial ManualNMEASamplingSpinBox;202 QSpinBox* _serialNMEASamplingSpinBox; 203 203 204 204 QLineEdit* _LatLineEdit;
Note:
See TracChangeset
for help on using the changeset viewer.