1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Remove/add blank lines

This commit is contained in:
Carles Fernandez 2017-06-13 11:25:37 +02:00
parent 9863c680f1
commit 7b4f65476c
3 changed files with 33 additions and 43 deletions

View File

@ -121,7 +121,6 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
select_queue_Fpga, device_name, dump, dump_filename); select_queue_Fpga, device_name, dump, dump_filename);
DLOG(INFO) << "acquisition(" DLOG(INFO) << "acquisition("
<< gps_acquisition_fpga_sc_->unique_id() << ")"; << gps_acquisition_fpga_sc_->unique_id() << ")";
} }
else else
{ {
@ -134,19 +133,19 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
gnss_synchro_ = 0; gnss_synchro_ = 0;
} }
GpsL1CaPcpsAcquisitionFpga::~GpsL1CaPcpsAcquisitionFpga() GpsL1CaPcpsAcquisitionFpga::~GpsL1CaPcpsAcquisitionFpga()
{ {
} }
void GpsL1CaPcpsAcquisitionFpga::set_channel(unsigned int channel) void GpsL1CaPcpsAcquisitionFpga::set_channel(unsigned int channel)
{ {
channel_ = channel; channel_ = channel;
gps_acquisition_fpga_sc_->set_channel(channel_); gps_acquisition_fpga_sc_->set_channel(channel_);
} }
void GpsL1CaPcpsAcquisitionFpga::set_threshold(float threshold) void GpsL1CaPcpsAcquisitionFpga::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + ".pfa", 0.0); float pfa = configuration_->property(role_ + ".pfa", 0.0);
@ -161,68 +160,62 @@ void GpsL1CaPcpsAcquisitionFpga::set_threshold(float threshold)
} }
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
gps_acquisition_fpga_sc_->set_threshold(threshold_); gps_acquisition_fpga_sc_->set_threshold(threshold_);
} }
void GpsL1CaPcpsAcquisitionFpga::set_doppler_max(unsigned int doppler_max) void GpsL1CaPcpsAcquisitionFpga::set_doppler_max(unsigned int doppler_max)
{ {
doppler_max_ = doppler_max; doppler_max_ = doppler_max;
gps_acquisition_fpga_sc_->set_doppler_max(doppler_max_); gps_acquisition_fpga_sc_->set_doppler_max(doppler_max_);
} }
void GpsL1CaPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step) void GpsL1CaPcpsAcquisitionFpga::set_doppler_step(unsigned int doppler_step)
{ {
doppler_step_ = doppler_step; doppler_step_ = doppler_step;
gps_acquisition_fpga_sc_->set_doppler_step(doppler_step_); gps_acquisition_fpga_sc_->set_doppler_step(doppler_step_);
} }
void GpsL1CaPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro) void GpsL1CaPcpsAcquisitionFpga::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
{ {
gnss_synchro_ = gnss_synchro; gnss_synchro_ = gnss_synchro;
gps_acquisition_fpga_sc_->set_gnss_synchro(gnss_synchro_); gps_acquisition_fpga_sc_->set_gnss_synchro(gnss_synchro_);
} }
signed int GpsL1CaPcpsAcquisitionFpga::mag() signed int GpsL1CaPcpsAcquisitionFpga::mag()
{ {
return gps_acquisition_fpga_sc_->mag(); return gps_acquisition_fpga_sc_->mag();
} }
void GpsL1CaPcpsAcquisitionFpga::init() void GpsL1CaPcpsAcquisitionFpga::init()
{ {
gps_acquisition_fpga_sc_->init(); gps_acquisition_fpga_sc_->init();
set_local_code(); set_local_code();
} }
void GpsL1CaPcpsAcquisitionFpga::set_local_code() void GpsL1CaPcpsAcquisitionFpga::set_local_code()
{ {
gps_acquisition_fpga_sc_->set_local_code(); gps_acquisition_fpga_sc_->set_local_code();
} }
void GpsL1CaPcpsAcquisitionFpga::reset() void GpsL1CaPcpsAcquisitionFpga::reset()
{ {
gps_acquisition_fpga_sc_->set_active(true); gps_acquisition_fpga_sc_->set_active(true);
} }
void GpsL1CaPcpsAcquisitionFpga::set_state(int state) void GpsL1CaPcpsAcquisitionFpga::set_state(int state)
{ {
gps_acquisition_fpga_sc_->set_state(state); gps_acquisition_fpga_sc_->set_state(state);
} }
float GpsL1CaPcpsAcquisitionFpga::calculate_threshold(float pfa) float GpsL1CaPcpsAcquisitionFpga::calculate_threshold(float pfa)
{ {
//Calculate the threshold //Calculate the threshold
@ -245,27 +238,23 @@ float GpsL1CaPcpsAcquisitionFpga::calculate_threshold(float pfa)
void GpsL1CaPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block) void GpsL1CaPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block)
{ {
//nothing to connect //nothing to connect
} }
void GpsL1CaPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block) void GpsL1CaPcpsAcquisitionFpga::disconnect(gr::top_block_sptr top_block)
{ {
//nothing to disconnect //nothing to disconnect
} }
gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_left_block() gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_left_block()
{ {
return gps_acquisition_fpga_sc_; return gps_acquisition_fpga_sc_;
} }
gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_right_block() gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_right_block()
{ {
return gps_acquisition_fpga_sc_; return gps_acquisition_fpga_sc_;
} }

