From a209bcc97932ce4b062633e434490e106ce5d77c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 1 Apr 2021 14:29:46 +0200 Subject: [PATCH] Clean the constructor --- src/core/system_parameters/reed_solomon.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/system_parameters/reed_solomon.cc b/src/core/system_parameters/reed_solomon.cc index 45d97a55c..e78259be9 100644 --- a/src/core/system_parameters/reed_solomon.cc +++ b/src/core/system_parameters/reed_solomon.cc @@ -20,9 +20,10 @@ #include #include + ReedSolomon::ReedSolomon(const std::string& gnss_signal) { - if (gnss_signal.empty() or gnss_signal == "E6B") + if (gnss_signal.empty() || gnss_signal == "E6B") { d_nroots = 223; // number of parity symbols in a block d_min_poly = 29; // minimal poly @@ -292,8 +293,7 @@ ReedSolomon::ReedSolomon(const std::string& gnss_signal) d_genpoly_coeff = {88, 216, 195, 23, 111, 82, 79, 81, 62, 120, 249, 250, 11, 134, 209, 116, 69, 170, 208, 45, 249, 223, 4, 19, 120, 81, 182, 217, 44, 65, 93, 34, 118, 227, 112, 28, 65, 48, 244, 165, 242, 216, 121, 50, 171, 32, 217, 166, 133, 134, 4, 120, 54, 42, 13, 24, 95, 228, 173, 247, 80, 42, 89, 68, 81, 181, 112, 51, 118, 108, 243, 223, 18, 38, 230, 1, 28, 109, 131, 14, 234, 151, 21, 108, 7, 176, 236, 147, 175, 183, 66, 35, 178, 243, 36, 115, 255, 51, 36, 6, 120, 163, 59, 9, 214, 102, 109, 253, 152, 137, 1, 144, 124, 241, 143, 71, 91, 227, 28, 174, 13, 157, 78, 20, 192, 64, 130, 45, 39, 46, 229, 171, 193, 252, 43, 165, 88, 180, 179, 183, 88, 99, 219, 52, 210, 33, 160, 146, 22, 255, 111, 159, 7, 237, 145, 194, 68, 89, 231, 201, 224, 127, 5, 27, 112, 71, 165, 204, 236, 122, 119, 49, 212, 216, 151, 149, 53, 249, 57, 136, 85, 14, 19, 128, 135, 177, 179, 189, 164, 98, 220, 99, 241, 230, 188, 170, 148, 97, 121, 31, 253, 134, 43, 199, 81, 137, 82, 54, 47, 216, 172, 169, 123, 246, 153, 169, 32, 86, 128, 83, 5, 252, 251, 1}; } - - if (gnss_signal == "E1B") + else if (gnss_signal == "E1B") { d_nroots = 60; d_min_poly = 29; @@ -426,8 +426,7 @@ ReedSolomon::ReedSolomon(const std::string& gnss_signal) d_genpoly_coeff = {1, 208, 42, 48, 76, 19, 41, 108, 167, 235, 166, 244, 186, 18, 124, 251, 79, 193, 14, 154, 6, 118, 19, 3, 122, 9, 187, 42, 131, 46, 66, 65, 62, 94, 101, 45, 214, 141, 131, 230, 102, 20, 63, 202, 36, 23, 188, 88, 169, 62, 73, 88, 152, 197, 231, 58, 101, 154, 190, 91, 193}; } - - if (!gnss_signal.empty() && ((gnss_signal != "E6B") && gnss_signal != "E1B")) + else { std::cerr << "Unknown Reead Solomon configuration. Setting basic defaults for Galileo E6B.\n"; // Set E6B parameters by default