aboutsummaryrefslogtreecommitdiffstats
path: root/src/rtfwk/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtfwk/common.c')
-rw-r--r--src/rtfwk/common.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rtfwk/common.c b/src/rtfwk/common.c
index 0108025..a19b649 100644
--- a/src/rtfwk/common.c
+++ b/src/rtfwk/common.c
@@ -24,6 +24,7 @@
#include <osmocom/dsp/cxvec_math.h>
#include <osmocom/gmr1/sdr/defs.h>
+#include <osmocom/gmr1/sdr/metadata.h>
#include <osmocom/gmr1/sdr/pi4cxpsk.h>
#include "common.h"
@@ -45,7 +46,8 @@ win_map(struct osmo_cxvec *win,
int
burst_map(struct osmo_cxvec *burst,
float complex *data, int data_len, int base_align, int sps,
- struct gmr1_pi4cxpsk_burst *burst_type, int tn, int win)
+ struct gmr1_pi4cxpsk_burst *burst_type, int tn, int win,
+ struct gmr1_md_annotation *mda)
{
int begin, len;
int etoa;
@@ -59,6 +61,12 @@ burst_map(struct osmo_cxvec *burst,
osmo_cxvec_init_from_data(burst, &data[begin], len);
+ if (mda) {
+ gmr1_mda_add_field(mda, "core:sample_count", "%d", burst_type->len * sps);
+ gmr1_mda_add_field(mda, "core:freq_center", "%f", 31.25e3f);
+ gmr1_mda_add_field(mda, "core:freq_span", "%f", 31.25e3f);
+ }
+
return etoa;
}