Changeset 8616 in ntrip
- Timestamp:
- Feb 28, 2019, 2:45:02 PM (6 years ago)
- Location:
- branches/BNC_2.12
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/ChangeLog.txt
r8502 r8616 2 2 BNC VERSION 2.12.7 (??.??.2018) 3 3 -------------------------------------------------------------------------------- 4 ADDED (28.02.2019): lock time in seconds as an optional feed engine output 4 5 ADDED (27.09.2018): possibility to request a user and password 5 6 detected sourcetable -
branches/BNC_2.12/src/RTCM3/RTCM3Decoder.cpp
r8475 r8616 149 149 } 150 150 GETBITS(i, 7); 151 frqObs->_lockTime = lti2sec(type,i); 152 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid); 151 153 frqObs->_slipCounter = i; 152 154 if (type == 1002 || type == 1004) { … … 193 195 } 194 196 GETBITS(i, 7); 197 frqObs->_lockTime = lti2sec(type,i); 198 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid); 195 199 frqObs->_slipCounter = i; 196 200 if (type == 1004) { … … 714 718 + (rrmod[numsat]) * LIGHTSPEED / 1000.0 / cd.wl; 715 719 frqObs->_phaseValid = true; 720 frqObs->_lockTime = lti2sec(type,ll[count]); 721 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0); 716 722 frqObs->_slipCounter = ll[count]; 717 723 } … … 728 734 + rrmod[numsat] * LIGHTSPEED / 1000.0 / cd.wl; 729 735 frqObs->_phaseValid = true; 736 frqObs->_lockTime = lti2sec(type,ll[count]); 737 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0); 730 738 frqObs->_slipCounter = ll[count]; 731 739 } … … 743 751 / cd.wl; 744 752 frqObs->_phaseValid = true; 753 frqObs->_lockTime = lti2sec(type,ll[count]); 754 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0); 745 755 frqObs->_slipCounter = ll[count]; 746 756 } … … 761 771 / cd.wl; 762 772 frqObs->_phaseValid = true; 773 frqObs->_lockTime = lti2sec(type,ll[count]); 774 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0); 763 775 frqObs->_slipCounter = ll[count]; 764 776 } … … 784 796 / cd.wl; 785 797 frqObs->_phaseValid = true; 798 frqObs->_lockTime = lti2sec(type,ll[count]); 799 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0); 786 800 frqObs->_slipCounter = ll[count]; 787 801 } … … 802 816 / cd.wl; 803 817 frqObs->_phaseValid = true; 818 frqObs->_lockTime = lti2sec(type,ll[count]); 819 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0); 804 820 frqObs->_slipCounter = ll[count]; 805 821 } … … 890 906 } 891 907 GETBITS(i, 7); 908 frqObs->_lockTime = lti2sec(type,i); 909 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid); 892 910 frqObs->_slipCounter = i; 893 911 if (type == 1010 || type == 1012) { … … 934 952 } 935 953 GETBITS(i, 7); 954 frqObs->_lockTime = lti2sec(type,i); 955 frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid); 936 956 frqObs->_slipCounter = i; 937 957 if (type == 1012) { -
branches/BNC_2.12/src/bnccaster.cpp
r8398 r8616 95 95 _uSockets = 0; 96 96 } 97 97 98 _printLockTime = settings.value("printLockTime",false).toBool(); 98 99 _samplingRateMult10 = int(settings.value("outSampl").toString().split("sec").first().toDouble() * 10.0); 99 100 _outWait = settings.value("outWait").toDouble(); … … 172 173 << setw(4) << obs._time.gpsw() << " " 173 174 << setw(14) << setprecision(7) << obs._time.gpssec() << " " 174 << bncRinex::asciiSatLine(obs ) << endl;175 << bncRinex::asciiSatLine(obs,_printLockTime) << endl; 175 176 176 177 string hlpStr = oStr.str(); … … 317 318 << setprecision(7) << obs._time.gpssec() << endl; 318 319 } 319 oStr << obs._staID << ' ' << bncRinex::asciiSatLine(obs) << endl; 320 oStr << obs._staID << ' ' 321 << bncRinex::asciiSatLine(obs,_printLockTime) << endl; 320 322 if (!it.hasNext()) { 321 323 oStr << endl; -
branches/BNC_2.12/src/bnccaster.h
r8398 r8616 75 75 QList<QByteArray> _staIDs; 76 76 QList<bncGetThread*> _threads; 77 bool _printLockTime; 77 78 int _samplingRateMult10; 78 79 double _outWait; -
branches/BNC_2.12/src/bnchelp.html
r8484 r8616 2612 2612 </p> 2613 2613 2614 <p>A valid 'Lock Time Indicator' 2615 An optional valid 'Lock Time' is only presented for observations from RTCM Version 3 streams. The parameter provides a measure of the amount of time that has elapsed during which the receiver has maintained continuous lock on that satellite signal. If a cycle slip occurs during the previous measurement cycle, the lock time will be reset to Zero. The 'Lock Time' could be of interest becuase the Lock Time Inficator is different for different RTCM3 measurement types. Hence, the 'Lock Time' in seconds is computed with the respective calculation rule. 2616 </p> 2617 2614 2618 <p> 2615 2619 The following table describes the format of BNC's synchronized output of GNSS observations which consists of 'Epoch Records' and 'Observation Records'. Each Epoch Record is followed by one or more Observation Records. The Observation Record is repeated for each satellite having been observed in the current epoch. The length of an Observation Record is given by the number of observation types for this satellite. … … 2655 2659 <tr><td>Observation Code</td><td><b>S</b>2W</td><td>1X,A3</td></tr> 2656 2660 <tr><td>Observed Signal Strength </td><td>34.750</td><td>1X,F8.3</td></tr> 2661 2662 <tr><td><u>Lock Time (optional)</u></td><td></td><td></td></tr> 2663 <tr><td>Observation Code</td><td><b>T</b>2W</td><td>1X,A3</td></tr> 2664 <tr><td>Computed Lock Time </td><td>937.000</td><td>1X,F8.3</td></tr> 2657 2665 2658 2666 </table> -
branches/BNC_2.12/src/bncrinex.cpp
r8501 r8616 601 601 // One Line in ASCII (Internal) Format 602 602 //////////////////////////////////////////////////////////////////////////// 603 string bncRinex::asciiSatLine(const t_satObs& obs ) {603 string bncRinex::asciiSatLine(const t_satObs& obs, bool printLockTime) { 604 604 605 605 ostringstream str; … … 631 631 << right << setw(8) << setprecision(3) << frqObs->_snr; 632 632 } 633 if (frqObs->_lockTimeValid && printLockTime) { 634 str << ' ' 635 << left << setw(3) << "T" + frqObs->_rnxType2ch << ' ' 636 << right << setw(9) << setprecision(3) << frqObs->_lockTime; 637 } 633 638 } 634 639 -
branches/BNC_2.12/src/bncrinex.h
r8398 r8616 49 49 bool rnxV3, 50 50 QDateTime* nextEpoch = 0); 51 static std::string asciiSatLine(const t_satObs& obs );51 static std::string asciiSatLine(const t_satObs& obs, bool printLockTime); 52 52 53 53 private: -
branches/BNC_2.12/src/bncsettings.cpp
r8398 r8616 104 104 setValue_p("reqcOutNavFile", ""); 105 105 setValue_p("reqcOutLogFile", ""); 106 setValue_p("reqcSkyPlotSignals", "C:2&7 E:1&5 G:1&2 J:1&2 R:1&2S:1&5 I:5&9");106 setValue_p("reqcSkyPlotSignals", "C:2&7 E:1&5 G:1&2&5 J:1&2 R:1&2&3 S:1&5 I:5&9"); 107 107 setValue_p("reqcPlotDir", ""); 108 108 setValue_p("reqcRnxVersion", ""); … … 146 146 setValue_p("outFile", ""); 147 147 setValue_p("outUPort", ""); 148 setValue_p("printLockTime", "0"); 148 149 // Serial Output 149 150 setValue_p("serialMountPoint", ""); -
branches/BNC_2.12/src/bncutils.cpp
r8418 r8616 949 949 } 950 950 951 // Convert RTCM3 lock-time indicator to lock time in seconds 952 //////////////////////////////////////////////////////////////////////////// 953 double lti2sec(int type, int lti) { 954 955 if ( (type>=1001 && type<=1004) || 956 (type>=1009 && type<=1012) ) { // RTCM3 msg 100[1...4] and 10[09...12] 957 if (lti< 0) return -1; 958 else if (lti< 24) return 1*lti; // [ 0 1 23] 959 else if (lti< 48) return 2*lti-24; // [ 24 2 70] 960 else if (lti< 72) return 4*lti-120; // [ 72 4 164] 961 else if (lti< 96) return 8*lti-408; // [168 8 352] 962 else if (lti< 120) return 16*lti-1176; // [360 16 728] 963 else if (lti< 127) return 32*lti-3096; // [744 32 905] 964 else if (lti==127) return 937; 965 else return -1; 966 } 967 else if (type%10==2 || type%10==3 || 968 type%10==4 || type%10==5) { // RTCM3 MSM-2/-3/-4/-5 969 switch(lti) { 970 case( 0) : return 0; 971 case( 1) : return 32e-3; 972 case( 2) : return 64e-3; 973 case( 3) : return 128e-3; 974 case( 4) : return 256e-3; 975 case( 5) : return 512e-3; 976 case( 6) : return 1024e-3; 977 case( 7) : return 2048e-3; 978 case( 8) : return 4096e-3; 979 case( 9) : return 8192e-3; 980 case(10) : return 16384e-3; 981 case(11) : return 32768e-3; 982 case(12) : return 65536e-3; 983 case(13) : return 131072e-3; 984 case(14) : return 262144e-3; 985 case(15) : return 524288e-3; 986 default : return -1; 987 }; 988 } 989 else if (type%10==6 || type%10==7) { // RTCM3 MSM-6 and MSM-7 990 if (lti< 0) return ( -1 ); 991 else if (lti< 64) return ( 1*lti )*1e-3; 992 else if (lti< 96) return ( 2*lti-64 )*1e-3; 993 else if (lti< 128) return ( 4*lti-256 )*1e-3; 994 else if (lti< 160) return ( 8*lti-768 )*1e-3; 995 else if (lti< 192) return ( 16*lti-2048 )*1e-3; 996 else if (lti< 224) return ( 32*lti-5120 )*1e-3; 997 else if (lti< 256) return ( 64*lti-12288 )*1e-3; 998 else if (lti< 288) return ( 128*lti-28672 )*1e-3; 999 else if (lti< 320) return ( 256*lti-65536 )*1e-3; 1000 else if (lti< 352) return ( 512*lti-147456 )*1e-3; 1001 else if (lti< 384) return ( 1024*lti-327680 )*1e-3; 1002 else if (lti< 416) return ( 2048*lti-720896 )*1e-3; 1003 else if (lti< 448) return ( 4096*lti-1572864 )*1e-3; 1004 else if (lti< 480) return ( 8192*lti-3407872 )*1e-3; 1005 else if (lti< 512) return ( 16384*lti-7340032 )*1e-3; 1006 else if (lti< 544) return ( 32768*lti-15728640 )*1e-3; 1007 else if (lti< 576) return ( 65536*lti-33554432 )*1e-3; 1008 else if (lti< 608) return ( 131072*lti-71303168 )*1e-3; 1009 else if (lti< 640) return ( 262144*lti-150994944 )*1e-3; 1010 else if (lti< 672) return ( 524288*lti-318767104 )*1e-3; 1011 else if (lti< 704) return (1048576*lti-671088640 )*1e-3; 1012 else if (lti==704) return (2097152*lti-1409286144)*1e-3; 1013 else return ( -1 ); 1014 } 1015 else { 1016 return -1; 1017 }; 1018 }; -
branches/BNC_2.12/src/bncutils.h
r8012 r8616 50 50 * and must be handled separately. 51 51 * @param week GPS week number (must be prefilled, contains fixed value afterwards) 52 * @param secOfWeek seconds in GPS week (must be prefilled, contains fixed value afterwards) 52 * @param secOfWeek seconds in GPS week (must be prefilled, contains fixed value afterwards) 53 53 * @param mSecOfWeek milli seconds in GLONASS time 54 54 * @param fixnumleap when <code>true</code> then result is UTC time, otherwise it is GPS … … 86 86 void jacobiEll_XYZ(const double* Ell, Matrix& jacobi); 87 87 88 void covariXYZ_NEU(const SymmetricMatrix& Qxyz, const double* Ell, 88 void covariXYZ_NEU(const SymmetricMatrix& Qxyz, const double* Ell, 89 89 SymmetricMatrix& Qneu); 90 90 91 void covariNEU_XYZ(const SymmetricMatrix& Qneu, const double* Ell, 91 void covariNEU_XYZ(const SymmetricMatrix& Qneu, const double* Ell, 92 92 SymmetricMatrix& Qxyz); 93 93 … … 98 98 double nint(double val); 99 99 100 ColumnVector rungeKutta4(double xi, const ColumnVector& yi, double dx, double* acc, 100 ColumnVector rungeKutta4(double xi, const ColumnVector& yi, double dx, double* acc, 101 101 ColumnVector (*der)(double x, const ColumnVector& y, double* acc)); 102 102 103 103 void GPSweekFromDateAndTime(const QDateTime& dateTime, int& GPSWeek, double& GPSWeeks); 104 104 105 void GPSweekFromYMDhms(int year, int month, int day, int hour, int min, double sec, 105 void GPSweekFromYMDhms(int year, int month, int day, int hour, int min, double sec, 106 106 int& GPSWeek, double& GPSWeeks); 107 107 … … 114 114 int readDbl(const QString& str, int pos, int len, double& value); 115 115 116 void topos(double xRec, double yRec, double zRec, double xSat, double ySat, double zSat, 116 void topos(double xRec, double yRec, double zRec, double xSat, double ySat, double zSat, 117 117 double& rho, double& eleSat, double& azSat); 118 118 … … 121 121 QString fortranFormat(double value, int width, int prec); 122 122 123 void kalman(const Matrix& AA, const ColumnVector& ll, const DiagonalMatrix& PP, 123 void kalman(const Matrix& AA, const ColumnVector& ll, const DiagonalMatrix& PP, 124 124 SymmetricMatrix& QQ, ColumnVector& xx); 125 125 … … 141 141 142 142 int factorial(int n); 143 144 /** Convert RTCM3 lock-time indicator to lock time in seconds 145 * depending on input message format. Returns -1 if format is 146 * unknown or indicator is invalid 147 */ 148 double lti2sec(int type, int lti); 143 149 144 150 -
branches/BNC_2.12/src/bncwindow.cpp
r8492 r8616 286 286 _outFileLineEdit = new QLineEdit(settings.value("outFile").toString()); 287 287 _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString()); 288 _printLockTimeCheckBox = new QCheckBox(); 289 _printLockTimeCheckBox->setCheckState(Qt::CheckState(settings.value("printLockTime").toInt())); 288 290 289 291 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)), … … 291 293 292 294 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)), 295 this, SLOT(slotBncTextChanged())); 296 297 connect(_printLockTimeCheckBox, SIGNAL(stateChanged(int)), 293 298 this, SLOT(slotBncTextChanged())); 294 299 … … 758 763 sLayout->addWidget(new QLabel("Port (unsynchronized)"), 4, 0); 759 764 sLayout->addWidget(_outUPortLineEdit, 4, 1); 760 sLayout->addWidget(new QLabel(""), 5, 1); 761 sLayout->setRowStretch(6, 999); 765 sLayout->addWidget(new QLabel("Print lock time"), 5, 0); 766 sLayout->addWidget(_printLockTimeCheckBox, 5, 1); 767 sLayout->addWidget(new QLabel(""), 6, 1); 768 sLayout->setRowStretch(7, 999); 762 769 763 770 sgroup->setLayout(sLayout); … … 1283 1290 _outFileLineEdit->setWhatsThis(tr("<p>Specify the full path to a file where synchronized observations are saved in plain ASCII format.</p><p>Beware that the size of this file can rapidly increase depending on the number of incoming streams.</p>")); 1284 1291 _outUPortLineEdit->setWhatsThis(tr("<p>BNC can produce unsynchronized observations in a plain ASCII format on your local host via IP port.</p><p>Specify a port number to activate this function.</p>")); 1292 _printLockTimeCheckBox->setWhatsThis(tr("<p>Print the lock time in seconds in the feed engine output.</p>")); 1285 1293 1286 1294 // WhatsThis, Serial Output … … 1458 1466 delete _outFileLineEdit; 1459 1467 delete _outUPortLineEdit; 1468 delete _printLockTimeCheckBox; 1460 1469 delete _serialMountPointLineEdit; 1461 1470 delete _serialPortNameLineEdit; … … 1875 1884 settings.setValue("outFile", _outFileLineEdit->text()); 1876 1885 settings.setValue("outUPort", _outUPortLineEdit->text()); 1886 settings.setValue("printLockTime",_printLockTimeCheckBox->checkState()); 1877 1887 // Serial Output 1878 1888 settings.setValue("serialMountPoint",_serialMountPointLineEdit->text()); -
branches/BNC_2.12/src/bncwindow.h
r8398 r8616 132 132 QLineEdit* _outPortLineEdit; 133 133 QLineEdit* _outUPortLineEdit; 134 QCheckBox* _printLockTimeCheckBox; 134 135 QLineEdit* _ephOutPortLineEdit; 135 136 QLineEdit* _corrPortLineEdit; -
branches/BNC_2.12/src/satObs.h
r8484 r8616 23 23 _snr = 0.0; 24 24 _snrValid = false; 25 _lockTime = 0.0; 26 _lockTimeValid = false; 25 27 _slip = false; 26 28 _slipCounter = 0; … … 36 38 double _snr; 37 39 bool _snrValid; 40 double _lockTime; 41 bool _lockTimeValid; 38 42 bool _slip; 39 43 int _slipCounter;
Note:
See TracChangeset
for help on using the changeset viewer.