1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 11:40:33 +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

@ -107,7 +107,7 @@ Observables.dump_filename=./observables.dat
;######### PVT CONFIG ############
PVT.implementation=RTKLIB_PVT
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX
PVT.iono_model=OFF ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX
PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad
PVT.output_rate_ms=100
PVT.display_rate_ms=500
@ -118,4 +118,4 @@ PVT.nmea_dump_devname=/dev/pts/4
PVT.flag_rtcm_server=false
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1
PVT.dump=false
PVT.dump=true

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;
}

View File

@ -140,7 +140,6 @@ void Beidou_Dnav_Navigation_Message::reset()
d_A0GAL = 0;
d_A1GLO = 0;
d_A0GLO = 0;
d_AODE_SF1 = 0;
d_SQRT_A_ALMANAC = 0;
d_A1_ALMANAC = 0;
d_A0_ALMANAC = 0;
@ -476,7 +475,7 @@ int Beidou_Dnav_Navigation_Message::subframe_decoder(char *subframe)
d_a1 = static_cast<double>(read_navigation_signed(subframe_bits, D1_A1));
d_a1 = d_a1 * D1_A1_LSB;
d_AODE_SF1 = static_cast<double>(read_navigation_unsigned(subframe_bits, D1_AODE));
d_AODE = static_cast<double>(read_navigation_unsigned(subframe_bits, D1_AODE));
flag_iono_valid = true;
//d_A_f0 = static_cast<double>(read_navigation_signed(subframe_bits, A_F0));
//d_A_f0 = d_A_f0 * A_F0_LSB;
@ -848,6 +847,7 @@ Beidou_Dnav_Ephemeris Beidou_Dnav_Navigation_Message::get_ephemeris()
ephemeris.i_SV_health = i_SV_health;
ephemeris.d_TGD1 = d_TGD1;
ephemeris.d_AODC = d_AODC;
ephemeris.d_AODE = d_AODE;
//ephemeris.d_AODE_SF2 = d_AODE_SF2;
//ephemeris.d_AODE_SF3 = d_AODE_SF3;
//ephemeris.i_AODO = i_AODO;

View File

@ -193,7 +193,6 @@ public:
double d_A1GLO;
double d_A0GLO;
double d_AODE_SF1;
double d_SQRT_A_ALMANAC;
double d_A1_ALMANAC;
double d_A0_ALMANAC;

View File

@ -31,7 +31,7 @@ close all;
addpath('./libs');
samplingFreq = 25000000; %[Hz]
channels=10;
path='/home/dmiralles/Documents/gnss-sdr/';
path='/home/gnss/Documents/gnss-sdr/';
observables_log_path=[path 'observables.dat'];
GNSS_observables= read_hybrid_observables_dump(channels,observables_log_path);