Changeset 1595 in ntrip for trunk/BNC


Ignore:
Timestamp:
Feb 15, 2009, 11:17:37 AM (16 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r1576 r1595  
    122122
    123123  bncSettings settings;
     124
    124125  _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  }
    125133
    126134  // Check name conflict
     
    479487    }
    480488    if (_nmea == "yes") {
    481       QByteArray gga = ggaString(_latitude, _longitude);
     489      QByteArray gga = ggaString(_latitude, _longitude, _height);
    482490      _query->startRequest(_mountPoint, gga);
    483491    }
  • trunk/BNC/bncgetthread.h

    r1576 r1595  
    8787   QByteArray      _latitude;
    8888   QByteArray      _longitude;
     89   QByteArray      _height;
    8990   QByteArray      _nmea;
    9091   QByteArray      _ntripVersion;
  • trunk/BNC/bncsettings.cpp

    r1538 r1595  
    4343    setValue("ephV3",            "0");
    4444    setValue("logFile",          "");
    45     setValue("makePause",        "0");
    4645    setValue("miscMount",        ""); 
    4746    setValue("mountPoints",      "");
     
    6463    setValue("rnxV3",            "0");
    6564    setValue("scanRTCM",         "0");
    66     setValue("serialAutoNMEA",   "0");
     65    setValue("serialAutoNMEA",   "Auto");
    6766    setValue("serialBaudRate",   "9600");
    6867    setValue("serialDataBits",   "8");
     68    setValue("serialHeightNMEA", "");
    6969    setValue("serialMountPoint", "");
    7070    setValue("serialParity",     "NONE");
  • trunk/BNC/bncutils.cpp

    r1506 r1595  
    129129//
    130130////////////////////////////////////////////////////////////////////////////
    131 QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude) {
     131QByteArray ggaString(const QByteArray& latitude,
     132                     const QByteArray& longitude,
     133                     const QByteArray& height) {
    132134
    133135  double lat = strtod(latitude,NULL);
    134136  double lon = strtod(longitude,NULL);
     137  double hei = strtod(height,NULL);
    135138
    136139  const char* flagN="N";
     
    156159  gga += flagN;
    157160  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,,");
    159164  int xori;
    160165  char XOR = 0;
  • trunk/BNC/bncutils.h

    r1387 r1595  
    3737QDateTime currentDateAndTimeGPS();
    3838
    39 QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude);
     39QByteArray ggaString(const QByteArray& latitude,
     40                     const QByteArray& longitude,
     41                     const QByteArray& height);
    4042
    4143#endif
  • trunk/BNC/bncwindow.cpp

    r1560 r1595  
    217217    _obsRateComboBox->setCurrentIndex(kk);
    218218  }
    219   _makePauseCheckBox  = new QCheckBox();
    220   _makePauseCheckBox->setCheckState(Qt::CheckState(
    221                                     settings.value("makePause").toInt()));
    222219  _adviseRecoSpinBox = new QSpinBox();
    223220  _adviseRecoSpinBox->setMinimum(0);
     
    270267    _serialStopBitsComboBox->setCurrentIndex(kk);
    271268  }
    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());
    276277  _perfIntrComboBox    = new QComboBox();
    277278  _perfIntrComboBox->setMaximumWidth(9*ww);
     
    333334  _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>"));
    334335  _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>"));
    336336  _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."));
    337337  _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>"));
     
    349349  _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>"));
    350350  _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>"));
    352353
    353354  // Canvas with Editable Fields
     
    487488  aLayout->addWidget(new QLabel("Recovery threshold"),            2, 0);
    488489  aLayout->addWidget(_adviseRecoSpinBox,                          2, 1);
    489   aLayout->addWidget(new QLabel("Pause"),                         2, 2, Qt::AlignRight);
    490   aLayout->addWidget(_makePauseCheckBox,                          2, 3, Qt::AlignLeft);
    491490  aLayout->addWidget(new QLabel("Script (full path)"),            3, 0);
    492491  aLayout->addWidget(_adviseScriptLineEdit,                       3, 1,1,10);
     
    499498    _adviseFailSpinBox->setStyleSheet("background-color: lightGray");
    500499    _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");
    501     palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray);
    502     _makePauseCheckBox->setPalette(palette);
    503500    _adviseScriptLineEdit->setStyleSheet("background-color: lightGray");
    504501    _adviseFailSpinBox->setEnabled(false);
    505502    _adviseRecoSpinBox->setEnabled(false);
    506     _makePauseCheckBox->setEnabled(false);
    507503    _adviseScriptLineEdit->setEnabled(false);
    508504  }
     
    602598  QGridLayout* serLayout = new QGridLayout;
    603599  serLayout->setColumnMinimumWidth(0,14*ww);
     600  _serialHeightNMEALineEdit->setMaximumWidth(8*ww);
    604601  serLayout->addWidget(new QLabel("Mountpoint"),                  0,0, Qt::AlignLeft);
    605602  serLayout->addWidget(_serialMountPointLineEdit,                 0,1,1,2);
     
    614611  serLayout->addWidget(new QLabel("               Stop bits  "),  3,2, Qt::AlignRight);
    615612  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);
    618617  serLayout->addWidget(new QLabel("Serial port settings to feed a serial connected device."),5,0,1,30);
    619618
    620619  connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
    621620          this, SLOT(bncText(const QString &)));
     621  connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),
     622          this, SLOT(bncText(const QString)));
    622623  if (_serialMountPointLineEdit->text().isEmpty()) {
    623624    _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
     
    626627    _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");
    627628    _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");
    628     palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray);
    629     _serialAutoNMEACheckBox->setPalette(palette);
     629    _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray");
     630    _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
    630631    _serialPortNameLineEdit->setEnabled(false);
    631632    _serialBaudRateComboBox->setEnabled(false);
     
    633634    _serialDataBitsComboBox->setEnabled(false);
    634635    _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    }
    636643  }
    637644
     
    886893  settings.setValue("ephV3",       _ephV3CheckBox->checkState());
    887894  settings.setValue("logFile",     _logFileLineEdit->text());
    888   settings.setValue("makePause",   _makePauseCheckBox->checkState());
    889895  settings.setValue("miscMount",   _miscMountLineEdit->text());
    890896  settings.setValue("mountPoints", mountPoints);
     
    906912  settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
    907913  settings.setValue("scanRTCM",    _scanRTCMCheckBox->checkState());
    908   settings.setValue("serialAutoNMEA",  _serialAutoNMEACheckBox->checkState());
     914  settings.setValue("serialHeightNMEA",_serialHeightNMEALineEdit->text());
     915  settings.setValue("serialAutoNMEA",  _serialAutoNMEAComboBox->currentText());
    909916  settings.setValue("serialBaudRate",  _serialBaudRateComboBox->currentText());
    910917  settings.setValue("serialDataBits",  _serialDataBitsComboBox->currentText());
     
    13131320      _serialDataBitsComboBox->setStyleSheet("background-color: white");
    13141321      _serialStopBitsComboBox->setStyleSheet("background-color: white");
    1315       palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), white);
    1316       _serialAutoNMEACheckBox->setPalette(palette);
     1322      _serialAutoNMEAComboBox->setStyleSheet("background-color: white");
    13171323      _serialPortNameLineEdit->setEnabled(true);
    13181324      _serialBaudRateComboBox->setEnabled(true);
     
    13201326      _serialDataBitsComboBox->setEnabled(true);
    13211327      _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      }
    13231336    } else {
    13241337      _serialPortNameLineEdit->setStyleSheet("background-color: lightGray");
     
    13271340      _serialDataBitsComboBox->setStyleSheet("background-color: lightGray");
    13281341      _serialStopBitsComboBox->setStyleSheet("background-color: lightGray");
    1329       palette.setColor(_serialAutoNMEACheckBox->backgroundRole(), lightGray);
    1330       _serialAutoNMEACheckBox->setPalette(palette);
     1342      _serialAutoNMEAComboBox->setStyleSheet("background-color: lightGray");
     1343      _serialHeightNMEALineEdit->setStyleSheet("background-color: lightGray");
    13311344      _serialPortNameLineEdit->setEnabled(false);
    13321345      _serialBaudRateComboBox->setEnabled(false);
     
    13341347      _serialDataBitsComboBox->setEnabled(false);
    13351348      _serialStopBitsComboBox->setEnabled(false);
    1336       _serialAutoNMEACheckBox->setEnabled(false);
     1349      _serialAutoNMEAComboBox->setEnabled(false);
     1350      _serialHeightNMEALineEdit->setEnabled(false);
    13371351    }
    13381352  }
     
    13451359      _adviseFailSpinBox->setStyleSheet("background-color: white");
    13461360      _adviseRecoSpinBox->setStyleSheet("background-color: white");
    1347       palette.setColor(_makePauseCheckBox->backgroundRole(), white);
    1348       _makePauseCheckBox->setPalette(palette);
    13491361      _adviseFailSpinBox->setEnabled(true);
    13501362      _adviseRecoSpinBox->setEnabled(true);
    1351       _makePauseCheckBox->setEnabled(true);
    13521363      _adviseScriptLineEdit->setEnabled(true);
    13531364    } else {
     
    13551366      _adviseFailSpinBox->setStyleSheet("background-color: lightGray");
    13561367      _adviseRecoSpinBox->setStyleSheet("background-color: lightGray");
    1357       palette.setColor(_makePauseCheckBox->backgroundRole(), lightGray);
    1358       _makePauseCheckBox->setPalette(palette);
    13591368      _adviseFailSpinBox->setEnabled(false);
    13601369      _adviseRecoSpinBox->setEnabled(false);
    1361       _makePauseCheckBox->setEnabled(false);
    13621370      _adviseScriptLineEdit->setEnabled(false);
    13631371    }
  • trunk/BNC/bncwindow.h

    r1556 r1595  
    123123    QCheckBox* _autoStartCheckBox;
    124124    QCheckBox* _scanRTCMCheckBox;
    125     QCheckBox* _makePauseCheckBox;
    126125    QSpinBox*  _waitTimeSpinBox;
    127126    QSpinBox*  _corrTimeSpinBox;
     
    139138    QComboBox* _serialDataBitsComboBox;
    140139    QComboBox* _serialStopBitsComboBox;
    141     QCheckBox* _serialAutoNMEACheckBox;
     140    QLineEdit* _serialHeightNMEALineEdit;
     141    QComboBox* _serialAutoNMEAComboBox;
    142142
    143143    QLineEdit*   _LatLineEdit;
Note: See TracChangeset for help on using the changeset viewer.