From c67dcc81701810c069cfc7276856491f66f76da6 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Thu, 15 Aug 2024 21:52:56 +0200 Subject: [PATCH] C-Netz: Use raised cosine to shape data signal --- src/cnetz/dsp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/cnetz/dsp.c b/src/cnetz/dsp.c index af29c62..3fd4cae 100644 --- a/src/cnetz/dsp.c +++ b/src/cnetz/dsp.c @@ -87,13 +87,8 @@ static void dsp_init_ramp(cnetz_t *cnetz) LOGP(DDSP, LOGL_DEBUG, "Generating smooth ramp table.\n"); for (i = 0; i < 256; i++) { - /* use square-root of cosine ramp. tests showed that phones are more - * happy with that. (This is not correct pulse shaping!) */ + /* Use raised cosine ramp. */ c = cos((double)i / 256.0 * PI); - if (c < 0) - c = -sqrt(-c); - else - c = sqrt(c); cnetz->fsk_ramp_down[i] = c * (double)cnetz->fsk_deviation; cnetz->fsk_ramp_up[i] = -cnetz->fsk_ramp_down[i]; }