mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-10-08 08:41:52 +00:00
Guard SBAS Viterbi startup traceback
Wait until the continuous decoder has accumulated the requested traceback depth before advancing trellis iterators. Add a regression test for the 30-bit SBAS input block versus its 35-bit traceback depth. Signed-off-by: miguekf <miguel.gomezlopez@uclm.es>
This commit is contained in:
@@ -101,6 +101,15 @@ float Viterbi_Decoder_Sbas::decode_continuous(const double sym[],
|
||||
|
||||
// do add compare select
|
||||
do_acs(sym, nbits_requested);
|
||||
// Keep accumulating trellis history until a complete traceback is
|
||||
// available. do_traceback() can clamp the requested depth, but
|
||||
// do_tb_and_decode() expects that same depth to be present and advances
|
||||
// its deque iterators by traceback_depth.
|
||||
if (traceback_depth > static_cast<int>(d_trellis_paths.size()))
|
||||
{
|
||||
nbits_decoded = 0;
|
||||
return d_indicator_metric;
|
||||
}
|
||||
// the ML sequence in the newest part of the trellis can not be decoded
|
||||
// since it depends on the future values -> traceback, but don't decode
|
||||
const int state = do_traceback(traceback_depth);
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ TEST(SbasL1TelemetryDecoderTest, TimestampMatchesFirstBitWhenFullyAligned)
|
||||
EXPECT_DOUBLE_EQ(first_bit_stamp_s, message_stamp_s);
|
||||
}
|
||||
|
||||
|
||||
TEST(SbasL1TelemetryDecoderTest, TimestampCorrectionIsBoundedBySymbolPeriod)
|
||||
{
|
||||
// The correction is always a whole number of code periods, and spans at
|
||||
|
||||
Reference in New Issue
Block a user