mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-08-06 22:04:07 +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 ##################
|
;######### GLOBAL OPTIONS ##################
|
||||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [Sps].
|
;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 ############
|
;######### SIGNAL_SOURCE CONFIG ############
|
||||||
SignalSource.implementation=UDP_Signal_Source
|
SignalSource.implementation=UDP_Signal_Source
|
||||||
@ -17,32 +18,37 @@ SignalSource.address=0.0.0.0
|
|||||||
SignalSource.port=1234
|
SignalSource.port=1234
|
||||||
SignalSource.payload_bytes=1024
|
SignalSource.payload_bytes=1024
|
||||||
SignalSource.sample_type=cbyte
|
SignalSource.sample_type=cbyte
|
||||||
SignalSource.RF_channels=2
|
SignalSource.RF_channels=1
|
||||||
SignalSource.dump=true
|
SignalSource.select_single_channel=1
|
||||||
|
SignalSource.channels_in_udp=2
|
||||||
|
SignalSource.IQ_swap=true
|
||||||
|
SignalSource.dump=false
|
||||||
SignalSource.dump_filename=./signal_source.dat
|
SignalSource.dump_filename=./signal_source.dat
|
||||||
|
|
||||||
|
|
||||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||||
SignalConditioner0.implementation=Pass_Through
|
SignalConditioner.implementation=Pass_Through
|
||||||
SignalConditioner1.implementation=Pass_Through
|
;SignalConditioner0.implementation=Pass_Through
|
||||||
|
;SignalConditioner1.implementation=Pass_Through
|
||||||
|
|
||||||
;######### CHANNELS GLOBAL CONFIG ############
|
;######### CHANNELS GLOBAL CONFIG ############
|
||||||
Channels_1C.count=2
|
Channels_1C.count=8
|
||||||
Channels.in_acquisition=1
|
Channels.in_acquisition=1
|
||||||
|
|
||||||
;# CHANNEL CONNECTION
|
;# CHANNEL CONNECTION
|
||||||
Channel0.RF_channel_ID=0
|
Channel.signal=1C
|
||||||
Channel0.signal=1C
|
;Channel0.RF_channel_ID=0
|
||||||
Channel1.RF_channel_ID=1
|
;Channel0.signal=1C
|
||||||
Channel1.signal=1C
|
;Channel1.RF_channel_ID=1
|
||||||
|
;Channel1.signal=1C
|
||||||
|
|
||||||
;######### ACQUISITION GLOBAL CONFIG ############
|
;######### ACQUISITION GLOBAL CONFIG ############
|
||||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||||
Acquisition_1C.item_type=gr_complex
|
Acquisition_1C.item_type=gr_complex
|
||||||
Acquisition_1C.threshold=20
|
Acquisition_1C.threshold=60
|
||||||
Acquisition_1C.use_CFAR_algorithm=false
|
Acquisition_1C.use_CFAR_algorithm=false
|
||||||
Acquisition_1C.blocking=true
|
Acquisition_1C.blocking=false
|
||||||
Acquisition_1C.doppler_max=10000
|
Acquisition_1C.doppler_max=5000
|
||||||
Acquisition_1C.doppler_step=250
|
Acquisition_1C.doppler_step=250
|
||||||
Acquisition_1C.dump=false
|
Acquisition_1C.dump=false
|
||||||
Acquisition_1C.dump_filename=./acq_dump.dat
|
Acquisition_1C.dump_filename=./acq_dump.dat
|
||||||
@ -51,7 +57,7 @@ Acquisition_1C.dump_filename=./acq_dump.dat
|
|||||||
;######### TRACKING GLOBAL CONFIG ############
|
;######### TRACKING GLOBAL CONFIG ############
|
||||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||||
Tracking_1C.item_type=gr_complex
|
Tracking_1C.item_type=gr_complex
|
||||||
Tracking_1C.dump=false
|
Tracking_1C.dump=true
|
||||||
Tracking_1C.dump_filename=./tracking_ch_
|
Tracking_1C.dump_filename=./tracking_ch_
|
||||||
Tracking_1C.pll_bw_hz=35.0;
|
Tracking_1C.pll_bw_hz=35.0;
|
||||||
Tracking_1C.dll_bw_hz=2.0;
|
Tracking_1C.dll_bw_hz=2.0;
|
||||||
|
@ -53,11 +53,12 @@ UDPSignalSource::UDPSignalSource(ConfigurationInterface* configuration,
|
|||||||
dump_filename_ = configuration->property(role + ".dump_filename",
|
dump_filename_ = configuration->property(role + ".dump_filename",
|
||||||
default_dump_file);
|
default_dump_file);
|
||||||
|
|
||||||
// rtl_tcp PARAMETERS
|
// network PARAMETERS
|
||||||
std::string default_address = "127.0.0.1";
|
std::string default_address = "127.0.0.1";
|
||||||
int default_port = 1234;
|
int default_port = 1234;
|
||||||
|
|
||||||
RF_channels_ = configuration->property(role + ".RF_channels", 1);
|
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);
|
channels_in_udp_= configuration->property(role + ".channels_in_udp", 1);
|
||||||
IQ_swap_= configuration->property(role + ".IQ_swap", false);
|
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());
|
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)));
|
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
|
//connect null sinks to unused streams
|
||||||
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++)
|
||||||
{
|
{
|
||||||
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
|
//disconnect null sinks to unused streams
|
||||||
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++)
|
||||||
{
|
{
|
||||||
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()
|
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)
|
gr::basic_block_sptr UDPSignalSource::get_right_block(int RF_channel)
|
||||||
|
@ -90,6 +90,7 @@ private:
|
|||||||
|
|
||||||
bool IQ_swap_;
|
bool IQ_swap_;
|
||||||
int RF_channels_;
|
int RF_channels_;
|
||||||
|
int select_single_channel_;
|
||||||
int channels_in_udp_;
|
int channels_in_udp_;
|
||||||
unsigned int in_stream_;
|
unsigned int in_stream_;
|
||||||
unsigned int out_stream_;
|
unsigned int out_stream_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user