View File

@ -48,6 +48,7 @@ void wait3(int seconds)
{ seconds }); { seconds });
} }
gps_pcps_acquisition_fpga_sc_sptr gps_pcps_make_acquisition_fpga_sc( gps_pcps_acquisition_fpga_sc_sptr gps_pcps_make_acquisition_fpga_sc(
unsigned int sampled_ms, unsigned int max_dwells, unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in, int samples_per_ms, unsigned int doppler_max, long freq, long fs_in, int samples_per_ms,
@ -56,7 +57,6 @@ gps_pcps_acquisition_fpga_sc_sptr gps_pcps_make_acquisition_fpga_sc(
unsigned int select_queue_Fpga, std::string device_name, bool dump, unsigned int select_queue_Fpga, std::string device_name, bool dump,
std::string dump_filename) std::string dump_filename)
{ {
return gps_pcps_acquisition_fpga_sc_sptr( return gps_pcps_acquisition_fpga_sc_sptr(
new gps_pcps_acquisition_fpga_sc(sampled_ms, max_dwells, new gps_pcps_acquisition_fpga_sc(sampled_ms, max_dwells,
doppler_max, freq, fs_in, samples_per_ms, samples_per_code, doppler_max, freq, fs_in, samples_per_ms, samples_per_code,
@ -65,6 +65,7 @@ gps_pcps_acquisition_fpga_sc_sptr gps_pcps_make_acquisition_fpga_sc(
dump, dump_filename)); dump, dump_filename));
} }
gps_pcps_acquisition_fpga_sc::gps_pcps_acquisition_fpga_sc( gps_pcps_acquisition_fpga_sc::gps_pcps_acquisition_fpga_sc(
unsigned int sampled_ms, unsigned int max_dwells, unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in, int samples_per_ms, unsigned int doppler_max, long freq, long fs_in, int samples_per_ms,
@ -101,15 +102,13 @@ gps_pcps_acquisition_fpga_sc::gps_pcps_acquisition_fpga_sc(
d_gnss_synchro = 0; d_gnss_synchro = 0;
// instantiate HW accelerator class // instantiate HW accelerator class
acquisition_fpga_8sc = acquisition_fpga_8sc = std::make_shared < gps_fpga_acquisition_8sc>
std::make_shared < gps_fpga_acquisition_8sc (device_name, vector_length, d_fft_size, nsamples_total, fs_in, freq, sampled_ms, select_queue_Fpga);
> (device_name, vector_length, d_fft_size, nsamples_total, fs_in, freq, sampled_ms, select_queue_Fpga);
} }
gps_pcps_acquisition_fpga_sc::~gps_pcps_acquisition_fpga_sc() gps_pcps_acquisition_fpga_sc::~gps_pcps_acquisition_fpga_sc()
{ {
if (d_dump) if (d_dump)
{ {
d_dump_file.close(); d_dump_file.close();
@ -118,13 +117,13 @@ gps_pcps_acquisition_fpga_sc::~gps_pcps_acquisition_fpga_sc()
acquisition_fpga_8sc->free(); acquisition_fpga_8sc->free();
} }
void gps_pcps_acquisition_fpga_sc::set_local_code() void gps_pcps_acquisition_fpga_sc::set_local_code()
{ {
acquisition_fpga_8sc->set_local_code(d_gnss_synchro->PRN); acquisition_fpga_8sc->set_local_code(d_gnss_synchro->PRN);
} }
void gps_pcps_acquisition_fpga_sc::init() void gps_pcps_acquisition_fpga_sc::init()
{ {
d_gnss_synchro->Flag_valid_acquisition = false; d_gnss_synchro->Flag_valid_acquisition = false;
@ -144,9 +143,9 @@ void gps_pcps_acquisition_fpga_sc::init()
acquisition_fpga_8sc->open_device(); acquisition_fpga_8sc->open_device();
acquisition_fpga_8sc->init(); acquisition_fpga_8sc->init();
} }
void gps_pcps_acquisition_fpga_sc::set_state(int state) void gps_pcps_acquisition_fpga_sc::set_state(int state)
{ {
d_state = state; d_state = state;
@ -165,12 +164,11 @@ void gps_pcps_acquisition_fpga_sc::set_state(int state)
{ {
LOG(ERROR) << "State can only be set to 0 or 1"; LOG(ERROR) << "State can only be set to 0 or 1";
} }
} }
void gps_pcps_acquisition_fpga_sc::set_active(bool active) void gps_pcps_acquisition_fpga_sc::set_active(bool active)
{ {
float temp_peak_to_noise_level = 0.0; float temp_peak_to_noise_level = 0.0;
float peak_to_noise_level = 0.0; float peak_to_noise_level = 0.0;
float input_power; float input_power;
@ -283,7 +281,6 @@ void gps_pcps_acquisition_fpga_sc::set_active(bool active)
acquisition_message = 1; acquisition_message = 1;
this->message_port_pub(pmt::mp("events"), this->message_port_pub(pmt::mp("events"),
pmt::from_long(acquisition_message)); pmt::from_long(acquisition_message));
} }
else else
{ {
@ -307,7 +304,6 @@ void gps_pcps_acquisition_fpga_sc::set_active(bool active)
acquisition_message = 2; acquisition_message = 2;
this->message_port_pub(pmt::mp("events"), this->message_port_pub(pmt::mp("events"),
pmt::from_long(acquisition_message)); pmt::from_long(acquisition_message));
} }
acquisition_fpga_8sc->unblock_samples(); acquisition_fpga_8sc->unblock_samples();
@ -315,9 +311,9 @@ void gps_pcps_acquisition_fpga_sc::set_active(bool active)
acquisition_fpga_8sc->close_device(); acquisition_fpga_8sc->close_device();
DLOG(INFO) << "Done. Consumed 1 item."; DLOG(INFO) << "Done. Consumed 1 item.";
} }
int gps_pcps_acquisition_fpga_sc::general_work(int noutput_items, int gps_pcps_acquisition_fpga_sc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items __attribute__((unused))) gr_vector_void_star &output_items __attribute__((unused)))

View File

@ -71,6 +71,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc_sptr gps_l1_ca_dll_pll_c_aid_make_track
early_late_space_chips, device_name, device_base)); early_late_space_chips, device_name, device_base));
} }
void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::msg_handler_preamble_index( void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::msg_handler_preamble_index(
pmt::pmt_t msg) pmt::pmt_t msg)
{ {
@ -85,6 +86,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::msg_handler_preamble_index(
} }
} }
gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc( gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc(
long if_freq, long fs_in, unsigned int vector_length, bool dump, long if_freq, long fs_in, unsigned int vector_length, bool dump,
std::string dump_filename, float pll_bw_hz, float dll_bw_hz, std::string dump_filename, float pll_bw_hz, float dll_bw_hz,
@ -96,7 +98,6 @@ gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::gps_l1_ca_dll_pll_c_aid_tracking_fpga_
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
{ {
// Telemetry bit synchronization message port input // Telemetry bit synchronization message port input
this->message_port_register_in(pmt::mp("preamble_timestamp_s")); this->message_port_register_in(pmt::mp("preamble_timestamp_s"));
this->set_msg_handler(pmt::mp("preamble_timestamp_s"), this->set_msg_handler(pmt::mp("preamble_timestamp_s"),
@ -202,9 +203,9 @@ gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::gps_l1_ca_dll_pll_c_aid_tracking_fpga_
d_preamble_timestamp_s = 0.0; d_preamble_timestamp_s = 0.0;
d_carr_phase_error_secs_Ti = 0.0; d_carr_phase_error_secs_Ti = 0.0;
//set_min_output_buffer((long int)300); //set_min_output_buffer((long int)300);
} }
void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::start_tracking() void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::start_tracking()
{ {
/* /*
@ -316,6 +317,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::start_tracking()
<< " PULL-IN Code Phase [samples]=" << d_acq_code_phase_samples; << " PULL-IN Code Phase [samples]=" << d_acq_code_phase_samples;
} }
gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::~gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc() gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::~gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc()
{ {
d_dump_file.close(); d_dump_file.close();
@ -329,13 +331,13 @@ gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::~gps_l1_ca_dll_pll_c_aid_tracking_fpga
multicorrelator_fpga_8sc->free(); multicorrelator_fpga_8sc->free();
} }
int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work( int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work(
int noutput_items __attribute__((unused)), int noutput_items __attribute__((unused)),
gr_vector_int &ninput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items) gr_vector_void_star &output_items)
{ {
// samples offset // samples offset
int samples_offset; int samples_offset;
@ -829,6 +831,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::general_work(
return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false return 1; //output tracking result ALWAYS even in the case of d_enable_tracking==false
} }
void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::set_channel(unsigned int channel) void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::set_channel(unsigned int channel)
{ {
d_channel = channel; d_channel = channel;
@ -864,12 +867,14 @@ void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::set_channel(unsigned int channel)
} }
} }
void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::set_gnss_synchro( void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::set_gnss_synchro(
Gnss_Synchro* p_gnss_synchro) Gnss_Synchro* p_gnss_synchro)
{ {
d_acquisition_gnss_synchro = p_gnss_synchro; d_acquisition_gnss_synchro = p_gnss_synchro;
} }
void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::reset(void) void gps_l1_ca_dll_pll_c_aid_tracking_fpga_sc::reset(void)
{ {
multicorrelator_fpga_8sc->unlock_channel(); multicorrelator_fpga_8sc->unlock_channel();