Add LabSat 3 Wideband format to Labsat_Signal_Source

This commit is contained in:
Carles Fernandez 2021-03-11 22:13:23 +01:00
parent 2781f7fe57
commit 32c699befc
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
5 changed files with 898 additions and 331 deletions

View File

@ -62,6 +62,8 @@ SPDX-FileCopyrightText: 2011-2021 Carles Fernandez-Prades <carles.fernandez@cttc
configurations.
- Fix bug that made the Monitor block to always set to 0 the
`carrier_phase_rads` parameter value.
- The `Labsat_Signal_Source` implementation of the `SignalSource` block now can
read files in the LabSat 3 Wideband format (`.LS3W`).
&nbsp;

View File

@ -42,10 +42,12 @@ LabsatSignalSource::LabsatSignalSource(const ConfigurationInterface* configurati
const std::string default_filename("./example_capture.LS3");
filename_ = configuration->property(role + ".filename", default_filename);
const bool digital_io_enabled = configuration->property(role + ".digital_io_enabled", false);
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
labsat23_source_ = labsat23_make_source_sptr(filename_.c_str(), channel_selector, queue);
labsat23_source_ = labsat23_make_source_sptr(filename_.c_str(), channel_selector, queue, digital_io_enabled);
DLOG(INFO) << "Item size " << item_size_;
DLOG(INFO) << "labsat23_source_(" << labsat23_source_->unique_id() << ")";
}

View File

@ -62,6 +62,7 @@ target_link_libraries(signal_source_gr_blocks
signal_source_libs
Boost::thread
PRIVATE
algorithms_libs
core_libs
Gflags::gflags
Glog::glog

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,8 @@
/*!
* \file labsat23_source.h
*
* \brief Unpacks the Labsat 2 (ls2) and (ls3) capture files
* \brief Unpacks capture files in the Labsat 2 (ls2), Labsat 3 (ls3), or Labsat
* 3 Wideband (LS3W) formats.
* \author Javier Arribas jarribas (at) cttc.es
*
* -----------------------------------------------------------------------------
@ -9,7 +10,7 @@
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
* This file is part of GNSS-SDR.
*
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
* Copyright (C) 2010-2021 (see AUTHORS file for a list of contributors)
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
@ -39,7 +40,8 @@ using labsat23_source_sptr = gnss_shared_ptr<labsat23_source>;
labsat23_source_sptr labsat23_make_source_sptr(
const char *signal_file_basename,
int channel_selector,
Concurrent_Queue<pmt::pmt_t> *queue);
Concurrent_Queue<pmt::pmt_t> *queue,
bool digital_io_enabled);
/*!
* \brief This class implements conversion between Labsat2 and 3 format byte packet samples to gr_complex
@ -58,15 +60,22 @@ private:
friend labsat23_source_sptr labsat23_make_source_sptr(
const char *signal_file_basename,
int channel_selector,
Concurrent_Queue<pmt::pmt_t> *queue);
Concurrent_Queue<pmt::pmt_t> *queue,
bool digital_io_enabled);
labsat23_source(const char *signal_file_basename,
int channel_selector,
Concurrent_Queue<pmt::pmt_t> *queue);
Concurrent_Queue<pmt::pmt_t> *queue,
bool digital_io_enabled);
std::string generate_filename();
void decode_samples_one_channel(int16_t input_short, gr_complex *out, int type);
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_one_channel(uint64_t input, gr_complex *out) const;
std::ifstream binary_input_file;
std::string d_signal_file_basename;
@ -78,6 +87,24 @@ private:
uint8_t d_ref_clock;
uint8_t d_bits_per_sample;
bool d_header_parsed;
// Data members for Labsat 3 Wideband
std::string d_ls3w_OSC;
int64_t d_ls3w_SMP{};
int32_t d_ls3w_QUA{};
int32_t d_ls3w_CHN{};
int32_t d_ls3w_SFT{};
int32_t d_ls3w_CFA{};
int32_t d_ls3w_CFB{};
int32_t d_ls3w_CFC{};
int32_t d_ls3w_BWA{};
int32_t d_ls3w_BWB{};
int32_t d_ls3w_BWC{};
int d_ls3w_spare_bits{};
int d_ls3w_selected_channel_offset{};
int d_ls3w_samples_per_register{};
bool d_is_ls3w = false;
bool d_ls3w_digital_io_enabled = false;
};