1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-30 01:17:59 +00:00

[TAS-228] [FEAT] adapt osnma test vector to new navData passing

All tags either verified SUCCESSFULLY or Skipped.
Skipping issue still present.
This commit is contained in:
cesaaargm
2024-06-22 14:54:08 +02:00
parent f1e616c4e5
commit 849a900adf
2 changed files with 32 additions and 5 deletions

View File

@@ -121,10 +121,12 @@ void osnma_msg_receiver::msg_handler_osnma(const pmt::pmt_t& msg)
// iono data => 549 bits, utc data, 141 bits. // iono data => 549 bits, utc data, 141 bits.
if(nav_data.size() == 549) if(nav_data.size() == 549)
{ {
LOG(INFO) << "Galileo OSNMA: received ADKD=0/12 navData, PRN_d (" << PRNa << ") " << "TOW_sf=" << TOW <<std::endl;
d_satellite_nav_data[PRNa][TOW].ephemeris_iono_vector_2 = nav_data; d_satellite_nav_data[PRNa][TOW].ephemeris_iono_vector_2 = nav_data;
} }
else if(nav_data.size() == 141) else if(nav_data.size() == 141)
{ {
LOG(INFO) << "Galileo OSNMA: received ADKD=4 navData, PRN_d (" << PRNa << ") " << "TOW_sf=" << TOW <<std::endl;
d_satellite_nav_data[PRNa][TOW].utc_vector_2 = nav_data; d_satellite_nav_data[PRNa][TOW].utc_vector_2 = nav_data;
} }
else else
@@ -132,7 +134,7 @@ void osnma_msg_receiver::msg_handler_osnma(const pmt::pmt_t& msg)
} }
else else
{ {
LOG(WARNING) << "osnma_msg_receiver received an unknown object type!"; LOG(ERROR) << "osnma_msg_receiver received an unknown object type!";
} }
} }
catch (const wht::bad_any_cast& e) catch (const wht::bad_any_cast& e)
@@ -1286,7 +1288,7 @@ void osnma_msg_receiver::remove_verified_tags()
<< std::endl; << std::endl;
it = d_tags_awaiting_verify.erase(it); it = d_tags_awaiting_verify.erase(it);
} }
else if (it->second.skipped >= 10) else if (it->second.skipped >= 20)
{ {
LOG(INFO) << "Galileo OSNMA: Tag verification :: DELETE tag Id=" LOG(INFO) << "Galileo OSNMA: Tag verification :: DELETE tag Id="
<< it->second.tag_id << it->second.tag_id

View File

@@ -225,20 +225,32 @@ TEST_F(OsnmaMsgReceiverTest, OsnmaTestVectorsSimulation)
{3, {6, 122}}, {3, {6, 122}},
{4, {6, 120}}, {4, {6, 120}},
{5, {6, 67}}, {5, {6, 67}},
// TODO words 6 and 10 for TimingData
}; };
// Fill NavData bits -- Iterate over the extraction parameters // Fill NavData bits -- Iterate over the extraction parameters
std::string nav_data_ADKD_0_12 = "";
for (const auto& param : extractionParams) { for (const auto& param : extractionParams) {
uint8_t wordKey = param.first; uint8_t wordKey = param.first;
uint8_t start = param.second.first; uint8_t start = param.second.first;
uint8_t length = param.second.second; uint8_t length = param.second.second;
// Extract the required bits and fill osnma block // Extract the required bits and fill osnma block
osnmaMsg_sptr->EphemerisClockAndStatusData_2 += words[wordKey]. nav_data_ADKD_0_12 += words[wordKey].
to_string().substr( to_string().substr(
start, length); start, length);
} }
// send to osnma block
bool check_size_is_ok = nav_data_ADKD_0_12.size() == 549;
if(check_size_is_ok)
{
std::cout << "Galileo OSNMA: sending ADKD=0/12 navData, PRN_d (" << tv.svId << ") " << "TOW_sf=" << osnmaMsg_sptr->TOW_sf0 <<std::endl;
const auto tmp_obj_osnma = std::make_shared<std::tuple<uint32_t, std::string,uint32_t>>( // < PRNd , navDataBits, TOW_Sosf>
tv.svId,
nav_data_ADKD_0_12,
osnmaMsg_sptr->TOW_sf0);
osnma->msg_handler_osnma(pmt::make_any(tmp_obj_osnma));
}
} }
// check w6 && w10 is received => fill TimingData data vector // check w6 && w10 is received => fill TimingData data vector
@@ -252,6 +264,7 @@ TEST_F(OsnmaMsgReceiverTest, OsnmaTestVectorsSimulation)
{10, {86, 42}} {10, {86, 42}}
}; };
std::string nav_data_ADKD_4 = "";
// Fill NavData bits -- Iterate over the extraction parameters // Fill NavData bits -- Iterate over the extraction parameters
for (const auto& param : extractionParams) for (const auto& param : extractionParams)
{ {
@@ -260,9 +273,21 @@ TEST_F(OsnmaMsgReceiverTest, OsnmaTestVectorsSimulation)
uint8_t length = param.second.second; uint8_t length = param.second.second;
// Extract the required bits and fill osnma block // Extract the required bits and fill osnma block
osnmaMsg_sptr->TimingData_2 += words[wordKey].to_string().substr( nav_data_ADKD_4 += words[wordKey].to_string().substr(
start, length); start, length);
} }
// send to osnma block
bool check_size_is_ok = nav_data_ADKD_4.size() == 141;
if(check_size_is_ok)
{
std::cout << "Galileo OSNMA: sending ADKD=04 navData, PRN_d (" << tv.svId << ") " << "TOW_sf=" << osnmaMsg_sptr->TOW_sf0 <<std::endl;
const auto tmp_obj_osnma = std::make_shared<std::tuple<uint32_t, std::string,uint32_t>>( // < PRNd , navDataBits, TOW_Sosf>
tv.svId,
nav_data_ADKD_4,
osnmaMsg_sptr->TOW_sf0);
osnma->msg_handler_osnma(pmt::make_any(tmp_obj_osnma));
}
} }