// Part of BNC, a utility for retrieving decoding and // converting GNSS data streams from NTRIP broadcasters. // // Copyright (C) 2007 // German Federal Agency for Cartography and Geodesy (BKG) // http://www.bkg.bund.de // Czech Technical University Prague, Department of Geodesy // http://www.fsv.cvut.cz // // Email: euref-ip@bkg.bund.de // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation, version 2. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* ------------------------------------------------------------------------- * BKG NTRIP Client * ------------------------------------------------------------------------- * * Class: bncTableDlg * * Purpose: Displays the source table, allows mountpoints selection * * Author: L. Mervart * * Created: 24-Dec-2005 * * Changes: * * -----------------------------------------------------------------------*/ #include "bnctabledlg.h" #include "bncgetthread.h" // Constructor //////////////////////////////////////////////////////////////////////////// bncTableDlg::bncTableDlg(QWidget* parent) : QDialog(parent) { setMinimumSize(600,400); setWindowTitle(tr("Add Mountpoints")); QVBoxLayout* mainLayout = new QVBoxLayout(this); QSettings settings; _casterHostLineEdit = new QLineEdit(settings.value("casterHost").toString()); int ww = QFontMetrics(_casterHostLineEdit->font()).width('w'); _casterHostLineEdit->setMaximumWidth(18*ww); _casterPortLineEdit = new QLineEdit(settings.value("casterPort").toString()); _casterPortLineEdit->setMaximumWidth(9*ww); _casterUserLineEdit = new QLineEdit(settings.value("casterUser").toString()); _casterUserLineEdit->setMaximumWidth(9*ww); _casterPasswordLineEdit = new QLineEdit(settings.value("casterPassword").toString()); _casterPasswordLineEdit->setMaximumWidth(9*ww); _casterPasswordLineEdit->setEchoMode(QLineEdit::Password); // WhatsThis // --------- _casterUserLineEdit->setWhatsThis(tr("Access to some streams on NTRIP broadcasters may be restricted. You'll need to enter a valid 'User ID' and 'Password' for access to these protected streams. Accounts are usually provided per NTRIP broadcaster through a registration process. Register through http://igs.bkg.bund.de/index_ntrip_reg.htm for access to protected streams on www.euref-ip.net and www.igs-ip.net.")); _casterPortLineEdit->setWhatsThis(tr("Enter the NTRIP broadcaster hostname or IP number and port number. http://www.rtcm-ntrip.org/home provides information about known NTRIP broadcaster installations. Note that EUREF and IGS operate NTRIP broadcasters at http://www.euref-ip.net/home and http://www.igs-ip.net/home.")); _casterHostLineEdit->setWhatsThis(tr("Enter the NTRIP broadcaster hostname or IP number and port number. http://www.rtcm-ntrip.org/home provides information about known NTRIP broadcaster installations. Note that EUREF and IGS operate NTRIP broadcasters at http://www.euref-ip.net/home and http://www.igs-ip.net/home.")); _casterPasswordLineEdit->setWhatsThis(tr("Access to some streams on NTRIP broadcasters may be restricted. You'll need to enter a valid 'User ID' and 'Password' for access to these protected streams. Accounts are usually provided per NTRIP broadcaster through a registration procedure. Register through http://igs.bkg.bund.de/index_ntrip_reg.htm for access to protected streams on www.euref-ip.net and www.igs-ip.net.")); QGridLayout* editLayout = new QGridLayout; editLayout->addWidget(new QLabel(tr("Caster host")), 0, 0); editLayout->addWidget(_casterHostLineEdit, 0, 1); editLayout->addWidget(new QLabel(tr("Caster port")), 0, 2); editLayout->addWidget(_casterPortLineEdit, 0, 3); editLayout->addWidget(new QLabel(tr("User")), 1, 0); editLayout->addWidget(_casterUserLineEdit, 1, 1); editLayout->addWidget(new QLabel(tr("Password")), 1, 2); editLayout->addWidget(_casterPasswordLineEdit, 1, 3); mainLayout->addLayout(editLayout); _table = new QTableWidget(this); _table->setWhatsThis(tr("
Use the 'Get Table' button to download the sourcetable from the NTRIP broadcaster. Select the desired streams line by line, using +Shift and +Ctrl when necessary. Hit 'OK' to return to the main window.
Pay attention to data fields 'format' and 'format-details'. Keep in mind that BNC can only decode and convert streams that come in RTCM Version 2.x, RTCM Version 3.x, or RTIGS format. RTCM Version 2.x streams must contain message Type 18 and 19 while RTCM Version 3.x streams must contain GPS or SBAS message Type 1002 or 1004 and may contain GLONASS message types 1010 or 1012. See data field 'format-details' for available message types and their repetition rates in brackets.
Note that in order to produce RINEX Navigation files, RTCM Version 3.x streams containing message Type 1019 (GPS) and 1020 (GLONASS) or RTIGS streams are required.
Search for RTCM Version 3.x streams containing (tentative) message Types 4056 and 4057 if you need corrections to Broadcast Ephemeris.
The content of data field 'nmea' tells you whether a stream retrieval needs to be initiated by BNC by sending an NMEA-GGA message containing the user (or virtual reference station)'s coordinate.
")); connect(_table, SIGNAL(itemSelectionChanged()), this, SLOT(slotSelectionChanged())); mainLayout->addWidget(_table); _buttonWhatsThis = new QPushButton(tr("Help=Shift+F1"), this); connect(_buttonWhatsThis, SIGNAL(clicked()), this, SLOT(slotWhatsThis())); _buttonGet = new QPushButton(tr("Get table"), this); _buttonGet->setDefault(true); connect(_buttonGet, SIGNAL(clicked()), this, SLOT(slotGetTable())); _buttonCancel = new QPushButton(tr("Cancel"), this); connect(_buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); _buttonOK = new QPushButton(tr("OK"), this); connect(_buttonOK, SIGNAL(clicked()), this, SLOT(accept())); QHBoxLayout* buttonLayout = new QHBoxLayout; buttonLayout->addWidget(_buttonWhatsThis); buttonLayout->addStretch(1); buttonLayout->addWidget(_buttonGet); buttonLayout->addWidget(_buttonCancel); buttonLayout->addWidget(_buttonOK); mainLayout->addLayout(buttonLayout); } // Destructor //////////////////////////////////////////////////////////////////////////// bncTableDlg::~bncTableDlg() { if (_table) { for (int ir = 0; ir < _table->rowCount(); ir++) { for (int ic = 0; ic < _table->columnCount(); ic++) { delete _table->item(ir,ic); } } } } // Read Table the caster (static) //////////////////////////////////////////////////////////////////////////// t_irc bncTableDlg::getFullTable(const QString& casterHost, int casterPort, QStringList& allLines, bool alwaysRead) { static QMutex mutex; static QMap