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:
miguekf
2026-08-04 23:05:33 +02:00
committed by kalmancito
parent 68bac23bcb
commit ef7df8f5ad
2 changed files with 9 additions and 1 deletions
@@ -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);
@@ -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