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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user