mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Fix reading of cell masks. They are not transmitted if the corresponding cell mask availability flag is zero
This commit is contained in:
parent
d61e0ff76d
commit
da9fa85631
@ -235,11 +235,26 @@ bool Has_Simple_Printer::print_message(const Galileo_HAS_data* const has_data)
|
||||
d_has_file << indent << indent << "Cell Mask Availability Flag: " << print_vector(has_data->cell_mask_availability_flag) << '\n';
|
||||
for (uint8_t i = 0; i < has_data->Nsys; i++)
|
||||
{
|
||||
const std::string text("Cell Mask " + std::to_string(i) + ": ");
|
||||
if (has_data->cell_mask_availability_flag[i] == true)
|
||||
{
|
||||
std::string text;
|
||||
if (has_data->gnss_id_mask[i] == 0)
|
||||
{
|
||||
text = "Cell Mask for GPS: ";
|
||||
}
|
||||
else if (has_data->gnss_id_mask[i] == 2)
|
||||
{
|
||||
text = "Cell Mask for Galileo: ";
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "Cell Mask for Reserved: ";
|
||||
}
|
||||
d_has_file << indent << indent << text;
|
||||
const std::string filler(indent.length() * 2 + text.length(), ' ');
|
||||
d_has_file << print_matrix(has_data->cell_mask[i], filler);
|
||||
}
|
||||
}
|
||||
d_has_file << indent << indent << "Nav message: " << print_vector(has_data->nav_message) << " (0: GPS LNAV or Galileo I/NAV)\n";
|
||||
|
||||
if (has_data->header.orbit_correction_flag == true)
|
||||
|
@ -413,6 +413,8 @@ void galileo_e6_has_msg_receiver::read_MT1_body(const std::string& message_body)
|
||||
d_cell_mask_availability_flag[d_HAS_data.header.mask_id][i] = d_HAS_data.cell_mask_availability_flag[i];
|
||||
message = std::string(message.begin() + 1, message.end());
|
||||
|
||||
if (d_HAS_data.cell_mask_availability_flag[i] == true)
|
||||
{
|
||||
int size_cell = ones_in_satellite_mask * ones_in_signal_mask;
|
||||
int pos = 0;
|
||||
for (int s = 0; s < ones_in_satellite_mask; s++)
|
||||
@ -424,6 +426,7 @@ void galileo_e6_has_msg_receiver::read_MT1_body(const std::string& message_body)
|
||||
}
|
||||
}
|
||||
message = std::string(message.begin() + size_cell, message.end());
|
||||
}
|
||||
|
||||
d_HAS_data.nav_message[i] = read_has_message_body_uint8(message.substr(0, HAS_MSG_NAV_MESSAGE_LENGTH));
|
||||
d_nav_message_mask[d_HAS_data.header.mask_id][i] = d_HAS_data.nav_message[i];
|
||||
|
Loading…
Reference in New Issue
Block a user