1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-06 10:13:04 +00:00

Improve memory allocation, allow running when compiled in ASAN mode

Control if GNSS ID have no definition when reading the orbit correction block
This commit is contained in:
Carles Fernandez
2021-09-25 16:44:07 +02:00
parent 8d3548cae9
commit 010069b86a
3 changed files with 33 additions and 18 deletions

View File

@@ -92,6 +92,7 @@ constexpr uint16_t HAS_MSG_NUMBER_MAX_TOH = 3599;
constexpr uint8_t HAS_MSG_GPS_SYSTEM = 0; // Table 8 ICD v1.2
constexpr uint8_t HAS_MSG_GALILEO_SYSTEM = 2; // Table 8 ICD v1.2
constexpr uint8_t HAS_MSG_WRONG_SYSTEM = 255;
const std::pair<int32_t, int32_t> GALILEO_HAS_STATUS({1, 2});
const std::pair<int32_t, int32_t> GALILEO_HAS_RESERVED({3, 2});

View File

@@ -386,7 +386,6 @@ std::vector<std::string> Galileo_HAS_data::get_signals_in_mask(uint8_t nsys) con
uint8_t Galileo_HAS_data::get_gnss_id(int nsat) const
{
uint8_t gnss_id_ = 0;
int number_sats = 0;
for (uint8_t i = 0; i < Nsys; i++)
{
@@ -397,5 +396,5 @@ uint8_t Galileo_HAS_data::get_gnss_id(int nsat) const
}
}
return gnss_id_;
return HAS_MSG_WRONG_SYSTEM;
}