mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-17 07:37:16 +00:00
Merge branch 'initial-labsat-4-support' into next
This commit is contained in:
@@ -46,8 +46,9 @@ LabsatSignalSource::LabsatSignalSource(const ConfigurationInterface* configurati
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
||||
|
||||
const int64_t sampling_frequency_deprecated = configuration->property(role + ".sampling_frequency", static_cast<int64_t>(16368000));
|
||||
const int64_t throttle_frequency_sps = configuration->property(role + ".throttle_frequency_sps", static_cast<int64_t>(sampling_frequency_deprecated));
|
||||
const int64_t sampling_frequency = configuration->property(role + ".sampling_frequency", static_cast<int64_t>(16368000));
|
||||
const int64_t throttle_frequency_sps = configuration->property(role + ".throttle_frequency_sps", static_cast<int64_t>(sampling_frequency));
|
||||
const double seconds_to_skip = configuration->property(role + ".seconds_to_skip", 0.);
|
||||
|
||||
std::string channels_to_read = configuration->property(role + ".selected_channel", default_item_type);
|
||||
std::stringstream ss(channels_to_read);
|
||||
@@ -77,7 +78,7 @@ LabsatSignalSource::LabsatSignalSource(const ConfigurationInterface* configurati
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
labsat23_source_ = labsat23_make_source_sptr(filename_.c_str(), channels_selector_vec_, queue, digital_io_enabled);
|
||||
labsat23_source_ = labsat23_make_source_sptr(filename_.c_str(), channels_selector_vec_, queue, digital_io_enabled, sampling_frequency, seconds_to_skip);
|
||||
DLOG(INFO) << "Item size " << item_size_;
|
||||
DLOG(INFO) << "labsat23_source_(" << labsat23_source_->unique_id() << ")";
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,9 @@ labsat23_source_sptr labsat23_make_source_sptr(
|
||||
const char *signal_file_basename,
|
||||
const std::vector<int> &channel_selector,
|
||||
Concurrent_Queue<pmt::pmt_t> *queue,
|
||||
bool digital_io_enabled);
|
||||
bool digital_io_enabled,
|
||||
int64_t sampling_frequency,
|
||||
double seconds_to_skip);
|
||||
|
||||
/*!
|
||||
* \brief This class implements conversion between Labsat 2, 3 and 3 Wideband
|
||||
@@ -64,22 +66,29 @@ private:
|
||||
const char *signal_file_basename,
|
||||
const std::vector<int> &channel_selector,
|
||||
Concurrent_Queue<pmt::pmt_t> *queue,
|
||||
bool digital_io_enabled);
|
||||
bool digital_io_enabled,
|
||||
int64_t sampling_frequency,
|
||||
double seconds_to_skip);
|
||||
|
||||
labsat23_source(const char *signal_file_basename,
|
||||
const std::vector<int> &channel_selector,
|
||||
Concurrent_Queue<pmt::pmt_t> *queue,
|
||||
bool digital_io_enabled);
|
||||
bool digital_io_enabled,
|
||||
int64_t sampling_frequency,
|
||||
double seconds_to_skip);
|
||||
|
||||
std::string generate_filename();
|
||||
|
||||
int parse_header();
|
||||
int getBit(uint8_t byte, int position);
|
||||
int read_ls3w_ini(const std::string &filename);
|
||||
int number_of_samples_per_ls3w_register() const;
|
||||
|
||||
void decode_samples_one_channel(int16_t input_short, gr_complex *out, int type);
|
||||
void decode_ls3w_register(uint64_t input, std::vector<gr_complex *> &out, std::size_t output_pointer) const;
|
||||
int parse_ls23_data(int noutput_items, std::vector<gr_complex *> out);
|
||||
int parse_ls3w_data(int noutput_items, std::vector<gr_complex *> out);
|
||||
int parse_ls4_data(int noutput_items, std::vector<gr_complex *> out);
|
||||
bool read_ls4_data();
|
||||
|
||||
std::ifstream binary_input_file;
|
||||
std::string d_signal_file_basename;
|
||||
@@ -108,7 +117,24 @@ private:
|
||||
int d_ls3w_spare_bits{};
|
||||
int d_ls3w_samples_per_register{};
|
||||
bool d_is_ls3w = false;
|
||||
bool d_is_ls4 = false;
|
||||
bool d_ls3w_digital_io_enabled = false;
|
||||
|
||||
// Data members for Labsat 4
|
||||
uint64_t d_read_index{0};
|
||||
|
||||
uint64_t d_data_index_a{0};
|
||||
uint64_t d_data_index_b{0};
|
||||
uint64_t d_data_index_c{0};
|
||||
|
||||
int32_t d_ls4_BUFF_SIZE_A{};
|
||||
int32_t d_ls4_BUFF_SIZE_B{};
|
||||
int32_t d_ls4_BUFF_SIZE_C{};
|
||||
int32_t d_ls4_BUFF_SIZE{};
|
||||
|
||||
std::vector<uint64_t> d_ls4_data_a;
|
||||
std::vector<uint64_t> d_ls4_data_b;
|
||||
std::vector<uint64_t> d_ls4_data_c;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user