source: ntrip/trunk/BNC/src/bnccore.cpp@ 6520

Last change on this file since 6520 was 6520, checked in by mervart, 9 years ago
File size: 21.0 KB
Line 
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: t_bncCore
30 *
31 * Purpose: This class implements the main application
32 *
33 * Author: L. Mervart
34 *
35 * Created: 29-Aug-2006
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
41#include <iostream>
42#include <sstream>
43#include <QMessageBox>
44#include <cmath>
45
46#include "bnccore.h"
47#include "bncutils.h"
48#include "bncrinex.h"
49#include "bncsettings.h"
50#include "bncversion.h"
51#include "ephemeris.h"
52#include "rinex/rnxobsfile.h"
53#include "rinex/rnxnavfile.h"
54#include "pppMain.h"
55
56#ifdef USE_COMBINATION
57# include "combination/bnccomb.h"
58#endif
59
60using namespace std;
61
62// Singleton
63////////////////////////////////////////////////////////////////////////////
64t_bncCore* t_bncCore::instance() {
65 static t_bncCore _bncCore;
66 return &_bncCore;
67}
68
69// Constructor
70////////////////////////////////////////////////////////////////////////////
71t_bncCore::t_bncCore() : _ephUser(false) {
72 _GUIenabled = true;
73 _logFileFlag = 0;
74 _logFile = 0;
75 _logStream = 0;
76 _rawFile = 0;
77 _caster = 0;
78#ifdef USE_COMBINATION
79 _bncComb = 0;
80#endif
81
82 // Eph file(s)
83 // -----------
84 _rinexVers = 0;
85 _ephFileGPS = 0;
86 _ephStreamGPS = 0;
87 _ephFileGlonass = 0;
88 _ephStreamGlonass = 0;
89 _ephFileGalileo = 0;
90 _ephStreamGalileo = 0;
91 _ephFileSBAS = 0;
92 _ephStreamSBAS = 0;
93
94 _portEph = 0;
95 _serverEph = 0;
96 _socketsEph = 0;
97
98 _portCorr = 0;
99 _serverCorr = 0;
100 _socketsCorr = 0;
101
102 _pgmName = QString(BNCPGMNAME).leftJustified(20, ' ', true);
103#ifdef WIN32
104 _userName = QString("${USERNAME}");
105#else
106 _userName = QString("${USER}");
107#endif
108 expandEnvVar(_userName);
109
110 _userName = _userName.leftJustified(20, ' ', true);
111 _dateAndTimeGPS = 0;
112 _mainWindow = 0;
113
114 _pppMain = new BNC_PPP::t_pppMain();
115 qRegisterMetaType< QVector<double> > ("QVector<double>");
116 qRegisterMetaType<bncTime> ("bncTime");
117 qRegisterMetaType<t_ephGPS> ("t_ephGPS");
118 qRegisterMetaType<t_ephGlo> ("t_ephGlo");
119 qRegisterMetaType<t_ephGal> ("t_ephGal");
120 qRegisterMetaType<t_ephSBAS> ("t_ephSBAS");
121 qRegisterMetaType<t_ephCompass> ("t_ephCompass");
122 qRegisterMetaType<QList<t_orbCorr> > ("QList<t_orbCorr>");
123 qRegisterMetaType<QList<t_clkCorr> > ("QList<t_clkCorr>");
124 qRegisterMetaType<QList<t_satCodeBias> > ("QList<t_satCodeBias>");
125 qRegisterMetaType<QList<t_satPhaseBias> > ("QList<t_satPhaseBias>");
126 qRegisterMetaType<t_vTec> ("t_vTec");
127
128}
129
130// Destructor
131////////////////////////////////////////////////////////////////////////////
132t_bncCore::~t_bncCore() {
133 delete _logStream;
134 delete _logFile;
135 delete _ephStreamGPS;
136 delete _ephFileGPS;
137 delete _serverEph;
138 delete _socketsEph;
139 delete _serverCorr;
140 delete _socketsCorr;
141 if (_rinexVers == 2) {
142 delete _ephStreamGlonass;
143 delete _ephFileGlonass;
144 }
145
146 delete _dateAndTimeGPS;
147 delete _rawFile;
148
149#ifdef USE_COMBINATION
150 delete _bncComb;
151#endif
152}
153
154// Write a Program Message
155////////////////////////////////////////////////////////////////////////////
156void t_bncCore::slotMessage(QByteArray msg, bool showOnScreen) {
157
158 QMutexLocker locker(&_mutexMessage);
159
160 messagePrivate(msg);
161 emit newMessage(msg, showOnScreen);
162}
163
164// Write a Program Message (private, no lock)
165////////////////////////////////////////////////////////////////////////////
166void t_bncCore::messagePrivate(const QByteArray& msg) {
167
168 // First time resolve the log file name
169 // ------------------------------------
170 QDate currDate = currentDateAndTimeGPS().date();
171 if (_logFileFlag == 0 || _fileDate != currDate) {
172 delete _logStream; _logStream = 0;
173 delete _logFile; _logFile = 0;
174 _logFileFlag = 1;
175 bncSettings settings;
176 QString logFileName = settings.value("logFile").toString();
177 if ( !logFileName.isEmpty() ) {
178 expandEnvVar(logFileName);
179 _logFile = new QFile(logFileName + "_" +
180 currDate.toString("yyMMdd").toAscii().data());
181 _fileDate = currDate;
182 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) {
183 _logFile->open(QIODevice::WriteOnly | QIODevice::Append);
184 }
185 else {
186 _logFile->open(QIODevice::WriteOnly);
187 }
188 _logStream = new QTextStream();
189 _logStream->setDevice(_logFile);
190 }
191 }
192
193 if (_logStream) {
194 QByteArray msgLocal = msg;
195 if (msg.indexOf('\n') == 0) {
196 *_logStream << endl;
197 msgLocal = msg.mid(1);
198 }
199 *_logStream << currentDateAndTimeGPS().toString("yy-MM-dd hh:mm:ss ").toAscii().data();
200 *_logStream << msgLocal.data() << endl;
201 _logStream->flush();
202 _logFile->flush();
203 }
204}
205
206//
207////////////////////////////////////////////////////////////////////////////
208t_irc t_bncCore::checkPrintEph(t_eph* eph) {
209 QMutexLocker locker(&_mutex);
210 t_irc ircPut = _ephUser.putNewEph(eph, true);
211 if (eph->checkState() == t_eph::bad) {
212 return failure;
213 }
214 printEphHeader();
215 printEph(*eph, (ircPut == success));
216 return success;
217}
218
219// New GPS Ephemeris
220////////////////////////////////////////////////////////////////////////////
221void t_bncCore::slotNewGPSEph(t_ephGPS eph) {
222 if (checkPrintEph(&eph) == success) {
223 emit newGPSEph(eph);
224 }
225}
226
227// New Glonass Ephemeris
228////////////////////////////////////////////////////////////////////////////
229void t_bncCore::slotNewGlonassEph(t_ephGlo eph) {
230 if (checkPrintEph(&eph) == success) {
231 emit newGlonassEph(eph);
232 }
233}
234
235// New Galileo Ephemeris
236////////////////////////////////////////////////////////////////////////////
237void t_bncCore::slotNewGalileoEph(t_ephGal eph) {
238 if (checkPrintEph(&eph) == success) {
239 emit newGalileoEph(eph);
240 }
241}
242
243// New SBAS Ephemeris
244////////////////////////////////////////////////////////////////////////////
245void t_bncCore::slotNewSBASEph(t_ephSBAS eph) {
246 if (checkPrintEph(&eph) == success) {
247 emit newSBASEph(eph);
248 }
249}
250
251
252// Print Header of the output File(s)
253////////////////////////////////////////////////////////////////////////////
254void t_bncCore::printEphHeader() {
255
256 bncSettings settings;
257
258 // Initialization
259 // --------------
260 if (_rinexVers == 0) {
261
262 if ( Qt::CheckState(settings.value("ephV3").toInt()) == Qt::Checked) {
263 _rinexVers = 3;
264 }
265 else {
266 _rinexVers = 2;
267 }
268
269 _ephPath = settings.value("ephPath").toString();
270
271 if ( !_ephPath.isEmpty() ) {
272 if ( _ephPath[_ephPath.length()-1] != QDir::separator() ) {
273 _ephPath += QDir::separator();
274 }
275 expandEnvVar(_ephPath);
276 }
277 }
278
279 // (Re-)Open output File(s)
280 // ------------------------
281 if (!_ephPath.isEmpty()) {
282
283 QDateTime datTim = currentDateAndTimeGPS();
284
285 QString ephFileNameGPS = _ephPath + "BRDC" +
286 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0'));
287
288 QString hlpStr = bncRinex::nextEpochStr(datTim,
289 settings.value("ephIntr").toString());
290
291 if (_rinexVers == 3) {
292 ephFileNameGPS += hlpStr + datTim.toString(".yyP");
293 }
294 else {
295 ephFileNameGPS += hlpStr + datTim.toString(".yyN");
296 }
297
298 if (_ephFileNameGPS == ephFileNameGPS) {
299 return;
300 }
301 else {
302 _ephFileNameGPS = ephFileNameGPS;
303 }
304
305 delete _ephStreamGPS;
306 delete _ephFileGPS;
307
308 QFlags<QIODevice::OpenModeFlag> appendFlagGPS;
309 QFlags<QIODevice::OpenModeFlag> appendFlagGlonass;
310
311 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked &&
312 QFile::exists(ephFileNameGPS) ) {
313 appendFlagGPS = QIODevice::Append;
314 }
315
316 _ephFileGPS = new QFile(ephFileNameGPS);
317 _ephFileGPS->open(QIODevice::WriteOnly | appendFlagGPS);
318 _ephStreamGPS = new QTextStream();
319 _ephStreamGPS->setDevice(_ephFileGPS);
320
321 if (_rinexVers == 3) {
322 _ephFileGlonass = _ephFileGPS;
323 _ephStreamGlonass = _ephStreamGPS;
324 _ephFileGalileo = _ephFileGPS;
325 _ephStreamGalileo = _ephStreamGPS;
326 _ephFileSBAS = _ephFileGPS;
327 _ephStreamSBAS = _ephStreamGPS;
328 }
329 else if (_rinexVers == 2) {
330 QString ephFileNameGlonass = _ephPath + "BRDC" +
331 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
332 hlpStr + datTim.toString(".yyG");
333
334 delete _ephStreamGlonass;
335 delete _ephFileGlonass;
336
337 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked &&
338 QFile::exists(ephFileNameGlonass) ) {
339 appendFlagGlonass = QIODevice::Append;
340 }
341
342 _ephFileGlonass = new QFile(ephFileNameGlonass);
343 _ephFileGlonass->open(QIODevice::WriteOnly | appendFlagGlonass);
344 _ephStreamGlonass = new QTextStream();
345 _ephStreamGlonass->setDevice(_ephFileGlonass);
346 }
347
348 // Header - RINEX Version 3
349 // ------------------------
350 if (_rinexVers == 3) {
351 if ( ! (appendFlagGPS & QIODevice::Append)) {
352 QString line;
353 line.sprintf(
354 "%9.2f%11sN: GNSS NAV DATA M: Mixed%12sRINEX VERSION / TYPE\n",
355 3.0, "", "");
356 *_ephStreamGPS << line;
357
358 QString hlp = currentDateAndTimeGPS().toString("yyyyMMdd hhmmss UTC").leftJustified(20, ' ', true);
359 *_ephStreamGPS << _pgmName.toAscii().data()
360 << _userName.toAscii().data()
361 << hlp.toAscii().data()
362 << "PGM / RUN BY / DATE" << endl;
363
364 line.sprintf("%60sEND OF HEADER\n", "");
365 *_ephStreamGPS << line;
366
367 _ephStreamGPS->flush();
368 }
369 }
370
371 // Headers - RINEX Version 2
372 // -------------------------
373 else if (_rinexVers == 2) {
374 if (! (appendFlagGPS & QIODevice::Append)) {
375 QString line;
376 line.sprintf("%9.2f%11sN: GPS NAV DATA%25sRINEX VERSION / TYPE\n",
377 t_rnxNavFile::defaultRnxNavVersion2, "", "");
378 *_ephStreamGPS << line;
379
380 QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true);
381 *_ephStreamGPS << _pgmName.toAscii().data()
382 << _userName.toAscii().data()
383 << hlp.toAscii().data()
384 << "PGM / RUN BY / DATE" << endl;
385
386 line.sprintf("%60sEND OF HEADER\n", "");
387 *_ephStreamGPS << line;
388
389 _ephStreamGPS->flush();
390 }
391 if (! (appendFlagGlonass & QIODevice::Append)) {
392 QString line;
393 line.sprintf("%9.2f%11sG: GLONASS NAV DATA%21sRINEX VERSION / TYPE\n",
394 t_rnxNavFile::defaultRnxNavVersion2, "", "");
395 *_ephStreamGlonass << line;
396
397 QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true);
398 *_ephStreamGlonass << _pgmName.toAscii().data()
399 << _userName.toAscii().data()
400 << hlp.toAscii().data()
401 << "PGM / RUN BY / DATE" << endl;
402
403 line.sprintf("%60sEND OF HEADER\n", "");
404 *_ephStreamGlonass << line;
405
406 _ephStreamGlonass->flush();
407 }
408 }
409 }
410}
411
412// Print One Ephemeris
413////////////////////////////////////////////////////////////////////////////
414void t_bncCore::printEph(const t_eph& eph, bool printFile) {
415
416 QString strV2 = eph.toString(t_rnxNavFile::defaultRnxNavVersion2);
417 QString strV3 = eph.toString(t_rnxObsHeader::defaultRnxObsVersion3);
418
419 printOutputEph(printFile, _ephStreamGlonass, strV2, strV3);
420}
421
422// Output
423////////////////////////////////////////////////////////////////////////////
424void t_bncCore::printOutputEph(bool printFile, QTextStream* stream,
425 const QString& strV2, const QString& strV3) {
426
427 // Output into file
428 // ----------------
429 if (printFile && stream) {
430 if (_rinexVers == 2) {
431 *stream << strV2.toAscii();
432 }
433 else {
434 *stream << strV3.toAscii();
435 }
436 stream->flush();
437 }
438
439 // Output into the socket
440 // ----------------------
441 if (_socketsEph) {
442 QMutableListIterator<QTcpSocket*> is(*_socketsEph);
443 while (is.hasNext()) {
444 QTcpSocket* sock = is.next();
445 if (sock->state() == QAbstractSocket::ConnectedState) {
446 if (sock->write(strV3.toAscii()) == -1) {
447 delete sock;
448 is.remove();
449 }
450 }
451 else if (sock->state() != QAbstractSocket::ConnectingState) {
452 delete sock;
453 is.remove();
454 }
455 }
456 }
457}
458
459// Set Port Number
460////////////////////////////////////////////////////////////////////////////
461void t_bncCore::setPortEph(int port) {
462 _portEph = port;
463 if (_portEph != 0) {
464 delete _serverEph;
465 _serverEph = new QTcpServer;
466 if ( !_serverEph->listen(QHostAddress::Any, _portEph) ) {
467 slotMessage("t_bncCore: Cannot listen on ephemeris port", true);
468 }
469 connect(_serverEph, SIGNAL(newConnection()), this, SLOT(slotNewConnectionEph()));
470 delete _socketsEph;
471 _socketsEph = new QList<QTcpSocket*>;
472 }
473}
474
475// Set Port Number
476////////////////////////////////////////////////////////////////////////////
477void t_bncCore::setPortCorr(int port) {
478 _portCorr = port;
479 if (_portCorr != 0) {
480 delete _serverCorr;
481 _serverCorr = new QTcpServer;
482 if ( !_serverCorr->listen(QHostAddress::Any, _portCorr) ) {
483 slotMessage("t_bncCore: Cannot listen on correction port", true);
484 }
485 connect(_serverCorr, SIGNAL(newConnection()), this, SLOT(slotNewConnectionCorr()));
486 delete _socketsCorr;
487 _socketsCorr = new QList<QTcpSocket*>;
488 }
489}
490
491// New Connection
492////////////////////////////////////////////////////////////////////////////
493void t_bncCore::slotNewConnectionEph() {
494 _socketsEph->push_back( _serverEph->nextPendingConnection() );
495}
496
497// New Connection
498////////////////////////////////////////////////////////////////////////////
499void t_bncCore::slotNewConnectionCorr() {
500 _socketsCorr->push_back( _serverCorr->nextPendingConnection() );
501}
502
503//
504////////////////////////////////////////////////////////////////////////////
505void t_bncCore::slotQuit() {
506 delete _caster; _caster = 0;
507 qApp->quit();
508}
509
510//
511////////////////////////////////////////////////////////////////////////////
512void t_bncCore::slotNewOrbCorrections(QList<t_orbCorr> orbCorrections) {
513 QMutexLocker locker(&_mutex);
514 emit newOrbCorrections(orbCorrections);
515 if (_socketsCorr) {
516 ostringstream out;
517 t_orbCorr::writeEpoch(&out, orbCorrections);
518 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
519 while (is.hasNext()) {
520 QTcpSocket* sock = is.next();
521 if (sock->state() == QAbstractSocket::ConnectedState) {
522 if (sock->write(out.str().c_str()) == -1) {
523 delete sock;
524 is.remove();
525 }
526 }
527 else if (sock->state() != QAbstractSocket::ConnectingState) {
528 delete sock;
529 is.remove();
530 }
531 }
532 }
533}
534
535//
536////////////////////////////////////////////////////////////////////////////
537void t_bncCore::slotNewClkCorrections(QList<t_clkCorr> clkCorrections) {
538 QMutexLocker locker(&_mutex);
539 emit newClkCorrections(clkCorrections);
540 if (_socketsCorr) {
541 ostringstream out;
542 t_clkCorr::writeEpoch(&out, clkCorrections);
543 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
544 while (is.hasNext()) {
545 QTcpSocket* sock = is.next();
546 if (sock->state() == QAbstractSocket::ConnectedState) {
547 if (sock->write(out.str().c_str()) == -1) {
548 delete sock;
549 is.remove();
550 }
551 }
552 else if (sock->state() != QAbstractSocket::ConnectingState) {
553 delete sock;
554 is.remove();
555 }
556 }
557 }
558}
559
560//
561////////////////////////////////////////////////////////////////////////////
562void t_bncCore::slotNewCodeBiases(QList<t_satCodeBias> codeBiases) {
563 QMutexLocker locker(&_mutex);
564 emit newCodeBiases(codeBiases);
565 if (_socketsCorr) {
566 ostringstream out;
567 t_satCodeBias::writeEpoch(&out, codeBiases);
568 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
569 while (is.hasNext()) {
570 QTcpSocket* sock = is.next();
571 if (sock->state() == QAbstractSocket::ConnectedState) {
572 if (sock->write(out.str().c_str()) == -1) {
573 delete sock;
574 is.remove();
575 }
576 }
577 else if (sock->state() != QAbstractSocket::ConnectingState) {
578 delete sock;
579 is.remove();
580 }
581 }
582 }
583}
584
585//
586////////////////////////////////////////////////////////////////////////////
587void t_bncCore::slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases) {
588 QMutexLocker locker(&_mutex);
589 emit newPhaseBiases(phaseBiases);
590 if (_socketsCorr) {
591 ostringstream out;
592 t_satPhaseBias::writeEpoch(&out, phaseBiases);
593 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
594 while (is.hasNext()) {
595 QTcpSocket* sock = is.next();
596 if (sock->state() == QAbstractSocket::ConnectedState) {
597 if (sock->write(out.str().c_str()) == -1) {
598 delete sock;
599 is.remove();
600 }
601 }
602 else if (sock->state() != QAbstractSocket::ConnectingState) {
603 delete sock;
604 is.remove();
605 }
606 }
607 }
608}
609
610//
611////////////////////////////////////////////////////////////////////////////
612void t_bncCore::slotNewTec(t_vTec vTec) {
613 QMutexLocker locker(&_mutex);
614 emit newTec(vTec);
615 if (_socketsCorr) {
616 ostringstream out;
617 t_vTec::write(&out, vTec);
618 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
619 while (is.hasNext()) {
620 QTcpSocket* sock = is.next();
621 if (sock->state() == QAbstractSocket::ConnectedState) {
622 if (sock->write(out.str().c_str()) == -1) {
623 delete sock;
624 is.remove();
625 }
626 }
627 else if (sock->state() != QAbstractSocket::ConnectingState) {
628 delete sock;
629 is.remove();
630 }
631 }
632 }
633}
634
635//
636////////////////////////////////////////////////////////////////////////////
637void t_bncCore::setConfFileName(const QString& confFileName) {
638 if (confFileName.isEmpty()) {
639 _confFileName = QDir::homePath() + QDir::separator()
640 + ".config" + QDir::separator()
641 + qApp->organizationName() + QDir::separator()
642 + qApp->applicationName() + ".bnc";
643 }
644 else {
645 _confFileName = confFileName;
646 }
647}
648
649// Raw Output
650////////////////////////////////////////////////////////////////////////////
651void t_bncCore::writeRawData(const QByteArray& data, const QByteArray& staID,
652 const QByteArray& format) {
653
654 QMutexLocker locker(&_mutex);
655
656 if (!_rawFile) {
657 bncSettings settings;
658 QByteArray fileName = settings.value("rawOutFile").toByteArray();
659 if (!fileName.isEmpty()) {
660 _rawFile = new bncRawFile(fileName, staID, bncRawFile::output);
661 }
662 }
663
664 if (_rawFile) {
665 _rawFile->writeRawData(data, staID, format);
666 }
667}
668
669//
670////////////////////////////////////////////////////////////////////////////
671void t_bncCore::initCombination() {
672#ifdef USE_COMBINATION
673 _bncComb = new bncComb();
674 if (_bncComb->nStreams() < 1) {
675 delete _bncComb;
676 _bncComb = 0;
677 }
678#endif
679}
680
681//
682////////////////////////////////////////////////////////////////////////////
683void t_bncCore::stopCombination() {
684#ifdef USE_COMBINATION
685 delete _bncComb;
686 _bncComb = 0;
687#endif
688}
689
690//
691////////////////////////////////////////////////////////////////////////////
692bool t_bncCore::dateAndTimeGPSSet() const {
693 QMutexLocker locker(&_mutexDateAndTimeGPS);
694 if (_dateAndTimeGPS) {
695 return true;
696 }
697 else {
698 return false;
699 }
700}
701
702//
703////////////////////////////////////////////////////////////////////////////
704QDateTime t_bncCore::dateAndTimeGPS() const {
705 QMutexLocker locker(&_mutexDateAndTimeGPS);
706 if (_dateAndTimeGPS) {
707 return *_dateAndTimeGPS;
708 }
709 else {
710 return QDateTime();
711 }
712}
713
714//
715////////////////////////////////////////////////////////////////////////////
716void t_bncCore::setDateAndTimeGPS(QDateTime dateTime) {
717 QMutexLocker locker(&_mutexDateAndTimeGPS);
718 delete _dateAndTimeGPS;
719 _dateAndTimeGPS = new QDateTime(dateTime);
720}
721
722//
723////////////////////////////////////////////////////////////////////////////
724void t_bncCore::startPPP() {
725 _pppMain->start();
726}
727
728//
729////////////////////////////////////////////////////////////////////////////
730void t_bncCore::stopPPP() {
731 _pppMain->stop();
732 emit stopRinexPPP();
733}
734
Note: See TracBrowser for help on using the repository browser.