- Timestamp:
- Feb 15, 2009, 11:17:37 AM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r1576 r1595 122 122 123 123 bncSettings settings; 124 124 125 _miscMount = settings.value("miscMount").toString(); 126 127 if ( settings.value("serialMountPoint").toString() == _staID && 128 settings.value("serialAutoNMEA").toString() != "Auto" ) { 129 _height = settings.value("serialHeightNMEA").toString().toAscii(); 130 } else { 131 _height = "100"; 132 } 125 133 126 134 // Check name conflict … … 479 487 } 480 488 if (_nmea == "yes") { 481 QByteArray gga = ggaString(_latitude, _longitude );489 QByteArray gga = ggaString(_latitude, _longitude, _height); 482 490 _query->startRequest(_mountPoint, gga); 483 491 } -
trunk/BNC/bncgetthread.h
r1576 r1595 87 87 QByteArray _latitude; 88 88 QByteArray _longitude; 89 QByteArray _height; 89 90 QByteArray _nmea; 90 91 QByteArray _ntripVersion; -
trunk/BNC/bncsettings.cpp
r1538 r1595 43 43 setValue("ephV3", "0"); 44 44 setValue("logFile", ""); 45 setValue("makePause", "0");46 45 setValue("miscMount", ""); 47 46 setValue("mountPoints", ""); … … 64 63 setValue("rnxV3", "0"); 65 64 setValue("scanRTCM", "0"); 66 setValue("serialAutoNMEA", " 0");65 setValue("serialAutoNMEA", "Auto"); 67 66 setValue("serialBaudRate", "9600"); 68 67 setValue("serialDataBits", "8"); 68 setValue("serialHeightNMEA", ""); 69 69 setValue("serialMountPoint", ""); 70 70 setValue("serialParity", "NONE"); -
trunk/BNC/bncutils.cpp
r1506 r1595 129 129 // 130 130 //////////////////////////////////////////////////////////////////////////// 131 QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude) { 131 QByteArray ggaString(const QByteArray& latitude, 132 const QByteArray& longitude, 133 const QByteArray& height) { 132 134 133 135 double lat = strtod(latitude,NULL); 134 136 double lon = strtod(longitude,NULL); 137 double hei = strtod(height,NULL); 135 138 136 139 const char* flagN="N"; … … 156 159 gga += flagN; 157 160 gga += QString(",%1%2,").arg((int)lon_deg,3, 10, QLatin1Char('0')).arg(lon_min, 7, 'f', 4, QLatin1Char('0')); 158 gga += flagE + QString(",1,05,1.00,+00100,M,10.000,M,,"); 161 gga += flagE + QString(",1,05,1.00"); 162 gga += QString(",%1,").arg(hei, 7, 'f', 1, QLatin1Char('0')); 163 gga += QString("M,10.000,M,,"); 159 164 int xori; 160 165 char XOR = 0; -
trunk/BNC/bncutils.h
r1387 r1595 37 37 QDateTime currentDateAndTimeGPS(); 38 38 39 QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude); 39 QByteArray ggaString(const QByteArray& latitude, 40 const QByteArray& longitude, 41 const QByteArray& height); 40 42 41 43 #endif -
trunk/BNC/bncwindow.cpp
r1560 r1595 217 217 _obsRateComboBox->setCurrentIndex(kk); 218 218 } 219 _makePauseCheckBox = new QCheckBox();220 _makePauseCheckBox->setCheckState(Qt::CheckState(221 settings.value("makePause").toInt()));222 219 _adviseRecoSpinBox = new QSpinBox(); 223 220 _adviseRecoSpinBox->setMinimum(0); … … 270 267 _serialStopBitsComboBox->setCurrentIndex(kk); 271 268 } 272 _serialAutoNMEACheckBox = new QCheckBox(); 273 _serialAutoNMEACheckBox->setCheckState(Qt::CheckState( 274 settings.value("serialAutoNMEA").toInt())); 275 269 _serialAutoNMEAComboBox = new QComboBox(); 270 _serialAutoNMEAComboBox->setMaximumWidth(9*ww); 271 _serialAutoNMEAComboBox->addItems(QString("Auto,Manual").split(",")); 272 kk = _serialAutoNMEAComboBox->findText(settings.value("serialAutoNMEA").toString()); 273 if (kk != -1) { 274 _serialAutoNMEAComboBox->setCurrentIndex(kk); 275 } 276 _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString()); 276 277 _perfIntrComboBox = new QComboBox(); 277 278 _perfIntrComboBox->setMaximumWidth(9*ww); … … 333 334 _adviseRecoSpinBox->setWhatsThis(tr("<p>Following a stream outage or a longer series of bad observations, an advisory note is generated when valid observations are received again throughout the 'Recovery threshold' time span. A value of about 5min (default) is recommended.</p><p>A value of zero '0' means that for any stream recovery, however short, BNC immediately generates an advisory note.</p>")); 334 335 _adviseFailSpinBox->setWhatsThis(tr("<p>An advisory note is generated when no (or only corrupted) observations are seen throughout the 'Failure threshold' time span. A value of 15 min (default) is recommended.</p><p>A value of zero '0' means that for any stream failure, however short, BNC immediately generates an advisory note.</p>")); 335 _makePauseCheckBox->setWhatsThis(tr("<p>In case of a continuously corrupted stream, the decoding process can be paused and decodings are then attempted again at decreasing rate till the stream hopefully recovers. Tick 'Pause' to activate this function.</p><p>Do not tick 'Pause' (default) in order to prevent BNC from making any decoding pause. Be aware that this may incur an unnecessary workload.</p>"));336 336 _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Logs' section on the bottom of this window. They can be saved into a file when a valid path is specified in the 'Logfile (full path)' field.</p><p>The logfile name will automatically be extended by a string '_YYMMDD' carrying the current date.")); 337 337 _adviseScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle advisory notes generated in the event of corrupted streams or stream outages. The affected mountpoint and one of the comments 'Begin_Outage', 'End_Outage', 'Begin_Corrupted', or 'End_Corrupted' are passed on to the script as command line parameters.</p><p>The script can be configured to send an email to BNC's operator and/or to the affected stream provider. An empty option field (default) or invalid path means that you don't want to use this option.</p>")); … … 349 349 _serialDataBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Data bits' for the serial link.</p><p>Note that your selection must equal the number of data bits configured to the serial connected device. Note further that often 8 data bits are used.</p>")); 350 350 _serialStopBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Stop bits' for the serial link.</p><p>Note that your selection must equal the number of stop bits configured to the serial connected device. Note further that often 1 stop bit is used.</p>")); 351 _serialAutoNMEACheckBox->setWhatsThis(tr("<p>Tick 'Auto NMEA' to forward NMEA GGA messages coming from your serial connected device to the NTRIP brodacaster.</p><p>Note that this replaces the simulation of an initial NMEA GGA message based on latitude/longitude from the broadcaster's sourcetable.</p>")); 351 _serialAutoNMEAComboBox->setWhatsThis(tr("<p>Concerning virtual reference stations (VRS):<p></p>Select 'Auto' to automatically forward NMEA GGA messages coming from your serial connected device to the NTRIP brodacaster.</p><p>Note that this replaces the 'Manual' simulation of an initial NMEA GGA message based on the approximate (editable) VRS latitude/longitude from the broadcaster's sourcetable and an approximate VRS height to be specified.</p><p>The setting of this option is ignored in case of streams coming from physical reference stations.</p>")); 352 _serialHeightNMEALineEdit->setWhatsThis(tr("<p>Concerning virtual reference stations (VRS):<p></p>Specify an approximate 'Height' in meter for your VRS to simulate an inital NMEA GGA message.</p><p>The setting of this option is ignored in case of streams coming from physical reference stations.</p>")); 352 353 353 354 // Canvas with Editable Fields … … 487 488 aLayout->addWidget(new QLabel("Recovery threshold"), 2, 0); 488 489 aLayout->addWidget(_adviseRecoSpinBox, 2, 1); 489 aLayout->addWidget(new QLabel("Pause"), 2, 2, Qt::AlignRight);490 aLayout->addWidget(_makePauseCheckBox, 2, 3, Qt::AlignLeft);491 490 aLayout->addWidget(new QLabel("Script (full path)"), 3, 0); 492 491 aLayout->addWidget(_adviseScriptLineEdit, 3, 1,1,10); … … 499 498 _adviseFailSpinBox->setStyleSheet("background-color: lightGray"); 500 499 _adviseRecoSpinBox->setStyleSheet("background-color: lightGray"); 501 palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray);502 _makePauseCheckBox->setPalette(palette);503 500 _adviseScriptLineEdit->setStyleSheet("background-color: lightGray"); 504 501 _adviseFailSpinBox->setEnabled(false); 505 502 _adviseRecoSpinBox->setEnabled(false); 506 _makePauseCheckBox->setEnabled(false);507 503 _adviseScriptLineEdit->setEnabled(false); 508 504 } … … 602 598 QGridLayout* serLayout = new QGridLayout; 603 599 serLayout->setColumnMinimumWidth(0,14*ww); 600 _serialHeightNMEALineEdit->setMaximumWidth(8*ww); 604 601 serLayout->addWidget(new QLabel("Mountpoint"), 0,0, Qt::AlignLeft); 605 602 serLayout->addWidget(_serialMountPointLineEdit, 0,1,1,2); … … 614 611 serLayout->addWidget(new QLabel(" Stop bits "), 3,2, Qt::AlignRight); 615 612 serLayout->addWidget(_serialStopBitsComboBox, 3,3); 616 serLayout->addWidget(new QLabel("Auto NMEA"), 4, 0); 617 serLayout->addWidget(_serialAutoNMEACheckBox, 4, 1); 613 serLayout->addWidget(new QLabel("NMEA"), 4,0); 614 serLayout->addWidget(_serialAutoNMEAComboBox, 4,1); 615 serLayout->addWidget(new QLabel("Height"), 4,2, Qt::AlignRight); 616 serLayout->addWidget(_serialHeightNMEALineEdit, 4,3); 618 617 serLayout->addWidget(new QLabel("Serial port settings to feed a serial connected device."),5,0,1,30); 619 618 620 619 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)), 621 620 this, SLOT(bncText(const QString &))); 621 connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)), 622 this, SLOT(bncText(const QString))); 622 623 if (_serialMountPointLineEdit->text().isEmpty()) { 623 624 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray"); … … 626 627 _serialDataBitsComboBox->setStyleSheet("background-color: lightGray"); 627 628 _serialStopBitsComboBox->setStyleSheet("background-color: lightGray"); 628 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray);629 _serial AutoNMEACheckBox->setPalette(palette);629 _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray"); 630 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray"); 630 631 _serialPortNameLineEdit->setEnabled(false); 631 632 _serialBaudRateComboBox->setEnabled(false); … … 633 634 _serialDataBitsComboBox->setEnabled(false); 634 635 _serialStopBitsComboBox->setEnabled(false); 635 _serialAutoNMEACheckBox->setEnabled(false); 636 _serialAutoNMEAComboBox->setEnabled(false); 637 _serialHeightNMEALineEdit->setEnabled(false); 638 } else { 639 if (_serialAutoNMEAComboBox->currentText() == "Auto" ) { 640 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray"); 641 _serialHeightNMEALineEdit->setEnabled(false); 642 } 636 643 } 637 644 … … 886 893 settings.setValue("ephV3", _ephV3CheckBox->checkState()); 887 894 settings.setValue("logFile", _logFileLineEdit->text()); 888 settings.setValue("makePause", _makePauseCheckBox->checkState());889 895 settings.setValue("miscMount", _miscMountLineEdit->text()); 890 896 settings.setValue("mountPoints", mountPoints); … … 906 912 settings.setValue("rnxV3", _rnxV3CheckBox->checkState()); 907 913 settings.setValue("scanRTCM", _scanRTCMCheckBox->checkState()); 908 settings.setValue("serialAutoNMEA", _serialAutoNMEACheckBox->checkState()); 914 settings.setValue("serialHeightNMEA",_serialHeightNMEALineEdit->text()); 915 settings.setValue("serialAutoNMEA", _serialAutoNMEAComboBox->currentText()); 909 916 settings.setValue("serialBaudRate", _serialBaudRateComboBox->currentText()); 910 917 settings.setValue("serialDataBits", _serialDataBitsComboBox->currentText()); … … 1313 1320 _serialDataBitsComboBox->setStyleSheet("background-color: white"); 1314 1321 _serialStopBitsComboBox->setStyleSheet("background-color: white"); 1315 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), white); 1316 _serialAutoNMEACheckBox->setPalette(palette); 1322 _serialAutoNMEAComboBox->setStyleSheet("background-color: white"); 1317 1323 _serialPortNameLineEdit->setEnabled(true); 1318 1324 _serialBaudRateComboBox->setEnabled(true); … … 1320 1326 _serialDataBitsComboBox->setEnabled(true); 1321 1327 _serialStopBitsComboBox->setEnabled(true); 1322 _serialAutoNMEACheckBox->setEnabled(true); 1328 _serialAutoNMEAComboBox->setEnabled(true); 1329 if (_serialAutoNMEAComboBox->currentText() != "Auto" ) { 1330 _serialHeightNMEALineEdit->setStyleSheet("background-color: white"); 1331 _serialHeightNMEALineEdit->setEnabled(true); 1332 } else { 1333 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray"); 1334 _serialHeightNMEALineEdit->setEnabled(false); 1335 } 1323 1336 } else { 1324 1337 _serialPortNameLineEdit->setStyleSheet("background-color: lightGray"); … … 1327 1340 _serialDataBitsComboBox->setStyleSheet("background-color: lightGray"); 1328 1341 _serialStopBitsComboBox->setStyleSheet("background-color: lightGray"); 1329 palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray);1330 _serial AutoNMEACheckBox->setPalette(palette);1342 _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray"); 1343 _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray"); 1331 1344 _serialPortNameLineEdit->setEnabled(false); 1332 1345 _serialBaudRateComboBox->setEnabled(false); … … 1334 1347 _serialDataBitsComboBox->setEnabled(false); 1335 1348 _serialStopBitsComboBox->setEnabled(false); 1336 _serialAutoNMEACheckBox->setEnabled(false); 1349 _serialAutoNMEAComboBox->setEnabled(false); 1350 _serialHeightNMEALineEdit->setEnabled(false); 1337 1351 } 1338 1352 } … … 1345 1359 _adviseFailSpinBox->setStyleSheet("background-color: white"); 1346 1360 _adviseRecoSpinBox->setStyleSheet("background-color: white"); 1347 palette.setColor(_makePauseCheckBox->backgroundRole(), white);1348 _makePauseCheckBox->setPalette(palette);1349 1361 _adviseFailSpinBox->setEnabled(true); 1350 1362 _adviseRecoSpinBox->setEnabled(true); 1351 _makePauseCheckBox->setEnabled(true);1352 1363 _adviseScriptLineEdit->setEnabled(true); 1353 1364 } else { … … 1355 1366 _adviseFailSpinBox->setStyleSheet("background-color: lightGray"); 1356 1367 _adviseRecoSpinBox->setStyleSheet("background-color: lightGray"); 1357 palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray);1358 _makePauseCheckBox->setPalette(palette);1359 1368 _adviseFailSpinBox->setEnabled(false); 1360 1369 _adviseRecoSpinBox->setEnabled(false); 1361 _makePauseCheckBox->setEnabled(false);1362 1370 _adviseScriptLineEdit->setEnabled(false); 1363 1371 } -
trunk/BNC/bncwindow.h
r1556 r1595 123 123 QCheckBox* _autoStartCheckBox; 124 124 QCheckBox* _scanRTCMCheckBox; 125 QCheckBox* _makePauseCheckBox;126 125 QSpinBox* _waitTimeSpinBox; 127 126 QSpinBox* _corrTimeSpinBox; … … 139 138 QComboBox* _serialDataBitsComboBox; 140 139 QComboBox* _serialStopBitsComboBox; 141 QCheckBox* _serialAutoNMEACheckBox; 140 QLineEdit* _serialHeightNMEALineEdit; 141 QComboBox* _serialAutoNMEAComboBox; 142 142 143 143 QLineEdit* _LatLineEdit;
Note:
See TracChangeset
for help on using the changeset viewer.