1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2026-04-20 22:01:27 +00:00

- Galileo channels now supports all the published PRN IDs in acquisition and tracking

- Changes in Galileo telemetry decoding (still under construction)
- Bug correction in tracking blocks that could cause random segmentation faults on some configurations

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@431 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Javier Arribas
2013-10-25 16:07:24 +00:00
parent 0f79be7e77
commit 4d66f6c6ab
13 changed files with 492 additions and 148 deletions

View File

@@ -364,11 +364,11 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
//2. Add the telemetry decoder information
if (this->d_flag_preamble==true and d_nav.flag_TOW_set==true) //update TOW at the preamble instant (todo: check for valid d_TOW) //flag preamble is true after the all page (even or odd) is recevived
{
std::cout<<"time stamp, identified preamble and TOW set" << std::endl;
//std::cout<<"time stamp, identified preamble and TOW set" << std::endl;
Prn_timestamp_at_preamble_ms = in[0][0].Tracking_timestamp_secs * 1000.0;
if((d_nav.flag_TOW_5 == 1) and (d_nav.Page_type_time_stamp == 5)) //page 5 arrived and decoded, so we are in the odd page (since Tow refers to the even page, we have to add 1 sec)
{
std::cout<< "Using TOW_5 for timestamping" << std::endl;
//std::cout<< "Using TOW_5 for timestamping" << std::endl;
d_TOW_at_Preamble = d_nav.TOW_5+GALILEO_PAGE_SECONDS; //TOW_5 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later
std::cout << "d_TOW_at_Preamble="<< d_TOW_at_Preamble<< std::endl;
/* 1 sec (GALILEO_INAV_PAGE_PART_SYMBOLS*GALIELO_E1_CODE_PERIOD) is added because if we have a TOW value it means that we are at the and of the odd page*/
@@ -380,11 +380,11 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
else if((d_nav.flag_TOW_6 == 1) and (d_nav.Page_type_time_stamp == 6)) //page 6 arrived and decoded, so we are in the odd page (since Tow refers to the even page, we have to add 1 sec)
{
std::cout<< "Using TOW_6 for timestamping" << std::endl;
//std::cout<< "Using TOW_6 for timestamping" << std::endl;
d_TOW_at_Preamble = d_nav.TOW_6+GALILEO_PAGE_SECONDS; //TOW_5 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later
std::cout << "d_TOW_at_Preamble="<< d_TOW_at_Preamble<< std::endl;
//std::cout << "d_TOW_at_Preamble="<< d_TOW_at_Preamble<< std::endl;
d_TOW_at_current_symbol = d_TOW_at_Preamble + GALILEO_INAV_PAGE_PART_SYMBOLS*GALIELO_E1_CODE_PERIOD;
std::cout << "d_TOW_at_current_symbol="<< d_TOW_at_current_symbol << std::endl;
//std::cout << "d_TOW_at_current_symbol="<< d_TOW_at_current_symbol << std::endl;
d_nav.flag_TOW_6 = 0;
}
@@ -393,12 +393,12 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
else
{
d_TOW_at_Preamble = d_TOW_at_Preamble + GALILEO_PAGE_SECONDS; //this is the even preamble after the last odd preamble
std::cout << "d_TOW_at_Preamble="<< d_TOW_at_Preamble << std::endl;
//std::cout << "d_TOW_at_Preamble="<< d_TOW_at_Preamble << std::endl;
d_TOW_at_current_symbol = d_TOW_at_Preamble + GALILEO_INAV_PAGE_PART_SYMBOLS*GALIELO_E1_CODE_PERIOD;
std::cout << "d_TOW_at_current_symbol="<< d_TOW_at_current_symbol << std::endl;
//std::cout << "d_TOW_at_current_symbol="<< d_TOW_at_current_symbol << std::endl;
}
std::cout << "Prn_timestamp_at_preamble_ms ="<< Prn_timestamp_at_preamble_ms << std::endl;
//std::cout << "Prn_timestamp_at_preamble_ms ="<< Prn_timestamp_at_preamble_ms << std::endl;
}
@@ -408,14 +408,16 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
//std::cout << "d_TOW_at_current_symbol="<< d_TOW_at_current_symbol << std::endl;
}
if (d_flag_frame_sync == true and d_nav.flag_TOW_set==true and d_nav.flag_CRC_test == true)
//if (d_flag_frame_sync == true and d_nav.flag_TOW_set==true and d_nav.flag_CRC_test == true)
if (d_flag_frame_sync == true and d_nav.flag_TOW_set==true)
{
current_synchro_data.Flag_valid_word = true;
}else{
current_synchro_data.Flag_valid_word = false;
}
current_synchro_data.d_TOW = d_TOW_at_Preamble;
current_synchro_data.d_TOW_at_current_symbol = d_TOW_at_current_symbol;
//current_synchro_data.Flag_valid_word = true;
//current_synchro_data.Flag_valid_word = (d_flag_frame_sync == true and d_nav.flag_TOW_set==true and d_nav.flag_CRC_test == true);
current_synchro_data.Flag_preamble = d_flag_preamble;
current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0;
@@ -434,7 +436,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
tmp_double = d_TOW_at_Preamble;
d_dump_file.write((char*)&tmp_double, sizeof(double));
}
catch (std::ifstream::failure e)
catch (const std::ifstream::failure& e)
{
std::cout << "Exception writing observables dump file " << e.what() << std::endl;
}