1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-07 07:50:32 +00:00

Log ISM data

This commit is contained in:
Carles Fernandez 2024-09-21 07:39:24 +02:00
parent de6f991811
commit f6f58fd45e
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 29 additions and 5 deletions

View File

@ -1332,7 +1332,7 @@ int32_t Galileo_Inav_Message::page_jk_decoder(const char* data_jk)
gal_ism.set_ism_service_level_id(ism_service_level_id);
if (ism_constellation_id == 0)
{
DLOG(INFO) << "I/NAV ARAIM Integrity Support Message in Test";
LOG(INFO) << "I/NAV ARAIM Integrity Support Message in Test";
}
if (ism_constellation_id == 1)
{
@ -1348,6 +1348,17 @@ int32_t Galileo_Inav_Message::page_jk_decoder(const char* data_jk)
gal_ism.set_ism_ure(read_octet_unsigned(data_jk_bits, ISM_URE_BIT));
gal_ism.set_ism_bnom(read_octet_unsigned(data_jk_bits, ISM_BNOM_BIT));
gal_ism.set_ism_Tvalidity(read_octet_unsigned(data_jk_bits, ISM_TVALIDITY_BIT));
LOG(INFO) << "I/NAV ARAIM Integrity Support Message: "
<< "WN_ISM=" << static_cast<uint32_t>(gal_ism.get_WN_ISM()) << ", "
<< "t0_ISM=" << static_cast<uint32_t>(gal_ism.get_t0_ISM()) << ", "
<< "Mask_MSB_ISM=" << static_cast<uint32_t>(gal_ism.get_ism_mask_msb()) << ", "
<< "Mask_ISM=" << gal_ism.get_mask_ISM() << ", "
<< "Pconst=" << gal_ism.get_pconst_value() << ", "
<< "Psat=" << gal_ism.get_psat_value() << ", "
<< "URA=" << gal_ism.get_ura_m() << " [m], "
<< "URE=" << gal_ism.get_ure_m() << " [m], "
<< "Bnom=" << gal_ism.get_bnom_m() << " [m], "
<< "Tvalidity=" << static_cast<uint32_t>(gal_ism.get_Tvalidity_hours()) << " [h]";
}
}
}

View File

@ -129,6 +129,12 @@ double Galileo_ISM::get_psat_value() const
}
bool Galileo_ISM::get_ism_mask_msb() const
{
return ism_mask_msb;
}
float Galileo_ISM::get_ura_m() const
{
auto it = ISM_URA_MAP.find(this->ism_ura);
@ -151,6 +157,12 @@ float Galileo_ISM::get_ure_m() const
}
uint32_t Galileo_ISM::get_mask_ISM() const
{
return ism_mask;
}
float Galileo_ISM::get_bnom_m() const
{
auto it = ISM_BNOM_MAP.find(this->ism_bnom);
@ -175,7 +187,7 @@ uint16_t Galileo_ISM::get_Tvalidity_hours() const
bool Galileo_ISM::check_ism_crc(const std::bitset<GALILEO_DATA_JK_BITS>& bits)
{
std::bitset<96> extracted;
std::bitset<GALILEO_ISM_CRC_DATA_BITS> extracted;
for (int32_t i = 0; i < GALILEO_ISM_CRC_DATA_BITS; ++i)
{
extracted[i] = bits[i + 32];
@ -208,6 +220,5 @@ bool Galileo_ISM::check_ism_crc(const std::bitset<GALILEO_DATA_JK_BITS>& bits)
uint32_t Galileo_ISM::compute_crc(const std::vector<uint8_t>& data)
{
crc32_ism.process_bytes(data.data(), data.size());
uint32_t result = crc32_ism.checksum();
return result;
return crc32_ism.checksum();
}

View File

@ -66,13 +66,15 @@ public:
float get_ura_m() const;
float get_ure_m() const;
float get_bnom_m() const;
uint32_t get_mask_ISM() const;
uint16_t get_WN_ISM() const;
uint16_t get_t0_ISM() const;
uint16_t get_Tvalidity_hours() const;
bool get_ism_mask_msb() const;
private:
boost::crc_basic<32> crc32_ism;
uint32_t compute_crc(const std::vector<uint8_t>& data);
boost::crc_basic<32> crc32_ism;
// ICD 2.1 Table 97
std::unordered_map<uint8_t, double> ISM_PCONST_MAP = {