From 3d86bde405e4f78802c4331343ce9906f5a8d249 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 2 Jun 2023 12:25:50 +0200 Subject: [PATCH] Add work on OSNMA Rx --- src/core/libs/osnma_msg_receiver.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/libs/osnma_msg_receiver.cc b/src/core/libs/osnma_msg_receiver.cc index 089a7f0a6..684a06000 100644 --- a/src/core/libs/osnma_msg_receiver.cc +++ b/src/core/libs/osnma_msg_receiver.cc @@ -256,7 +256,12 @@ void osnma_msg_receiver::process_dsm_message(const std::vector& dsm_msg { d_osnma_data.d_dsm_kroot_message.ds[k] = dsm_msg[13 + bytes_lk + k]; } - uint16_t l_pdk_bytes = (l_ds_bytes - 13 - bytes_lk - l_ds_bytes); + uint16_t l_dk_bits = get_l_dk_bits(d_osnma_data.d_dsm_kroot_message.nb_dk); + uint16_t l_dk_bytes = l_dk_bits / 8; + LOG(WARNING) << "dk_bits=" << static_cast(l_dk_bits); + LOG(WARNING) << "dk_bytes=" << static_cast(l_dk_bytes); + + uint16_t l_pdk_bytes = (l_dk_bytes - 13 - bytes_lk - l_ds_bytes); LOG(WARNING) << "pdk_bytes=" << static_cast(l_pdk_bytes); d_osnma_data.d_dsm_kroot_message.p_dk = std::vector(l_pdk_bytes, 0); for (uint16_t k = 0; k < l_ds_bytes; k++)