Index: /branches/BNC_2.12/src/PPP_SSR_I/pppClient.cpp
===================================================================
--- /branches/BNC_2.12/src/PPP_SSR_I/pppClient.cpp (revision 8483)
+++ /branches/BNC_2.12/src/PPP_SSR_I/pppClient.cpp (revision 8484)
@@ -408,5 +408,5 @@
bncTime ToT = satData->tt - prange / t_CST::c - clkSat;
- ColumnVector xc(4);
+ ColumnVector xc(7);
ColumnVector vv(3);
if (getSatPos(ToT, satData->prn, xc, vv) != success) {
Index: /branches/BNC_2.12/src/RTCM/rtcm_utils.cpp
===================================================================
--- /branches/BNC_2.12/src/RTCM/rtcm_utils.cpp (revision 8483)
+++ /branches/BNC_2.12/src/RTCM/rtcm_utils.cpp (revision 8484)
@@ -10,12 +10,12 @@
void resolveEpoch (double secsHour,
- int refWeek, double refSecs,
+ int refWeek, double refSecs,
int& epochWeek, double& epochSecs) {
- const double secsPerWeek = 604800.0;
+ const double secsPerWeek = 604800.0;
epochWeek = refWeek;
epochSecs = secsHour + 3600.0*(floor((refSecs-secsHour)/3600.0+0.5));
-
+
if (epochSecs<0 ) { epochWeek--; epochSecs+=secsPerWeek; };
if (epochSecs>secsPerWeek) { epochWeek++; epochSecs-=secsPerWeek; };
@@ -29,11 +29,11 @@
double& xSat, double& ySat, double& zSat, double& clkSat) {
- const double omega_earth = 7292115.1467e-11;
- const double secsPerWeek = 604800.0;
+ const double omega_earth = 7292115.1467e-11;
+ const double secsPerWeek = 604800.0;
// Initial values
// --------------
rho = 0.0;
- ColumnVector xc(4);
+ ColumnVector xc(7);
ColumnVector vv(3);
eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false);
@@ -45,5 +45,5 @@
////cout << "----- cmpRho -----\n";
////eph->print(cout);
- ////cout << " pos " << setw(4) << GPSWeek
+ ////cout << " pos " << setw(4) << GPSWeek
//// << " " << setw(14) << setprecision(6) << GPSWeeks
//// << " " << setw(13) << setprecision(3) << xSat
@@ -57,10 +57,10 @@
do {
rhoLast = rho;
-
+
// Correction station position due to Earth Rotation
// -------------------------------------------------
double dPhi = omega_earth * rho / c_light;
- double xRec = stax * cos(dPhi) - stay * sin(dPhi);
- double yRec = stay * cos(dPhi) + stax * sin(dPhi);
+ double xRec = stax * cos(dPhi) - stay * sin(dPhi);
+ double yRec = stay * cos(dPhi) + stax * sin(dPhi);
double zRec = staz;
@@ -81,5 +81,5 @@
GPSWeek_tot += 1;
}
-
+
eph->getCrd(bncTime(GPSWeek_tot, GPSWeeks_tot), xc, vv, false);
xSat = xc(1);
@@ -94,5 +94,5 @@
rho = sqrt(dx*dx + dy*dy + dz*dz);
- ////cout << " scrd " << setw(4) << GPSWeek_tot
+ ////cout << " scrd " << setw(4) << GPSWeek_tot
//// << " " << setw(15) << setprecision(8) << GPSWeeks_tot
//// << " " << setw(13) << setprecision(3) << xSat
@@ -108,9 +108,9 @@
//// << " rho " << setw(13) << setprecision(3) << rho
//// << endl;
-
+
////cout.setf(ios::fixed);
////
- ////cout << "niter " << setw(3) << ++niter
+ ////cout << "niter " << setw(3) << ++niter
//// << " " << setw(14) << setprecision(3) << rhoLast
//// << " " << setw(14) << setprecision(3) << rho
Index: /branches/BNC_2.12/src/bncclockrinex.cpp
===================================================================
--- /branches/BNC_2.12/src/bncclockrinex.cpp (revision 8483)
+++ /branches/BNC_2.12/src/bncclockrinex.cpp (revision 8484)
@@ -41,5 +41,6 @@
////////////////////////////////////////////////////////////////////////////
t_irc bncClockRinex::write(int GPSweek, double GPSweeks, const QString& prn,
- double sp3Clk) {
+ double clkRnx, double clkRnxRate, double clkRnxAcc,
+ double clkRnxSig, double clkRnxRateSig, double clkRnxAccSig) {
if (reopen(GPSweek, GPSweeks) == success) {
@@ -48,9 +49,30 @@
double sec = fmod(GPSweeks, 60.0);
- _out << "AS " << prn.toAscii().data()
- << datTim.toString(" yyyy MM dd hh mm").toAscii().data()
+ int numValues = 1;
+ if (clkRnxSig && clkRnxRate && clkRnxRateSig) {
+ numValues += 3;
+ }
+ if (clkRnxAcc && clkRnxAccSig) {
+ numValues += 2;
+ }
+
+ _out << "AS " << prn.toLatin1().data()
+ << datTim.toString(" yyyy MM dd hh mm").toLatin1().data()
<< fixed << setw(10) << setprecision(6) << sec
- << " 1 " << fortranFormat(sp3Clk, 19, 12).toAscii().data() << endl;
+ << " " << numValues << " "
+ << fortranFormat(clkRnx, 19, 12).toLatin1().data();
+ if (numValues >=2) {
+ _out << " " << fortranFormat(clkRnxSig, 19, 12).toLatin1().data() << endl;
+ }
+ if (numValues == 4) {
+ _out << fortranFormat(clkRnxRate, 19, 12).toLatin1().data() << " ";
+ _out << fortranFormat(clkRnxRateSig, 19, 12).toLatin1().data() << " ";
+ }
+ if (numValues == 6) {
+ _out << fortranFormat(clkRnxAcc, 19, 12).toLatin1().data() << " ";
+ _out << " " << fortranFormat(clkRnxAccSig, 19, 12).toLatin1().data();
+ }
+ _out << endl;
return success;
}
Index: /branches/BNC_2.12/src/bncclockrinex.h
===================================================================
--- /branches/BNC_2.12/src/bncclockrinex.h (revision 8483)
+++ /branches/BNC_2.12/src/bncclockrinex.h (revision 8484)
@@ -12,6 +12,7 @@
bncClockRinex(const QString& sklFileName, const QString& intr, int sampl);
virtual ~bncClockRinex();
- virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn,
- double sp3Clk);
+ virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn,
+ double clkRnx, double clkRnxRate, double clkRnxAcc,
+ double clkRnxSig, double clkRnxRateSig, double clkRnxAccSig);
private:
Index: /branches/BNC_2.12/src/bncephuser.cpp
===================================================================
--- /branches/BNC_2.12/src/bncephuser.cpp (revision 8483)
+++ /branches/BNC_2.12/src/bncephuser.cpp (revision 8484)
@@ -188,5 +188,5 @@
// Simple Check - check satellite radial distance
// ----------------------------------------------
- ColumnVector xc(4);
+ ColumnVector xc(7);
ColumnVector vv(3);
if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
@@ -241,5 +241,5 @@
}
}
-
+
// Check consistency with older ephemerides
// ----------------------------------------
Index: /branches/BNC_2.12/src/bnchelp.html
===================================================================
--- /branches/BNC_2.12/src/bnchelp.html (revision 8483)
+++ /branches/BNC_2.12/src/bnchelp.html (revision 8484)
@@ -3903,13 +3903,15 @@
The following satellite specific keys and values are currently specified for that in BNC:
Key | Values |
APC | Satellite Antenna Phase Center coordinates in meters |
Clk | Satellite clock correction in meters, relativistic correction applied like in broadcast clocks |
Vel | Satellite velocity in meters per second |
CoM | Satellite Center of Mass coordinates in meters |
CodeBias | Satellite Code Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3 and preceded by total number of biases |
YawAngle | Satellite Yaw Angle in radian, restricted to be in [0, 2π] which shall be used for the computation of phase wind-up correction |
YawRate | Satellite Yaw Rate in radian per second which is the rate of Yaw Angle |
PhaseBias | Satellite Phase Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3, preceded by total number of biases and followed by Signal Integer Indicator, Signals Wilde-Lane Integer Indicator as well as Signal Discontinuity Counter |
Key | Values |
APC | Satellite Antenna Phase Center coordinate components in meters |
Clk | Satellite clock correction components in meters, meters per seconds and meters per sec² (relativistic correction applied like in broadcast clocks) |
ClkSig | Standard deviation for satellite clock correction components in meters, meters per seconds and meters per sec² (required for Clock RINEX file only) /td> |
Vel | Satellite velocity components in meters per second |
CoM | Satellite Center of Mass coordinate components in meters |
Ura | User range accuracy value in meters |
CodeBias | Satellite Code Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3 and preceded by total number of biases |
PhaseBias | Satellite Phase Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3, preceded by total number of biases and followed by Signal Integer Indicator, Signals Wilde-Lane Integer Indicator as well as Signal Discontinuity Counter |
YawAngle | Satellite Yaw Angle in radian, restricted to be in [0, 2π], which shall be used for the computation of phase wind-up correction |
YawRate | Satellite Yaw Rate in radian per second which is the rate of Yaw Angle |
Index: /branches/BNC_2.12/src/bncsp3.cpp
===================================================================
--- /branches/BNC_2.12/src/bncsp3.cpp (revision 8483)
+++ /branches/BNC_2.12/src/bncsp3.cpp (revision 8484)
@@ -64,5 +64,6 @@
////////////////////////////////////////////////////////////////////////////
t_irc bncSP3::write(int GPSweek, double GPSweeks, const QString& prn,
- const ColumnVector& xCoM, double sp3Clk) {
+ const ColumnVector& xCoM, double sp3Clk,
+ const ColumnVector& v, double sp3ClkRate) {
if (reopen(GPSweek, GPSweeks) == success) {
@@ -87,10 +88,19 @@
}
- _out << "P" << prn.toAscii().data()
- << setw(14) << setprecision(6) << xCoM(1) / 1000.0
- << setw(14) << setprecision(6) << xCoM(2) / 1000.0
- << setw(14) << setprecision(6) << xCoM(3) / 1000.0
- << setw(14) << setprecision(6) << sp3Clk * 1e6 << endl;
-
+ _out << "P" << prn.toLatin1().data()
+ << setw(14) << setprecision(6) << xCoM(1) / 1000.0 // [km]
+ << setw(14) << setprecision(6) << xCoM(2) / 1000.0 // [km]
+ << setw(14) << setprecision(6) << xCoM(3) / 1000.0 // [km]
+ << setw(14) << setprecision(6) << sp3Clk * 1e6 // microseconds
+ << endl;
+
+ if (sp3ClkRate) {
+ _out << "V" << prn.toLatin1().data()
+ << setw(14) << setprecision(6) << v(1) * 10.0 // [dm/s]
+ << setw(14) << setprecision(6) << v(2) * 10.0 // [dm/s]
+ << setw(14) << setprecision(6) << v(3) * 10.0 // [dm/s]
+ << setw(14) << setprecision(6) << sp3ClkRate * 1e2 // 10^⁻4 microseconds/sec
+ << endl;
+ }
return success;
}
Index: /branches/BNC_2.12/src/bncsp3.h
===================================================================
--- /branches/BNC_2.12/src/bncsp3.h (revision 8483)
+++ /branches/BNC_2.12/src/bncsp3.h (revision 8484)
@@ -44,5 +44,6 @@
virtual ~bncSP3();
t_irc write(int GPSweek, double GPSweeks, const QString& prn,
- const ColumnVector& xCoM, double sp3Clk);
+ const ColumnVector& xCoM, double sp3Clk,
+ const ColumnVector& v, double sp3ClkRate);
const t_sp3Epoch* nextEpoch();
const t_sp3Epoch* currEpoch() const {return _currEpoch;}
Index: /branches/BNC_2.12/src/combination/bnccomb.cpp
===================================================================
--- /branches/BNC_2.12/src/combination/bnccomb.cpp (revision 8483)
+++ /branches/BNC_2.12/src/combination/bnccomb.cpp (revision 8484)
@@ -356,5 +356,5 @@
continue;
}
-
+
// Check Modulo Time
// -----------------
@@ -449,9 +449,9 @@
}
- ColumnVector oldXC(4);
+ ColumnVector oldXC(7);
ColumnVector oldVV(3);
corr->_eph->getCrd(corr->_time, oldXC, oldVV, false);
- ColumnVector newXC(4);
+ ColumnVector newXC(7);
ColumnVector newVV(3);
lastEph->getCrd(corr->_time, newXC, newVV, false);
@@ -688,5 +688,5 @@
const t_eph* eph = corr->_eph;
if (eph) {
- ColumnVector xc(4);
+ ColumnVector xc(7);
ColumnVector vv(3);
eph->getCrd(_resTime, xc, vv, false);
@@ -740,5 +740,5 @@
clkCorrections.push_back(clkCorr);
- ColumnVector xc(4);
+ ColumnVector xc(7);
ColumnVector vv(3);
corr->_eph->setClkCorr(dynamic_cast