1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-28 14:07:38 +00:00

Merge branch 'bds_fix' of https://github.com/dmiralles2009/gnss-sdr into dmiralles2009-bds_fix

This commit is contained in:
Carles Fernandez
2019-07-15 09:48:31 +02:00
7 changed files with 21 additions and 306 deletions

View File

@@ -443,8 +443,8 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
int glo_valid_obs = 0; // GLONASS L1/L2 valid observations counter
std::array<obsd_t, MAXOBS> obs_data{};
std::array<eph_t, MAXOBS> eph_data{};
std::array<geph_t, MAXOBS> geph_data{};
std::vector<eph_t> eph_data(MAXOBS);
std::vector<geph_t> geph_data(MAXOBS);
// Workaround for NAV/CNAV clash problem
bool gps_dual_band = false;
@@ -783,7 +783,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs],
gnss_observables_iter->second,
beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET,
1); // Band 3 (L2/G2/B3)
2); // Band 3 (L2/G2/B3)
found_B1I_obs = true;
break;
}
@@ -801,7 +801,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
gnss_observables_iter->second,
beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET,
1); // Band 2 (L2/G2)
2); // Band 2 (L2/G2)
valid_obs++;
}
}
@@ -913,21 +913,8 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
nav_data.leaps = beidou_dnav_utc_model.d_DeltaT_LS;
}
for (auto &lambda_ : nav_data.lam)
{
lambda_[0] = SPEED_OF_LIGHT / FREQ1; // L1/E1
lambda_[1] = SPEED_OF_LIGHT / FREQ2; // L2
lambda_[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
// Keep update on sat number
sat++;
if (sat > NSYSGPS + NSYSGLO + NSYSGAL + NSYSQZS and sat < NSYSGPS + NSYSGLO + NSYSGAL + NSYSQZS + NSYSBDS)
{
lambda_[0] = SPEED_OF_LIGHT / FREQ1_BDS; // B1I
lambda_[1] = SPEED_OF_LIGHT / FREQ3_BDS; // B3I
lambda_[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
}
}
/* update carrier wave length using native function call in RTKlib */
uniqnav(&nav_data);
result = rtkpos(&rtk_, obs_data.data(), valid_obs + glo_valid_obs, &nav_data);

View File

@@ -166,9 +166,8 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
return 0.0;
}
/* L1-L2 for GPS/GLO/QZS, L1-L5 for GAL/SBS */
if (sys == SYS_GAL or sys == SYS_SBS)
/* L1-L2 for GPS/GLO/QZS, L1-L5 for GAL/SBS/BDS */
if (sys == SYS_GAL or sys == SYS_SBS or sys == SYS_BDS)
{
j = 2;
}
@@ -285,7 +284,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
if (sys == SYS_BDS)
{
P2 += P2_C2; /* C2->P2 */
PC = P2; // no tgd corrections for B3I
PC = P2; // no tgd corrections for B3I
}
else if (sys == SYS_GAL or sys == SYS_GLO or sys == SYS_BDS) // Gal. E5a single freq.
{

View File

@@ -271,7 +271,7 @@ void beidou_b1i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
std::shared_ptr<Beidou_Dnav_Iono> tmp_obj = std::make_shared<Beidou_Dnav_Iono>(d_nav.get_iono());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "BEIDOU DNAV Iono have been received in channel" << d_channel << " from satellite " << d_satellite;
std::cout << "New BEIDOU B1I DNAV Iono message received in channel " << d_channel << ": Iono model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV Iono message received in channel " << d_channel << ": Iono model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
}
if (d_nav.have_new_almanac() == true)
{

View File

@@ -667,7 +667,7 @@ void dll_pll_veml_tracking::start_tracking()
d_symbols_per_bit = BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT; //todo: enable after fixing beidou symbol synchronization
d_correlation_length_ms = 1;
d_code_samples_per_chip = 1;
d_secondary = false;
d_secondary = true;
trk_parameters.track_pilot = false;
// synchronize and remove data secondary code
d_secondary_code_length = static_cast<uint32_t>(BEIDOU_B1I_SECONDARY_CODE_LENGTH);
@@ -687,7 +687,7 @@ void dll_pll_veml_tracking::start_tracking()
d_symbols_per_bit = BEIDOU_B3I_GEO_TELEMETRY_SYMBOLS_PER_BIT; //todo: enable after fixing beidou symbol synchronization
d_correlation_length_ms = 1;
d_code_samples_per_chip = 1;
d_secondary = true;
d_secondary = false;
trk_parameters.track_pilot = false;
// set the preamble in the secondary code acquisition
d_secondary_code_length = static_cast<uint32_t>(BEIDOU_B3I_GEO_PREAMBLE_LENGTH_SYMBOLS);