1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2026-05-28 16:22:13 +00:00

Test more PRNs in QZSS tests

This commit is contained in:
Carles Fernandez
2026-02-24 20:53:40 +01:00
parent 41d60dfd2b
commit cdc3207606
@@ -49,6 +49,29 @@ TEST(QzssL1Code, GoldenFirst32Chips)
{
EXPECT_FLOAT_EQ(code[i], golden[i]);
}
constexpr uint32_t prn2 = 195;
qzss_l1_code_gen_float(code, prn2);
const float golden2[32] = {
-1, -1, -1, -1, -1, 1, 1, -1,
-1, -1, -1, 1, -1, 1, -1, 1,
1, 1, 1, 1, -1, -1, 1, 1,
-1, -1, 1, -1, 1, 1, -1, -1};
for (int i = 0; i < 32; ++i)
{
EXPECT_FLOAT_EQ(code[i], golden2[i]);
}
constexpr uint32_t prn3 = 199;
qzss_l1_code_gen_float(code, prn3);
const float golden3[32] = {
1, -1, -1, -1, 1, -1, 1, -1,
-1, -1, -1, -1, 1, -1, -1, -1,
-1, 1, -1, -1, 1, -1, -1, -1,
-1, 1, 1, 1, -1, 1, -1, -1};
for (int i = 0; i < 32; ++i)
{
EXPECT_FLOAT_EQ(code[i], golden3[i]);
}
}
@@ -67,6 +90,19 @@ TEST(QzssL5Code, L5IGoldenFirst32Chips)
{
EXPECT_FLOAT_EQ(code[i], golden[i]);
}
qzss_l5i_code_gen_float(code, 199);
const float golden2[32] = {
1, 1, -1, 1, 1, -1, 1, -1,
-1, 1, -1, 1, -1, -1, -1, -1,
1, 1, -1, 1, -1, -1, -1, 1,
-1, 1, 1, 1, 1, -1, 1, -1};
for (int i = 0; i < 32; ++i)
{
EXPECT_FLOAT_EQ(code[i], golden2[i]);
}
}
@@ -85,4 +121,17 @@ TEST(QzssL5Code, L5QGoldenFirst32Chips)
{
EXPECT_FLOAT_EQ(code[i], golden[i]);
}
qzss_l5q_code_gen_float(code, 199);
const float golden2[32] = {
-1, 1, 1, 1, -1, -1, -1, 1,
1, -1, -1, 1, 1, 1, 1, -1,
-1, -1, -1, -1, -1, 1, 1, 1,
-1, 1, 1, -1, 1, -1, -1, 1};
for (int i = 0; i < 32; ++i)
{
EXPECT_FLOAT_EQ(code[i], golden2[i]);
}
}