mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	bds: Bug fixes in carrier wavelength computation
Changed wavelength computation to native method within RTKLIb. The native method should also help in the PVT computation of GLONASS satellites as it considers the freq. offset when computing the wavelength. This also fixes typo in tracking stage for MEO satellites of the BDS constellation. Note: A similar approach to carrier wavelength computation should be applied to the obs_data in rtk_solver. In theory, static allocation should not be needed for the types.
This commit is contained in:
		| @@ -414,8 +414,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; | ||||
| @@ -754,7 +754,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; | ||||
|                                                     } | ||||
| @@ -772,7 +772,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++; | ||||
|                                             } | ||||
|                                     } | ||||
| @@ -884,21 +884,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); | ||||
|  | ||||
|   | ||||
| @@ -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. | ||||
|                         { | ||||
|   | ||||
| @@ -267,7 +267,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) | ||||
|         { | ||||
|   | ||||
| @@ -665,7 +665,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); | ||||
| @@ -685,7 +685,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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Damian Miralles
					Damian Miralles