mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-03 17:27:03 +00:00
doppler center frequency for the grid search
This commit is contained in:
parent
0b8a408b9a
commit
7f594a356b
@ -213,6 +213,12 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_doppler_step(unsigned int dopple
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
|
@ -147,6 +147,11 @@ public:
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center for the grid search
|
||||
*/
|
||||
void set_doppler_center(int doppler_center) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
@ -198,6 +203,7 @@ private:
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
int32_t doppler_center_;
|
||||
std::string dump_filename_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
|
@ -216,6 +216,12 @@ void GalileoE5aPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
void GalileoE5aPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
void GalileoE5aPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
|
@ -147,6 +147,11 @@ public:
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center for the grid search
|
||||
*/
|
||||
void set_doppler_center(int doppler_center) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
@ -209,6 +214,7 @@ private:
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
int32_t doppler_center_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
|
@ -192,6 +192,12 @@ void GpsL1CaPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
|
@ -149,6 +149,11 @@ public:
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center for the grid search
|
||||
*/
|
||||
void set_doppler_center(int doppler_center) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
@ -202,6 +207,7 @@ private:
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
int32_t doppler_center_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
|
@ -196,6 +196,12 @@ void GpsL5iPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
|
||||
acquisition_fpga_->set_doppler_step(doppler_step_);
|
||||
}
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_doppler_center(int doppler_center)
|
||||
{
|
||||
doppler_center_ = doppler_center;
|
||||
|
||||
acquisition_fpga_->set_doppler_center(doppler_center_);
|
||||
}
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
|
@ -147,6 +147,11 @@ public:
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center for the grid search
|
||||
*/
|
||||
void set_doppler_center(int doppler_center) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
@ -200,6 +205,7 @@ private:
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
int32_t doppler_center_;
|
||||
std::string dump_filename_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
|
@ -58,6 +58,7 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_)
|
||||
d_num_doppler_bins = 0U;
|
||||
d_threshold = 0.0;
|
||||
d_doppler_step = 0U;
|
||||
d_doppler_center = 0U;
|
||||
d_doppler_index = 0U;
|
||||
d_test_statistics = 0.0;
|
||||
d_channel = 0U;
|
||||
@ -139,25 +140,10 @@ void pcps_acquisition_fpga::send_positive_acquisition()
|
||||
<< ", code phase " << d_gnss_synchro->Acq_delay_samples
|
||||
<< ", doppler " << d_gnss_synchro->Acq_doppler_hz
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
<< ", input signal power " << d_input_power
|
||||
<< ", Assist doppler_center " << d_doppler_center;
|
||||
|
||||
|
||||
// std::cout << "positive acquisition"
|
||||
// << ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||
// << ", sample_stamp " << d_sample_counter
|
||||
// << ", test statistics value " << d_test_statistics
|
||||
// << ", test statistics threshold " << d_threshold
|
||||
// << ", code phase " << d_gnss_synchro->Acq_delay_samples
|
||||
// << ", doppler " << d_gnss_synchro->Acq_doppler_hz
|
||||
// << ", magnitude " << d_mag
|
||||
// << ", input signal power " << d_input_power
|
||||
// << ", d_gnss_synchro->Acq_samplestamp_samples " << d_gnss_synchro->Acq_samplestamp_samples
|
||||
// << ", d_gnss_synchro->Flag_valid_word " << d_gnss_synchro->Flag_valid_word
|
||||
// << ", Flag_valid_pseudorange " << d_gnss_synchro->Flag_valid_pseudorange
|
||||
// << ", d_gnss_synchro->Flag_valid_symbol_output " << d_gnss_synchro->Flag_valid_symbol_output
|
||||
// << ", d_gnss_synchro->Flag_valid_acquisition " << d_gnss_synchro->Flag_valid_acquisition
|
||||
// << std::endl;
|
||||
|
||||
//the channel FSM is set, so, notify it directly the positive acquisition to minimize delays
|
||||
d_channel_fsm.lock()->Event_valid_acquisition();
|
||||
}
|
||||
@ -271,7 +257,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
acquisition_fpga->write_local_code();
|
||||
acquisition_fpga->set_block_exp(d_total_block_exp);
|
||||
|
||||
acquisition_core(d_num_doppler_bins, d_doppler_step, -d_doppler_max);
|
||||
acquisition_core(d_num_doppler_bins, d_doppler_step, -d_doppler_max + d_doppler_center);
|
||||
if (!d_make_2_steps)
|
||||
{
|
||||
acquisition_fpga->close_device();
|
||||
@ -298,7 +284,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
|
||||
while (num_second_acq < d_max_num_acqs)
|
||||
{
|
||||
acquisition_core(d_num_doppler_bins_step2, d_doppler_step2, d_doppler_center_step_two - static_cast<float>(floor(d_num_doppler_bins_step2 / 2.0)) * d_doppler_step2);
|
||||
acquisition_core(d_num_doppler_bins_step2, d_doppler_step2, d_doppler_center_step_two - static_cast<float>(floor(d_num_doppler_bins_step2 / 2.0)) * d_doppler_step2 + d_doppler_center);
|
||||
if (d_test_statistics > d_threshold)
|
||||
{
|
||||
d_active = false;
|
||||
|
@ -44,10 +44,10 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "fpga_acquisition.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstdint> // for uint32_t
|
||||
#include <memory> // for shared_ptr
|
||||
#include <string> // for string
|
||||
#include <glog/logging.h>
|
||||
|
||||
class Gnss_Synchro;
|
||||
|
||||
@ -183,6 +183,19 @@ public:
|
||||
acquisition_fpga->set_doppler_step(doppler_step);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler center frequency for the grid search. It will refresh the Doppler grid.
|
||||
* \param doppler_center - Frequency center of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_center(int32_t doppler_center)
|
||||
{
|
||||
if (doppler_center != d_doppler_center)
|
||||
{
|
||||
DLOG(INFO) << " Doppler assistance for Channel: " << d_channel << " => Doppler: " << doppler_center << "[Hz]";
|
||||
d_doppler_center = doppler_center;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief This function triggers a HW reset of the FPGA PL.
|
||||
*/
|
||||
@ -196,6 +209,7 @@ private:
|
||||
uint32_t d_doppler_index;
|
||||
uint32_t d_channel;
|
||||
uint32_t d_doppler_step;
|
||||
int32_t d_doppler_center;
|
||||
uint32_t d_doppler_max;
|
||||
uint32_t d_fft_size;
|
||||
uint32_t d_num_doppler_bins;
|
||||
|
Loading…
x
Reference in New Issue
Block a user