1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-12 19:20:32 +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
;#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.
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,
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]) ---------------------------------------------*/
double var_urassr(int ura)
{
double std;
if (ura <= 0) return std::pow(2, DEFURASSR);
if (ura >= 63) return std::pow(2, 5.4665);
std = (pow(3.0, (ura >> 3) & 7) * (1.0 + (ura & 7) / 4.0) - 1.0) * 1e-3;
return std::pow(2, std);
double std_;
if (ura <= 0) return std::pow(2.0, DEFURASSR);
if (ura >= 63) return std::pow(2.0, 5.4665);
std_ = (std::pow(3.0, (ura >> 3) & 7) * (1.0 + (ura & 7) / 4.0) - 1.0) * 1e-3;
return std::pow(2.0, std_);
}
@ -134,7 +134,7 @@ void alm2pos(gtime_t time, const alm_t *alm, double *rs, double *dts)
for (n = 0, E = M, Ek = 0.0; fabs(E - Ek) > RTOL_KEPLER && n < MAX_ITER_KEPLER; n++)
{
Ek = E;
E -= (E-alm->e * sin(E) - M) / (1.0 - alm->e * cos(E));
E -= (E - alm->e * sin(E) - M) / (1.0 - alm->e * cos(E));
}
if (n >= MAX_ITER_KEPLER)
{
@ -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;
/* 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 */
*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 --------------------------------------*/
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)
{
@ -293,7 +293,7 @@ void deq(const double *x, double *xdot, const double *acc)
return;
}
/* 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 */
c = -MU_GLO / r3 - a * (1.0 - b); /* -mu/r^3-a(1-b) */
xdot[0] = x[3];
@ -336,9 +336,9 @@ double geph2clk(gtime_t time, const geph_t *geph)
for (i = 0; i < 2; i++)
{
t-=-geph->taun + geph->gamn*t;
t -= -geph->taun + geph->gamn * t;
}
return -geph->taun + geph->gamn*t;
return -geph->taun + geph->gamn * t;
}
@ -362,21 +362,21 @@ void geph2pos(gtime_t time, const geph_t *geph, double *rs, double *dts,
t = timediff(time, geph->toe);
*dts=-geph->taun+geph->gamn*t;
*dts = -geph->taun + geph->gamn * t;
for (i = 0;i<3;i++)
for (i = 0; i < 3; i++)
{
x[i ] = geph->pos[i];
x[i+3] = geph->vel[i];
}
for (tt = t<0.0?-TSTEP:TSTEP;fabs(t)>1E-9;t-=tt)
x[i ] = geph->pos[i];
x[i+3] = geph->vel[i];
}
for (tt = t < 0.0 ? - TSTEP : TSTEP; fabs(t) > 1e-9; t -= tt)
{
if (fabs(t)<TSTEP) tt = t;
glorbit(tt, x, geph->acc);
}
for (i = 0;i<3;i++) rs[i] = x[i];
if (fabs(t) < TSTEP) tt = t;
glorbit(tt, x, geph->acc);
}
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;
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++)

View File

@ -56,11 +56,11 @@
/* pseudorange measurement error variance ------------------------------------*/
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);
varr = std::pow(2, opt->err[0]) * (std::pow(2, opt->err[1]) + std::pow(2, opt->err[2]) / sin(el));
if (opt->ionoopt == IONOOPT_IFLC) varr *= std::pow(2, 3.0); /* iono-free */
return std::pow(2, fact) * varr;
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.0, 3.0); /* iono-free */
return std::pow(2.0, fact) * varr;
}
@ -95,7 +95,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
/* L1-L2 for GPS/GLO/QZS, L1-L5 for GAL/SBS */
if (NFREQ>=3&&(sys&(SYS_GAL|SYS_SBS))) j = 2;
if (NFREQ >= 3 && (sys & (SYS_GAL | SYS_SBS))) j = 2;
if (NFREQ<2 || lam[i] == 0.0 || lam[j] == 0.0)
{
@ -105,7 +105,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
}
/* test snr mask */
if (iter>0)
if (iter > 0)
{
if (testsnr(0, i, azel[1], obs->SNR[i] * 0.25, &opt->snrmask))
{
@ -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];
P2 = obs->P[j];
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 */
*var = std::pow(2, ERR_CBIAS);
*var = std::pow(2.0, ERR_CBIAS);
return PC;
}
@ -182,7 +182,7 @@ int ionocorr(gtime_t time, const nav_t *nav, int sat, const double *pos,
if (ionoopt == IONOOPT_BRDC)
{
*ion = ionmodel(time, nav->ion_gps, pos, azel);
*var = SQR(*ion*ERR_BRDCI);
*var = std::pow(2.0, *ion*ERR_BRDCI);
return 1;
}
/* sbas ionosphere model */
@ -196,10 +196,10 @@ int ionocorr(gtime_t time, const nav_t *nav, int sat, const double *pos,
return iontec(time, nav, pos, azel, 1, ion, var);
}
/* qzss broadcast model */
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);
*var = std::pow(2, *ion * ERR_BRDCI);
*var = std::pow(2.0, *ion * ERR_BRDCI);
return 1;
}
/* 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);
//}
*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;
}
@ -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)
{
*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;
}
/* sbas troposphere model */
@ -245,7 +245,7 @@ int tropcorr(gtime_t time, const nav_t *nav, const double *pos,
}
/* no correction */
*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;
}
@ -314,7 +314,7 @@ int rescode(int iter, const obsd_t *obs, int n, const double *rs,
/* GPS-L1 -> L1/B1 */
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 */
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++)
{
if (!vsat_e[j]) continue;
rms_e += std::pow(2, resp_e[j]);
rms_e += std::pow(2.0, resp_e[j]);
nvsat++;
}
if (nvsat < 5)

View File

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

View File

@ -102,12 +102,12 @@ 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_N23 = (3.745070282923929e-007); //!< Pi*2^-23
const double D2R = (PI/180.0); //!< deg to rad */
const double R2D = (180.0/PI); //!< rad to deg */
const double D2R = (PI/180.0); //!< deg to rad
const double R2D = (180.0/PI); //!< rad to deg
const double SC2RAD = 3.1415926535898; //!< semi-circle to radian (IS-GPS)
const double AS2R = (D2R / 3600.0); //!< arc sec to radian
const double DEFAULT_OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Default Earth rotation rate, [rad/s]
const double DEFAULT_OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Default Earth rotation rate, [rad/s]
const double SPEED_OF_LIGHT = 299792458.0; //!< [m/s]
const double AU = 149597870691.0; //!< 1 Astronomical Unit AU (m) distance from Earth to the Sun.