1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-20 18:17:42 +00:00

bds b1i: some bug corrections in the code

This commit is contained in:
Damian Miralles
2018-12-13 07:57:42 -07:00
parent 352c82827e
commit 0d94f9e1b7
5 changed files with 17 additions and 16 deletions

View File

@@ -77,7 +77,7 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
// to more elegant solution
if(gnss_synchro.System == 'C')
{
rtklib_obs.time = bdt2time(week, gnss_synchro.RX_time);
rtklib_obs.time = bdt2gpst(bdt2time(week, gnss_synchro.RX_time));
}
else
{
@@ -257,8 +257,10 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
rtklib_sat.Adot = 0; //only in CNAV;
rtklib_sat.ndot = 0; //only in CNAV;
rtklib_sat.code = 1;
rtklib_sat.flag = 1;
rtklib_sat.code = 1; /*B1I data*/
rtklib_sat.flag = 1; /*MEO/IGSO satellite*/
rtklib_sat.iode=(int32_t)bei_eph.d_AODE; /* AODE */
rtklib_sat.iodc=(int32_t)bei_eph.d_AODC; /* AODC */
rtklib_sat.week = bei_eph.i_BEIDOU_week; /* week of tow */
rtklib_sat.cic = bei_eph.d_Cic;
@@ -275,12 +277,12 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
rtklib_sat.tgd[2] = 0.0;
rtklib_sat.tgd[3] = 0.0;
rtklib_sat.toes = bei_eph.d_Toe;
rtklib_sat.toc = bdt2time(rtklib_sat.week, bei_eph.d_Toc);
rtklib_sat.ttr = bdt2time(rtklib_sat.week, bei_eph.d_TOW);
rtklib_sat.toc = bdt2gpst(bdt2time(rtklib_sat.week, bei_eph.d_Toc));
rtklib_sat.ttr = bdt2gpst(bdt2time(rtklib_sat.week, bei_eph.d_TOW));
/* adjustment for week handover */
double tow, toc;
tow = time2bdt(rtklib_sat.ttr, &rtklib_sat.week);
toc = time2bdt(rtklib_sat.toc, NULL);
tow = time2gpst(rtklib_sat.ttr, &rtklib_sat.week);
toc = time2gpst(rtklib_sat.toc, NULL);
if (rtklib_sat.toes < tow - 302400.0)
{
rtklib_sat.week++;
@@ -291,9 +293,9 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
rtklib_sat.week--;
tow += 604800.0;
}
rtklib_sat.toe = bdt2time(rtklib_sat.week, rtklib_sat.toes);
rtklib_sat.toc = bdt2time(rtklib_sat.week, toc);
rtklib_sat.ttr = bdt2time(rtklib_sat.week, tow);
rtklib_sat.toe = gpst2time(rtklib_sat.week, rtklib_sat.toes);
rtklib_sat.toc = gpst2time(rtklib_sat.week, toc);
rtklib_sat.ttr = gpst2time(rtklib_sat.week, tow);
return rtklib_sat;
}