| 1 | // Part of BNC, a utility for retrieving decoding and
|
|---|
| 2 | // converting GNSS data streams from NTRIP broadcasters.
|
|---|
| 3 | //
|
|---|
| 4 | // Copyright (C) 2007
|
|---|
| 5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
|---|
| 6 | // http://www.bkg.bund.de
|
|---|
| 7 | // Czech Technical University Prague, Department of Geodesy
|
|---|
| 8 | // http://www.fsv.cvut.cz
|
|---|
| 9 | //
|
|---|
| 10 | // Email: euref-ip@bkg.bund.de
|
|---|
| 11 | //
|
|---|
| 12 | // This program is free software; you can redistribute it and/or
|
|---|
| 13 | // modify it under the terms of the GNU General Public License
|
|---|
| 14 | // as published by the Free Software Foundation, version 2.
|
|---|
| 15 | //
|
|---|
| 16 | // This program is distributed in the hope that it will be useful,
|
|---|
| 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 19 | // GNU General Public License for more details.
|
|---|
| 20 | //
|
|---|
| 21 | // You should have received a copy of the GNU General Public License
|
|---|
| 22 | // along with this program; if not, write to the Free Software
|
|---|
| 23 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|---|
| 24 |
|
|---|
| 25 | /* -------------------------------------------------------------------------
|
|---|
| 26 | * BKG NTRIP Client
|
|---|
| 27 | * -------------------------------------------------------------------------
|
|---|
| 28 | *
|
|---|
| 29 | * Class: bncPPPthread
|
|---|
| 30 | *
|
|---|
| 31 | * Purpose: Precise Point Positioning
|
|---|
| 32 | *
|
|---|
| 33 | * Author: L. Mervart
|
|---|
| 34 | *
|
|---|
| 35 | * Created: 21-Nov-2009
|
|---|
| 36 | *
|
|---|
| 37 | * Changes:
|
|---|
| 38 | *
|
|---|
| 39 | * -----------------------------------------------------------------------*/
|
|---|
| 40 |
|
|---|
| 41 | #include <iomanip>
|
|---|
| 42 |
|
|---|
| 43 | #include "bncpppthread.h"
|
|---|
| 44 |
|
|---|
| 45 | using namespace std;
|
|---|
| 46 |
|
|---|
| 47 | // Constructor
|
|---|
| 48 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 49 | bncPPPthread::bncPPPthread(QByteArray staID) {
|
|---|
| 50 | _staID = staID;
|
|---|
| 51 | _isToBeDeleted = false;
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | // Destructor
|
|---|
| 55 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 56 | bncPPPthread::~bncPPPthread() {
|
|---|
| 57 | if (isRunning()) {
|
|---|
| 58 | wait();
|
|---|
| 59 | }
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 | //
|
|---|
| 63 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 64 | void bncPPPthread::terminate() {
|
|---|
| 65 | _isToBeDeleted = true;
|
|---|
| 66 | if (!isRunning()) {
|
|---|
| 67 | delete this;
|
|---|
| 68 | }
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | // Run
|
|---|
| 72 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 73 | void bncPPPthread::run() {
|
|---|
| 74 | while (true) {
|
|---|
| 75 | try {
|
|---|
| 76 | if (_isToBeDeleted) {
|
|---|
| 77 | QThread::exit(0);
|
|---|
| 78 | this->deleteLater();
|
|---|
| 79 | return;
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 | }
|
|---|
| 83 | catch (...) {
|
|---|
| 84 | emit(newMessage(_staID + "bncPPPthread exception", true));
|
|---|
| 85 | _isToBeDeleted = true;
|
|---|
| 86 | }
|
|---|
| 87 | }
|
|---|
| 88 | }
|
|---|
| 89 |
|
|---|
| 90 | //
|
|---|
| 91 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 92 | void bncPPPthread::slotNewEpochData(QList<p_obs> obsList) {
|
|---|
| 93 | QMutexLocker locker(&_mutex);
|
|---|
| 94 | }
|
|---|
| 95 |
|
|---|
| 96 | //
|
|---|
| 97 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 98 | void bncPPPthread::slotNewEphGPS(gpsephemeris gpseph) {
|
|---|
| 99 | QMutexLocker locker(&_mutex);
|
|---|
| 100 | }
|
|---|
| 101 |
|
|---|
| 102 | //
|
|---|
| 103 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 104 | void bncPPPthread::slotNewCorrections(QList<QString> corrList) {
|
|---|
| 105 | QMutexLocker locker(&_mutex);
|
|---|
| 106 | }
|
|---|