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

Last change on this file since 6522 was 6522, 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 messagePrivate("WRONG EPHEMERIS\n" + eph->toString(3.0).toAscii());
213 return failure;
214 }
215 printEphHeader();
216 printEph(*eph, (ircPut == success));
217 return success;
218}
219
220// New GPS Ephemeris
221////////////////////////////////////////////////////////////////////////////
222void t_bncCore::slotNewGPSEph(t_ephGPS eph) {
223 if (checkPrintEph(&eph) == success) {
224 emit newGPSEph(eph);
225 }
226}
227
228// New Glonass Ephemeris
229////////////////////////////////////////////////////////////////////////////
230void t_bncCore::slotNewGlonassEph(t_ephGlo eph) {
231 if (checkPrintEph(&eph) == success) {
232 emit newGlonassEph(eph);
233 }
234}
235
236// New Galileo Ephemeris
237////////////////////////////////////////////////////////////////////////////
238void t_bncCore::slotNewGalileoEph(t_ephGal eph) {
239 if (checkPrintEph(&eph) == success) {
240 emit newGalileoEph(eph);
241 }
242}
243
244// New SBAS Ephemeris
245////////////////////////////////////////////////////////////////////////////
246void t_bncCore::slotNewSBASEph(t_ephSBAS eph) {
247 if (checkPrintEph(&eph) == success) {
248 emit newSBASEph(eph);
249 }
250}
251
252
253// Print Header of the output File(s)
254////////////////////////////////////////////////////////////////////////////
255void t_bncCore::printEphHeader() {
256
257 bncSettings settings;
258
259 // Initialization
260 // --------------
261 if (_rinexVers == 0) {
262
263 if ( Qt::CheckState(settings.value("ephV3").toInt()) == Qt::Checked) {
264 _rinexVers = 3;
265 }
266 else {
267 _rinexVers = 2;
268 }
269
270 _ephPath = settings.value("ephPath").toString();
271
272 if ( !_ephPath.isEmpty() ) {
273 if ( _ephPath[_ephPath.length()-1] != QDir::separator() ) {
274 _ephPath += QDir::separator();
275 }
276 expandEnvVar(_ephPath);
277 }
278 }
279
280 // (Re-)Open output File(s)
281 // ------------------------
282 if (!_ephPath.isEmpty()) {
283
284 QDateTime datTim = currentDateAndTimeGPS();
285
286 QString ephFileNameGPS = _ephPath + "BRDC" +
287 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0'));
288
289 QString hlpStr = bncRinex::nextEpochStr(datTim,
290 settings.value("ephIntr").toString());
291
292 if (_rinexVers == 3) {
293 ephFileNameGPS += hlpStr + datTim.toString(".yyP");
294 }
295 else {
296 ephFileNameGPS += hlpStr + datTim.toString(".yyN");
297 }
298
299 if (_ephFileNameGPS == ephFileNameGPS) {
300 return;
301 }
302 else {
303 _ephFileNameGPS = ephFileNameGPS;
304 }
305
306 delete _ephStreamGPS;
307 delete _ephFileGPS;
308
309 QFlags<QIODevice::OpenModeFlag> appendFlagGPS;
310 QFlags<QIODevice::OpenModeFlag> appendFlagGlonass;
311
312 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked &&
313 QFile::exists(ephFileNameGPS) ) {
314 appendFlagGPS = QIODevice::Append;
315 }
316
317 _ephFileGPS = new QFile(ephFileNameGPS);
318 _ephFileGPS->open(QIODevice::WriteOnly | appendFlagGPS);
319 _ephStreamGPS = new QTextStream();
320 _ephStreamGPS->setDevice(_ephFileGPS);
321
322 if (_rinexVers == 3) {
323 _ephFileGlonass = _ephFileGPS;
324 _ephStreamGlonass = _ephStreamGPS;
325 _ephFileGalileo = _ephFileGPS;
326 _ephStreamGalileo = _ephStreamGPS;
327 _ephFileSBAS = _ephFileGPS;
328 _ephStreamSBAS = _ephStreamGPS;
329 }
330 else if (_rinexVers == 2) {
331 QString ephFileNameGlonass = _ephPath + "BRDC" +
332 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
333 hlpStr + datTim.toString(".yyG");
334
335 delete _ephStreamGlonass;
336 delete _ephFileGlonass;
337
338 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked &&
339 QFile::exists(ephFileNameGlonass) ) {
340 appendFlagGlonass = QIODevice::Append;
341 }
342
343 _ephFileGlonass = new QFile(ephFileNameGlonass);
344 _ephFileGlonass->open(QIODevice::WriteOnly | appendFlagGlonass);
345 _ephStreamGlonass = new QTextStream();
346 _ephStreamGlonass->setDevice(_ephFileGlonass);
347 }
348
349 // Header - RINEX Version 3
350 // ------------------------
351 if (_rinexVers == 3) {
352 if ( ! (appendFlagGPS & QIODevice::Append)) {
353 QString line;
354 line.sprintf(
355 "%9.2f%11sN: GNSS NAV DATA M: Mixed%12sRINEX VERSION / TYPE\n",
356 3.0, "", "");
357 *_ephStreamGPS << line;
358
359 QString hlp = currentDateAndTimeGPS().toString("yyyyMMdd hhmmss UTC").leftJustified(20, ' ', true);
360 *_ephStreamGPS << _pgmName.toAscii().data()
361 << _userName.toAscii().data()
362 << hlp.toAscii().data()
363 << "PGM / RUN BY / DATE" << endl;
364
365 line.sprintf("%60sEND OF HEADER\n", "");
366 *_ephStreamGPS << line;
367
368 _ephStreamGPS->flush();
369 }
370 }
371
372 // Headers - RINEX Version 2
373 // -------------------------
374 else if (_rinexVers == 2) {
375 if (! (appendFlagGPS & QIODevice::Append)) {
376 QString line;
377 line.sprintf("%9.2f%11sN: GPS NAV DATA%25sRINEX VERSION / TYPE\n",
378 t_rnxNavFile::defaultRnxNavVersion2, "", "");
379 *_ephStreamGPS << line;
380
381 QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true);
382 *_ephStreamGPS << _pgmName.toAscii().data()
383 << _userName.toAscii().data()
384 << hlp.toAscii().data()
385 << "PGM / RUN BY / DATE" << endl;
386
387 line.sprintf("%60sEND OF HEADER\n", "");
388 *_ephStreamGPS << line;
389
390 _ephStreamGPS->flush();
391 }
392 if (! (appendFlagGlonass & QIODevice::Append)) {
393 QString line;
394 line.sprintf("%9.2f%11sG: GLONASS NAV DATA%21sRINEX VERSION / TYPE\n",
395 t_rnxNavFile::defaultRnxNavVersion2, "", "");
396 *_ephStreamGlonass << line;
397
398 QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true);
399 *_ephStreamGlonass << _pgmName.toAscii().data()
400 << _userName.toAscii().data()
401 << hlp.toAscii().data()
402 << "PGM / RUN BY / DATE" << endl;
403
404 line.sprintf("%60sEND OF HEADER\n", "");
405 *_ephStreamGlonass << line;
406
407 _ephStreamGlonass->flush();
408 }
409 }
410 }
411}
412
413// Print One Ephemeris
414////////////////////////////////////////////////////////////////////////////
415void t_bncCore::printEph(const t_eph& eph, bool printFile) {
416
417 QString strV2 = eph.toString(t_rnxNavFile::defaultRnxNavVersion2);
418 QString strV3 = eph.toString(t_rnxObsHeader::defaultRnxObsVersion3);
419
420 printOutputEph(printFile, _ephStreamGlonass, strV2, strV3);
421}
422
423// Output
424////////////////////////////////////////////////////////////////////////////
425void t_bncCore::printOutputEph(bool printFile, QTextStream* stream,
426 const QString& strV2, const QString& strV3) {
427
428 // Output into file
429 // ----------------
430 if (printFile && stream) {
431 if (_rinexVers == 2) {
432 *stream << strV2.toAscii();
433 }
434 else {
435 *stream << strV3.toAscii();
436 }
437 stream->flush();
438 }
439
440 // Output into the socket
441 // ----------------------
442 if (_socketsEph) {
443 QMutableListIterator<QTcpSocket*> is(*_socketsEph);
444 while (is.hasNext()) {
445 QTcpSocket* sock = is.next();
446 if (sock->state() == QAbstractSocket::ConnectedState) {
447 if (sock->write(strV3.toAscii()) == -1) {
448 delete sock;
449 is.remove();
450 }
451 }
452 else if (sock->state() != QAbstractSocket::ConnectingState) {
453 delete sock;
454 is.remove();
455 }
456 }
457 }
458}
459
460// Set Port Number
461////////////////////////////////////////////////////////////////////////////
462void t_bncCore::setPortEph(int port) {
463 _portEph = port;
464 if (_portEph != 0) {
465 delete _serverEph;
466 _serverEph = new QTcpServer;
467 if ( !_serverEph->listen(QHostAddress::Any, _portEph) ) {
468 slotMessage("t_bncCore: Cannot listen on ephemeris port", true);
469 }
470 connect(_serverEph, SIGNAL(newConnection()), this, SLOT(slotNewConnectionEph()));
471 delete _socketsEph;
472 _socketsEph = new QList<QTcpSocket*>;
473 }
474}
475
476// Set Port Number
477////////////////////////////////////////////////////////////////////////////
478void t_bncCore::setPortCorr(int port) {
479 _portCorr = port;
480 if (_portCorr != 0) {
481 delete _serverCorr;
482 _serverCorr = new QTcpServer;
483 if ( !_serverCorr->listen(QHostAddress::Any, _portCorr) ) {
484 slotMessage("t_bncCore: Cannot listen on correction port", true);
485 }
486 connect(_serverCorr, SIGNAL(newConnection()), this, SLOT(slotNewConnectionCorr()));
487 delete _socketsCorr;
488 _socketsCorr = new QList<QTcpSocket*>;
489 }
490}
491
492// New Connection
493////////////////////////////////////////////////////////////////////////////
494void t_bncCore::slotNewConnectionEph() {
495 _socketsEph->push_back( _serverEph->nextPendingConnection() );
496}
497
498// New Connection
499////////////////////////////////////////////////////////////////////////////
500void t_bncCore::slotNewConnectionCorr() {
501 _socketsCorr->push_back( _serverCorr->nextPendingConnection() );
502}
503
504//
505////////////////////////////////////////////////////////////////////////////
506void t_bncCore::slotQuit() {
507 delete _caster; _caster = 0;
508 qApp->quit();
509}
510
511//
512////////////////////////////////////////////////////////////////////////////
513void t_bncCore::slotNewOrbCorrections(QList<t_orbCorr> orbCorrections) {
514 QMutexLocker locker(&_mutex);
515 emit newOrbCorrections(orbCorrections);
516 if (_socketsCorr) {
517 ostringstream out;
518 t_orbCorr::writeEpoch(&out, orbCorrections);
519 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
520 while (is.hasNext()) {
521 QTcpSocket* sock = is.next();
522 if (sock->state() == QAbstractSocket::ConnectedState) {
523 if (sock->write(out.str().c_str()) == -1) {
524 delete sock;
525 is.remove();
526 }
527 }
528 else if (sock->state() != QAbstractSocket::ConnectingState) {
529 delete sock;
530 is.remove();
531 }
532 }
533 }
534}
535
536//
537////////////////////////////////////////////////////////////////////////////
538void t_bncCore::slotNewClkCorrections(QList<t_clkCorr> clkCorrections) {
539 QMutexLocker locker(&_mutex);
540 emit newClkCorrections(clkCorrections);
541 if (_socketsCorr) {
542 ostringstream out;
543 t_clkCorr::writeEpoch(&out, clkCorrections);
544 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
545 while (is.hasNext()) {
546 QTcpSocket* sock = is.next();
547 if (sock->state() == QAbstractSocket::ConnectedState) {
548 if (sock->write(out.str().c_str()) == -1) {
549 delete sock;
550 is.remove();
551 }
552 }
553 else if (sock->state() != QAbstractSocket::ConnectingState) {
554 delete sock;
555 is.remove();
556 }
557 }
558 }
559}
560
561//
562////////////////////////////////////////////////////////////////////////////
563void t_bncCore::slotNewCodeBiases(QList<t_satCodeBias> codeBiases) {
564 QMutexLocker locker(&_mutex);
565 emit newCodeBiases(codeBiases);
566 if (_socketsCorr) {
567 ostringstream out;
568 t_satCodeBias::writeEpoch(&out, codeBiases);
569 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
570 while (is.hasNext()) {
571 QTcpSocket* sock = is.next();
572 if (sock->state() == QAbstractSocket::ConnectedState) {
573 if (sock->write(out.str().c_str()) == -1) {
574 delete sock;
575 is.remove();
576 }
577 }
578 else if (sock->state() != QAbstractSocket::ConnectingState) {
579 delete sock;
580 is.remove();
581 }
582 }
583 }
584}
585
586//
587////////////////////////////////////////////////////////////////////////////
588void t_bncCore::slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases) {
589 QMutexLocker locker(&_mutex);
590 emit newPhaseBiases(phaseBiases);
591 if (_socketsCorr) {
592 ostringstream out;
593 t_satPhaseBias::writeEpoch(&out, phaseBiases);
594 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
595 while (is.hasNext()) {
596 QTcpSocket* sock = is.next();
597 if (sock->state() == QAbstractSocket::ConnectedState) {
598 if (sock->write(out.str().c_str()) == -1) {
599 delete sock;
600 is.remove();
601 }
602 }
603 else if (sock->state() != QAbstractSocket::ConnectingState) {
604 delete sock;
605 is.remove();
606 }
607 }
608 }
609}
610
611//
612////////////////////////////////////////////////////////////////////////////
613void t_bncCore::slotNewTec(t_vTec vTec) {
614 QMutexLocker locker(&_mutex);
615 emit newTec(vTec);
616 if (_socketsCorr) {
617 ostringstream out;
618 t_vTec::write(&out, vTec);
619 QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
620 while (is.hasNext()) {
621 QTcpSocket* sock = is.next();
622 if (sock->state() == QAbstractSocket::ConnectedState) {
623 if (sock->write(out.str().c_str()) == -1) {
624 delete sock;
625 is.remove();
626 }
627 }
628 else if (sock->state() != QAbstractSocket::ConnectingState) {
629 delete sock;
630 is.remove();
631 }
632 }
633 }
634}
635
636//
637////////////////////////////////////////////////////////////////////////////
638void t_bncCore::setConfFileName(const QString& confFileName) {
639 if (confFileName.isEmpty()) {
640 _confFileName = QDir::homePath() + QDir::separator()
641 + ".config" + QDir::separator()
642 + qApp->organizationName() + QDir::separator()
643 + qApp->applicationName() + ".bnc";
644 }
645 else {
646 _confFileName = confFileName;
647 }
648}
649
650// Raw Output
651////////////////////////////////////////////////////////////////////////////
652void t_bncCore::writeRawData(const QByteArray& data, const QByteArray& staID,
653 const QByteArray& format) {
654
655 QMutexLocker locker(&_mutex);
656
657 if (!_rawFile) {
658 bncSettings settings;
659 QByteArray fileName = settings.value("rawOutFile").toByteArray();
660 if (!fileName.isEmpty()) {
661 _rawFile = new bncRawFile(fileName, staID, bncRawFile::output);
662 }
663 }
664
665 if (_rawFile) {
666 _rawFile->writeRawData(data, staID, format);
667 }
668}
669
670//
671////////////////////////////////////////////////////////////////////////////
672void t_bncCore::initCombination() {
673#ifdef USE_COMBINATION
674 _bncComb = new bncComb();
675 if (_bncComb->nStreams() < 1) {
676 delete _bncComb;
677 _bncComb = 0;
678 }
679#endif
680}
681
682//
683////////////////////////////////////////////////////////////////////////////
684void t_bncCore::stopCombination() {
685#ifdef USE_COMBINATION
686 delete _bncComb;
687 _bncComb = 0;
688#endif
689}
690
691//
692////////////////////////////////////////////////////////////////////////////
693bool t_bncCore::dateAndTimeGPSSet() const {
694 QMutexLocker locker(&_mutexDateAndTimeGPS);
695 if (_dateAndTimeGPS) {
696 return true;
697 }
698 else {
699 return false;
700 }
701}
702
703//
704////////////////////////////////////////////////////////////////////////////
705QDateTime t_bncCore::dateAndTimeGPS() const {
706 QMutexLocker locker(&_mutexDateAndTimeGPS);
707 if (_dateAndTimeGPS) {
708 return *_dateAndTimeGPS;
709 }
710 else {
711 return QDateTime();
712 }
713}
714
715//
716////////////////////////////////////////////////////////////////////////////
717void t_bncCore::setDateAndTimeGPS(QDateTime dateTime) {
718 QMutexLocker locker(&_mutexDateAndTimeGPS);
719 delete _dateAndTimeGPS;
720 _dateAndTimeGPS = new QDateTime(dateTime);
721}
722
723//
724////////////////////////////////////////////////////////////////////////////
725void t_bncCore::startPPP() {
726 _pppMain->start();
727}
728
729//
730////////////////////////////////////////////////////////////////////////////
731void t_bncCore::stopPPP() {
732 _pppMain->stop();
733 emit stopRinexPPP();
734}
735
Note: See TracBrowser for help on using the repository browser.