mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-28 18:04:51 +00:00
Code cleaning
This commit is contained in:
parent
da7ca482a8
commit
081439d6f8
@ -81,7 +81,6 @@ Fpga_Acquisition::Fpga_Acquisition(std::string device_name,
|
||||
int64_t fs_in,
|
||||
uint32_t sampled_ms __attribute__((unused)),
|
||||
uint32_t select_queue,
|
||||
//lv_16sc_t *all_fft_codes,
|
||||
uint32_t *all_fft_codes,
|
||||
uint32_t excludelimit)
|
||||
{
|
||||
@ -209,6 +208,7 @@ void Fpga_Acquisition::set_block_exp(uint32_t total_block_exp)
|
||||
d_map_base[11] = total_block_exp;
|
||||
}
|
||||
|
||||
|
||||
void Fpga_Acquisition::set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_step, int32_t doppler_min)
|
||||
{
|
||||
float phase_step_rad_real;
|
||||
@ -233,7 +233,6 @@ void Fpga_Acquisition::set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_s
|
||||
void Fpga_Acquisition::configure_acquisition()
|
||||
{
|
||||
//Fpga_Acquisition::open_device();
|
||||
|
||||
d_map_base[0] = d_select_queue;
|
||||
d_map_base[1] = d_vector_length;
|
||||
d_map_base[2] = d_nsamples;
|
||||
@ -318,6 +317,7 @@ void Fpga_Acquisition::read_fpga_total_scale_factor(uint32_t *total_scale_factor
|
||||
*fw_scale_factor = 0;
|
||||
}
|
||||
|
||||
|
||||
void Fpga_Acquisition::read_result_valid(uint32_t *result_valid)
|
||||
{
|
||||
uint32_t readval = 0;
|
||||
|
@ -36,7 +36,6 @@
|
||||
#ifndef GNSS_SDR_FPGA_ACQUISITION_H_
|
||||
#define GNSS_SDR_FPGA_ACQUISITION_H_
|
||||
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@ -46,7 +45,8 @@
|
||||
class Fpga_Acquisition
|
||||
{
|
||||
public:
|
||||
Fpga_Acquisition(std::string device_name,
|
||||
Fpga_Acquisition(
|
||||
std::string device_name,
|
||||
uint32_t nsamples,
|
||||
uint32_t doppler_max,
|
||||
uint32_t nsamples_total,
|
||||
@ -57,13 +57,24 @@ public:
|
||||
uint32_t excludelimit);
|
||||
|
||||
~Fpga_Acquisition();
|
||||
|
||||
bool set_local_code(uint32_t PRN);
|
||||
|
||||
void set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_step, int32_t doppler_min);
|
||||
|
||||
void run_acquisition(void);
|
||||
|
||||
void read_acquisition_results(uint32_t *max_index, float *firstpeak, float *secondpeak, uint64_t *initial_sample, float *power_sum, uint32_t *doppler_index, uint32_t *total_blk_exp);
|
||||
void read_acquisition_results(
|
||||
uint32_t *max_index,
|
||||
float *firstpeak,
|
||||
float *secondpeak,
|
||||
uint64_t *initial_sample,
|
||||
float *power_sum,
|
||||
uint32_t *doppler_index,
|
||||
uint32_t *total_blk_exp);
|
||||
|
||||
void block_samples();
|
||||
|
||||
void unblock_samples();
|
||||
|
||||
/*!
|
||||
@ -100,9 +111,10 @@ public:
|
||||
|
||||
void configure_acquisition(void);
|
||||
|
||||
void close_device();
|
||||
void open_device();
|
||||
|
||||
void close_device();
|
||||
|
||||
private:
|
||||
int64_t d_fs_in;
|
||||
// data related to the hardware module and the driver
|
||||
|
@ -87,6 +87,7 @@ bool ChannelFsm::Event_start_acquisition_fpga()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ChannelFsm::Event_start_acquisition()
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
@ -170,11 +171,14 @@ void ChannelFsm::set_tracking(std::shared_ptr<TrackingInterface> tracking)
|
||||
trk_ = std::move(tracking);
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
nav_ = std::move(telemetry);
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_queue(gr::msg_queue::sptr queue)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
@ -194,6 +198,7 @@ void ChannelFsm::stop_acquisition()
|
||||
acq_->stop_acquisition();
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::stop_tracking()
|
||||
{
|
||||
trk_->stop_tracking();
|
||||
|
@ -51,11 +51,11 @@ public:
|
||||
~channel_msg_receiver_cc(); //!< Default destructor
|
||||
|
||||
private:
|
||||
friend channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
|
||||
channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
bool d_repeat; // todo: change FSM to include repeat value
|
||||
friend channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
|
||||
void msg_handler_events(pmt::pmt_t msg);
|
||||
channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user