mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-12 02:10:34 +00:00
Adding channel selector option in config if a single RF channel is used in UDP source
This commit is contained in:
parent
189cded82a
commit
9912acc4f8
@ -6,7 +6,8 @@
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [Sps].
|
||||
GNSS-SDR.internal_fs_sps=2600000
|
||||
;GNSS-SDR.internal_fs_sps=3312500
|
||||
GNSS-SDR.internal_fs_sps=2650000
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=UDP_Signal_Source
|
||||
@ -17,32 +18,37 @@ SignalSource.address=0.0.0.0
|
||||
SignalSource.port=1234
|
||||
SignalSource.payload_bytes=1024
|
||||
SignalSource.sample_type=cbyte
|
||||
SignalSource.RF_channels=2
|
||||
SignalSource.dump=true
|
||||
SignalSource.RF_channels=1
|
||||
SignalSource.select_single_channel=1
|
||||
SignalSource.channels_in_udp=2
|
||||
SignalSource.IQ_swap=true
|
||||
SignalSource.dump=false
|
||||
SignalSource.dump_filename=./signal_source.dat
|
||||
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner0.implementation=Pass_Through
|
||||
SignalConditioner1.implementation=Pass_Through
|
||||
SignalConditioner.implementation=Pass_Through
|
||||
;SignalConditioner0.implementation=Pass_Through
|
||||
;SignalConditioner1.implementation=Pass_Through
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=2
|
||||
Channels_1C.count=8
|
||||
Channels.in_acquisition=1
|
||||
|
||||
;# CHANNEL CONNECTION
|
||||
Channel0.RF_channel_ID=0
|
||||
Channel0.signal=1C
|
||||
Channel1.RF_channel_ID=1
|
||||
Channel1.signal=1C
|
||||
Channel.signal=1C
|
||||
;Channel0.RF_channel_ID=0
|
||||
;Channel0.signal=1C
|
||||
;Channel1.RF_channel_ID=1
|
||||
;Channel1.signal=1C
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.threshold=20
|
||||
Acquisition_1C.threshold=60
|
||||
Acquisition_1C.use_CFAR_algorithm=false
|
||||
Acquisition_1C.blocking=true
|
||||
Acquisition_1C.doppler_max=10000
|
||||
Acquisition_1C.blocking=false
|
||||
Acquisition_1C.doppler_max=5000
|
||||
Acquisition_1C.doppler_step=250
|
||||
Acquisition_1C.dump=false
|
||||
Acquisition_1C.dump_filename=./acq_dump.dat
|
||||
@ -51,7 +57,7 @@ Acquisition_1C.dump_filename=./acq_dump.dat
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.dump=false
|
||||
Tracking_1C.dump=true
|
||||
Tracking_1C.dump_filename=./tracking_ch_
|
||||
Tracking_1C.pll_bw_hz=35.0;
|
||||
Tracking_1C.dll_bw_hz=2.0;
|
||||
|
@ -53,11 +53,12 @@ UDPSignalSource::UDPSignalSource(ConfigurationInterface* configuration,
|
||||
dump_filename_ = configuration->property(role + ".dump_filename",
|
||||
default_dump_file);
|
||||
|
||||
// rtl_tcp PARAMETERS
|
||||
// network PARAMETERS
|
||||
std::string default_address = "127.0.0.1";
|
||||
int default_port = 1234;
|
||||
|
||||
RF_channels_ = configuration->property(role + ".RF_channels", 1);
|
||||
select_single_channel_ = configuration->property(role + ".select_single_channel", 0);
|
||||
channels_in_udp_= configuration->property(role + ".channels_in_udp", 1);
|
||||
IQ_swap_= configuration->property(role + ".IQ_swap", false);
|
||||
|
||||
@ -90,9 +91,9 @@ UDPSignalSource::UDPSignalSource(ConfigurationInterface* configuration,
|
||||
float_to_complex_.push_back(gr::blocks::float_to_complex::make());
|
||||
}
|
||||
|
||||
if (channels_in_udp_>=RF_channels_)
|
||||
if (channels_in_udp_>RF_channels_)
|
||||
{
|
||||
for (int n = 0; n < (channels_in_udp_-RF_channels_); n++)
|
||||
for (int n = 0; n < channels_in_udp_; n++)
|
||||
{
|
||||
null_sinks_.push_back(gr::blocks::null_sink::make(sizeof(gr_complex)));
|
||||
}
|
||||
@ -149,9 +150,9 @@ void UDPSignalSource::connect(gr::top_block_sptr top_block)
|
||||
//connect null sinks to unused streams
|
||||
if (channels_in_udp_>RF_channels_)
|
||||
{
|
||||
for (int n = 0; n < (channels_in_udp_-RF_channels_); n++)
|
||||
for (int n = 0; n < channels_in_udp_; n++)
|
||||
{
|
||||
top_block->connect(float_to_complex_.at(RF_channels_+n),0,null_sinks_.at(n),0);
|
||||
top_block->connect(float_to_complex_.at(n),0,null_sinks_.at(n),0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,9 +193,9 @@ void UDPSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
//disconnect null sinks to unused streams
|
||||
if (channels_in_udp_>RF_channels_)
|
||||
{
|
||||
for (int n = 0; n < (channels_in_udp_-RF_channels_); n++)
|
||||
for (int n = 0; n < channels_in_udp_; n++)
|
||||
{
|
||||
top_block->disconnect(float_to_complex_.at(RF_channels_+n),0,null_sinks_.at(n),0);
|
||||
top_block->disconnect(float_to_complex_.at(n),0,null_sinks_.at(n),0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -221,7 +222,7 @@ gr::basic_block_sptr UDPSignalSource::get_left_block()
|
||||
|
||||
gr::basic_block_sptr UDPSignalSource::get_right_block()
|
||||
{
|
||||
return get_right_block(0);
|
||||
return get_right_block(select_single_channel_);
|
||||
}
|
||||
|
||||
gr::basic_block_sptr UDPSignalSource::get_right_block(int RF_channel)
|
||||
|
@ -90,6 +90,7 @@ private:
|
||||
|
||||
bool IQ_swap_;
|
||||
int RF_channels_;
|
||||
int select_single_channel_;
|
||||
int channels_in_udp_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
|
Loading…
Reference in New Issue
Block a user