1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-05-05 17:04:11 +00:00

Store work

This commit is contained in:
Carles Fernandez 2017-04-21 16:14:46 +02:00
parent 9c6ff1df9b
commit 417dc1daf1
5 changed files with 45 additions and 45 deletions

View File

@ -17,7 +17,7 @@ SignalSource.implementation=File_Signal_Source
;#filename: path to file with the captured GNSS signal samples to be processed ;#filename: path to file with the captured GNSS signal samples to be processed
;#SignalSource.filename=/home/javier/Descargas/rtlsdr_tcxo_l1/rtlsdr_tcxo_l1.bin ; <- PUT YOUR FILE HERE ;#SignalSource.filename=/home/javier/Descargas/rtlsdr_tcxo_l1/rtlsdr_tcxo_l1.bin ; <- PUT YOUR FILE HERE
SignalSource.filename=/home/javier/git/gnss-sdr/build/signal_out.bin ; <- PUT YOUR FILE HERE SignalSource.filename=/Users/carlesfernandez/git/cttc/build/signal_out.bin ; <- PUT YOUR FILE HERE
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. ;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
SignalSource.item_type=byte SignalSource.item_type=byte

View File

@ -90,18 +90,18 @@ double var_uraeph(int ura)
2.4, 3.4, 4.85, 6.85, 9.65, 13.65, 24.0, 48.0, 96.0, 192.0, 384.0, 768.0, 1536.0, 2.4, 3.4, 4.85, 6.85, 9.65, 13.65, 24.0, 48.0, 96.0, 192.0, 384.0, 768.0, 1536.0,
3072.0, 6144.0 3072.0, 6144.0
}; };
return ura < 0 || 15 < ura ? std::pow(2, 6144.0) : std::pow(2, ura_value[ura]); return ura < 0 || 15 < ura ? std::pow(2.0, 6144.0) : std::pow(2.0, ura_value[ura]);
} }
/* variance by ura ssr (ref [4]) ---------------------------------------------*/ /* variance by ura ssr (ref [4]) ---------------------------------------------*/
double var_urassr(int ura) double var_urassr(int ura)
{ {
double std; double std_;
if (ura <= 0) return std::pow(2, DEFURASSR); if (ura <= 0) return std::pow(2.0, DEFURASSR);
if (ura >= 63) return std::pow(2, 5.4665); if (ura >= 63) return std::pow(2.0, 5.4665);
std = (pow(3.0, (ura >> 3) & 7) * (1.0 + (ura & 7) / 4.0) - 1.0) * 1e-3; std_ = (std::pow(3.0, (ura >> 3) & 7) * (1.0 + (ura & 7) / 4.0) - 1.0) * 1e-3;
return std::pow(2, std); return std::pow(2.0, std_);
} }
@ -275,7 +275,7 @@ void eph2pos(gtime_t time, const eph_t *eph, double *rs, double *dts,
*dts = eph->f0 + eph->f1 * tk + eph->f2 * tk * tk; *dts = eph->f0 + eph->f1 * tk + eph->f2 * tk * tk;
/* relativity correction */ /* relativity correction */
*dts -= 2.0 * sqrt(mu * eph->A) * eph-> e* sinE / std::pow(2, SPEED_OF_LIGHT); *dts -= 2.0 * sqrt(mu * eph->A) * eph-> e* sinE / std::pow(2.0, SPEED_OF_LIGHT);
/* position and clock error variance */ /* position and clock error variance */
*var = var_uraeph(eph->sva); *var = var_uraeph(eph->sva);
@ -285,7 +285,7 @@ void eph2pos(gtime_t time, const eph_t *eph, double *rs, double *dts,
/* glonass orbit differential equations --------------------------------------*/ /* glonass orbit differential equations --------------------------------------*/
void deq(const double *x, double *xdot, const double *acc) void deq(const double *x, double *xdot, const double *acc)
{ {
double a, b, c, r2 = dot(x, x, 3), r3 = r2 * sqrt(r2), omg2 = std::pow(2, OMGE_GLO); double a, b, c, r2 = dot(x, x, 3), r3 = r2 * sqrt(r2), omg2 = std::pow(2.0, OMGE_GLO);
if (r2 <= 0.0) if (r2 <= 0.0)
{ {
@ -293,7 +293,7 @@ void deq(const double *x, double *xdot, const double *acc)
return; return;
} }
/* ref [2] A.3.1.2 with bug fix for xdot[4],xdot[5] */ /* ref [2] A.3.1.2 with bug fix for xdot[4],xdot[5] */
a = 1.5 * J2_GLO * MU_GLO * std::pow(2, RE_GLO) / r2 / r3; /* 3/2*J2*mu*Ae^2/r^5 */ a = 1.5 * J2_GLO * MU_GLO * std::pow(2.0, RE_GLO) / r2 / r3; /* 3/2*J2*mu*Ae^2/r^5 */
b = 5.0 * x[2] * x[2] / r2; /* 5*z^2/r^2 */ b = 5.0 * x[2] * x[2] / r2; /* 5*z^2/r^2 */
c = -MU_GLO / r3 - a * (1.0 - b); /* -mu/r^3-a(1-b) */ c = -MU_GLO / r3 - a * (1.0 - b); /* -mu/r^3-a(1-b) */
xdot[0] = x[3]; xdot[0] = x[3];
@ -369,14 +369,14 @@ void geph2pos(gtime_t time, const geph_t *geph, double *rs, double *dts,
x[i ] = geph->pos[i]; x[i ] = geph->pos[i];
x[i+3] = geph->vel[i]; x[i+3] = geph->vel[i];
} }
for (tt = t<0.0?-TSTEP:TSTEP;fabs(t)>1E-9;t-=tt) for (tt = t < 0.0 ? - TSTEP : TSTEP; fabs(t) > 1e-9; t -= tt)
{ {
if (fabs(t) < TSTEP) tt = t; if (fabs(t) < TSTEP) tt = t;
glorbit(tt, x, geph->acc); glorbit(tt, x, geph->acc);
} }
for (i = 0; i < 3; i++) rs[i] = x[i]; for (i = 0; i < 3; i++) rs[i] = x[i];
*var = std::pow(2, ERREPH_GLO); *var = std::pow(2.0, ERREPH_GLO);
} }
@ -858,7 +858,7 @@ void satposs(gtime_t teph, const obsd_t *obs, int n, const nav_t *nav,
{ {
if (!ephclk(time[i], teph, obs[i].sat, nav, dts + i * 2)) continue; if (!ephclk(time[i], teph, obs[i].sat, nav, dts + i * 2)) continue;
dts[1 + i * 2] = 0.0; dts[1 + i * 2] = 0.0;
*var = std::pow(2, STD_BRDCCLK); *var = std::pow(2.0, STD_BRDCCLK);
} }
} }
for (i = 0; i < n && i < MAXOBS; i++) for (i = 0; i < n && i < MAXOBS; i++)

