[hamradio-commits] [gnss-sdr] 205/236: Bug fix in L2CM CNAV message decoder. The decoder is still experimental.
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Tue Apr 26 16:02:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch next
in repository gnss-sdr.
commit 60b6b98c52f64d8cdeafddacaae778abd2d0be71
Author: Javier Arribas <javiarribas at gmail.com>
Date: Fri Apr 22 16:49:12 2016 +0200
Bug fix in L2CM CNAV message decoder. The decoder is still experimental.
---
...sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf | 5 ++++-
.../gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc | 13 ++++++-------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf
index 1857878..b8a3e9d 100644
--- a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf
+++ b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf
@@ -268,7 +268,9 @@ Resampler2.implementation=Pass_Through
;######### CHANNELS GLOBAL CONFIG ############
;#count: Number of available GPS satellite channels.
Channels_1C.count=1
-Channels_2S.count=7
+Channels_2S.count=8
+
+;#GPS.prns=7,8
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
Channels.in_acquisition=1
@@ -289,6 +291,7 @@ Channel4.RF_channel_ID=1
Channel5.RF_channel_ID=1
Channel6.RF_channel_ID=1
Channel7.RF_channel_ID=1
+Channel8.RF_channel_ID=1
;######### ACQUISITION GENERIC CONFIG ######
diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc
index 0bdece0..81494f9 100644
--- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc
+++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc
@@ -116,9 +116,6 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items __attribute__
const Gnss_Synchro *in = (const Gnss_Synchro *) input_items[0]; // input
Gnss_Synchro *out = (Gnss_Synchro *) output_items[0]; // output
- // store the time stamp of the first sample in the processed sample block
- //double sample_stamp = in[0].Tracking_timestamp_secs;
-
bool flag_new_cnav_frame = false;
int last_frame_preamble_start = 0;
// copy correlation samples into samples vector
@@ -131,7 +128,7 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items __attribute__
{
if (in[0].Flag_valid_symbol_output == false) // check if the tracking is locked
{
- //LOG(INFO)<< "Discarting channel "<<d_channel<<" tracking not ready!"<<std::endl;
+ LOG(INFO)<< "Discarting channel "<<d_channel<<" tracking not ready!"<<std::endl;
d_flag_valid_word = false;
}
else
@@ -152,14 +149,14 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items __attribute__
// they can be already aligned or shifted by one position
std::vector<int> bits;
- //bool symbol_alignment = d_symbol_aligner_and_decoder.get_bits(d_sample_buf, bits);
+ d_symbol_aligner_and_decoder.get_bits(d_sample_buf, bits);
//std::stringstream ss;
//for (std::vector<int>::const_iterator bit_it = bits.begin(); bit_it < bits.end(); ++bit_it)
// {
// ss << *bit_it;
// }
- // LOG(INFO) << "get_bits=" << ss.str() << std::endl;
+ //LOG(INFO) << "get_bits=" << ss.str() << std::endl;
// search for preambles
// and extract the corresponding message candidates
@@ -187,12 +184,14 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items __attribute__
d_flag_invert_input_symbols = d_flag_invert_buffer_symbols;
std::vector<int> tmp_msg;
std::string msg;
+ //todo: now the symbol buffer size is two CNAV frames because the preamble is not detected.
+ // Use the first valid frame to realign the bufer symbols with the preamble start and not miss a frame
LOG(INFO) << valid_msgs.size() << " GOOD L2C CNAV FRAME DETECTED! CH " <<this->d_channel;
for (unsigned int i = 0;i < valid_msgs.size(); i++)
{
tmp_msg = valid_msgs.at(i).second;
d_CNAV_Message.decode_page(tmp_msg);
- //std::cout << "Valid CNAV frame with relative preamble start at " << valid_msgs.at(i).first << std::endl;
+ std::cout << "Valid CNAV frame with relative preamble start at " << valid_msgs.at(i).first << std::endl;
flag_new_cnav_frame = true;
d_flag_valid_word = true;
last_frame_preamble_start = valid_msgs.at(i).first;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list