From 1f6c950dae7ef407cbf724bc7b14a7b63118eb25 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 14 Sep 2021 10:00:24 +0200 Subject: [PATCH] SRSUE: Fix speed and distance from TA metrics --- srsue/src/phy/sync.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/srsue/src/phy/sync.cc b/srsue/src/phy/sync.cc index c8fd3a81c..4acf03daf 100644 --- a/srsue/src/phy/sync.cc +++ b/srsue/src/phy/sync.cc @@ -492,9 +492,11 @@ void sync::run_camping_in_sync_state(lte::sf_worker* lte_worker, Debug("SYNC: Worker %d synchronized", lte_worker->get_id()); // Collect and provide metrics from last successful sync - metrics.sfo = sfo; - metrics.cfo = cfo; - metrics.ta_us = worker_com->ta.get_usec(); + metrics.sfo = sfo; + metrics.cfo = cfo; + metrics.ta_us = worker_com->ta.get_usec(); + metrics.distance_km = worker_com->ta.get_km(); + metrics.speed_kmph = worker_com->ta.get_speed_kmph(tti); for (uint32_t i = 0; i < worker_com->args->nof_lte_carriers; i++) { worker_com->set_sync_metrics(i, metrics); }