View File

@ -58,9 +58,9 @@ double varerr(const prcopt_t *opt, double el, int sys)
{ {
double fact, varr; double fact, varr;
fact = sys == SYS_GLO ? EFACT_GLO : (sys == SYS_SBS ? EFACT_SBS : EFACT_GPS); fact = sys == SYS_GLO ? EFACT_GLO : (sys == SYS_SBS ? EFACT_SBS : EFACT_GPS);
varr = std::pow(2, opt->err[0]) * (std::pow(2, opt->err[1]) + std::pow(2, opt->err[2]) / sin(el)); varr = std::pow(2.0, opt->err[0]) * (std::pow(2.0, opt->err[1]) + std::pow(2.0, opt->err[2]) / sin(el));
if (opt->ionoopt == IONOOPT_IFLC) varr *= std::pow(2, 3.0); /* iono-free */ if (opt->ionoopt == IONOOPT_IFLC) varr *= std::pow(2.0, 3.0); /* iono-free */
return std::pow(2, fact) * varr; return std::pow(2.0, fact) * varr;
} }
@ -122,7 +122,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
} }
} }
} }
gamma = std::pow(2, lam[j]) / std::pow(2, lam[i]); /* f1^2/f2^2 */ gamma = std::pow(2.0, lam[j]) / std::pow(2.0, lam[i]); /* f1^2/f2^2 */
P1 = obs->P[i]; P1 = obs->P[i];
P2 = obs->P[j]; P2 = obs->P[j];
P1_P2 = nav->cbias[obs->sat-1][0]; P1_P2 = nav->cbias[obs->sat-1][0];
@ -153,7 +153,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
} }
if (opt->sateph == EPHOPT_SBAS) PC -= P1_C1; /* sbas clock based C1 */ if (opt->sateph == EPHOPT_SBAS) PC -= P1_C1; /* sbas clock based C1 */
*var = std::pow(2, ERR_CBIAS); *var = std::pow(2.0, ERR_CBIAS);
return PC; return PC;
} }
@ -182,7 +182,7 @@ int ionocorr(gtime_t time, const nav_t *nav, int sat, const double *pos,
if (ionoopt == IONOOPT_BRDC) if (ionoopt == IONOOPT_BRDC)
{ {
*ion = ionmodel(time, nav->ion_gps, pos, azel); *ion = ionmodel(time, nav->ion_gps, pos, azel);
*var = SQR(*ion*ERR_BRDCI); *var = std::pow(2.0, *ion*ERR_BRDCI);
return 1; return 1;
} }
/* sbas ionosphere model */ /* sbas ionosphere model */
@ -199,7 +199,7 @@ int ionocorr(gtime_t time, const nav_t *nav, int sat, const double *pos,
if (ionoopt == IONOOPT_QZS && norm(nav->ion_qzs, 8) > 0.0) if (ionoopt == IONOOPT_QZS && norm(nav->ion_qzs, 8) > 0.0)
{ {
*ion = ionmodel(time, nav->ion_qzs, pos, azel); *ion = ionmodel(time, nav->ion_qzs, pos, azel);
*var = std::pow(2, *ion * ERR_BRDCI); *var = std::pow(2.0, *ion * ERR_BRDCI);
return 1; return 1;
} }
/* lex ionosphere model */ /* lex ionosphere model */
@ -207,7 +207,7 @@ int ionocorr(gtime_t time, const nav_t *nav, int sat, const double *pos,
// return lexioncorr(time, nav, pos, azel, ion, var); // return lexioncorr(time, nav, pos, azel, ion, var);
//} //}
*ion = 0.0; *ion = 0.0;
*var = ionoopt == IONOOPT_OFF ? std::pow(2, ERR_ION) : 0.0; *var = ionoopt == IONOOPT_OFF ? std::pow(2.0, ERR_ION) : 0.0;
return 1; return 1;
} }
@ -234,7 +234,7 @@ int tropcorr(gtime_t time, const nav_t *nav, const double *pos,
if (tropopt == TROPOPT_SAAS || tropopt == TROPOPT_EST || tropopt == TROPOPT_ESTG) if (tropopt == TROPOPT_SAAS || tropopt == TROPOPT_EST || tropopt == TROPOPT_ESTG)
{ {
*trp = tropmodel(time, pos, azel, REL_HUMI); *trp = tropmodel(time, pos, azel, REL_HUMI);
*var = SQR(ERR_SAAS / (sin(azel[1]) + 0.1)); *var = std::pow(2.0, ERR_SAAS / (sin(azel[1]) + 0.1));
return 1; return 1;
} }
/* sbas troposphere model */ /* sbas troposphere model */
@ -245,7 +245,7 @@ int tropcorr(gtime_t time, const nav_t *nav, const double *pos,
} }
/* no correction */ /* no correction */
*trp = 0.0; *trp = 0.0;
*var = tropopt == TROPOPT_OFF ? std::pow(2, ERR_TROP) : 0.0; *var = tropopt == TROPOPT_OFF ? std::pow(2.0, ERR_TROP) : 0.0;
return 1; return 1;
} }
@ -314,7 +314,7 @@ int rescode(int iter, const obsd_t *obs, int n, const double *rs,
/* GPS-L1 -> L1/B1 */ /* GPS-L1 -> L1/B1 */
if ((lam_L1 = nav->lam[obs[i].sat - 1][0]) > 0.0) if ((lam_L1 = nav->lam[obs[i].sat - 1][0]) > 0.0)
{ {
dion *= pow(2, lam_L1 / lam_carr[0]); dion *= pow(2.0, lam_L1 / lam_carr[0]);
} }
/* tropospheric corrections */ /* tropospheric corrections */
if (!tropcorr(obs[i].time, nav, pos, azel + i*2, if (!tropcorr(obs[i].time, nav, pos, azel + i*2,
@ -517,7 +517,7 @@ int raim_fde(const obsd_t *obs, int n, const double *rs,
for (j = nvsat = 0, rms_e = 0.0; j < n - 1; j++) for (j = nvsat = 0, rms_e = 0.0; j < n - 1; j++)
{ {
if (!vsat_e[j]) continue; if (!vsat_e[j]) continue;
rms_e += std::pow(2, resp_e[j]); rms_e += std::pow(2.0, resp_e[j]);
nvsat++; nvsat++;
} }
if (nvsat < 5) if (nvsat < 5)

View File

@ -60,7 +60,7 @@
/* constants -----------------------------------------------------------------*/ /* constants -----------------------------------------------------------------*/
#define SQR(x) ((x)*(x)) //#define SQR(x) ((x)*(x))
#define NX (4+3) /* # of estimated parameters */ #define NX (4+3) /* # of estimated parameters */

View File

@ -102,8 +102,8 @@ const double PI_TWO_N31 = (1.462918079267160e-009); //!< Pi*2^-31
const double PI_TWO_N38 = (1.142904749427469e-011); //!< Pi*2^-38 const double PI_TWO_N38 = (1.142904749427469e-011); //!< Pi*2^-38
const double PI_TWO_N23 = (3.745070282923929e-007); //!< Pi*2^-23 const double PI_TWO_N23 = (3.745070282923929e-007); //!< Pi*2^-23
const double D2R = (PI/180.0); //!< deg to rad */ const double D2R = (PI/180.0); //!< deg to rad
const double R2D = (180.0/PI); //!< rad to deg */ const double R2D = (180.0/PI); //!< rad to deg
const double SC2RAD = 3.1415926535898; //!< semi-circle to radian (IS-GPS) const double SC2RAD = 3.1415926535898; //!< semi-circle to radian (IS-GPS)
const double AS2R = (D2R / 3600.0); //!< arc sec to radian const double AS2R = (D2R / 3600.0); //!< arc sec to radian