0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-27 04:43:52 +01:00

i really don't think this wil lwork

This commit is contained in:
2025-03-11 20:32:17 +01:00
parent d05135efcd
commit 4e7b161e42
5 changed files with 13 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
{
"port": 13452,
"time": 1741711510603,
"time": 1741720487844,
"version": "0.0.3"
}

View File

@@ -2,7 +2,7 @@ import math
import io, os
import matplotlib.pyplot as plt
sample_rate = 9500
sample_rate = 4750
# next 2 funcs are modified from ChristopheJacquet's pydemod
def rrcosfilter(NumSamples):
@@ -57,6 +57,12 @@ def generate():
count = int(offset / 10**(len(str(offset)) - 1)) # 760 / 100 = 7
l = int(sample_rate / 1187.5) // 2 # 16/2 = 8
if l == 1: raise Exception("Sample rate too small")
if count*l < 2*l:
# idk from where is this
offset *= 2
offset += 3
count *= 4
l *= 2
print(f"{offset=} {count=} {l=}")
sample = [0.0] * (count*l)

View File

@@ -10,9 +10,9 @@
#define GROUP_LENGTH 4
#define BITS_PER_GROUP (GROUP_LENGTH * (BLOCK_SIZE + POLY_DEG))
#define RDS_SAMPLE_RATE 9500
#define SAMPLES_PER_BIT 8
#define FILTER_SIZE 24
#define RDS_SAMPLE_RATE 4750
#define SAMPLES_PER_BIT 4
#define FILTER_SIZE 32
#define SAMPLE_BUFFER_SIZE (SAMPLES_PER_BIT + FILTER_SIZE)
/* Text items

View File

@@ -6,5 +6,5 @@
Released under the GNU GPL v3 license.
*/
float waveform_biphase[24] = {0.002532628775852384, -6.480266785053461e-18, -0.004522551385450683, 2.807603181808536e-17, 0.00940690688173742, -2.1836329850641248e-17, -0.025868993924777907, -1.1701083086090883e-17, 0.1552139635486674, 0.4, 0.5432488724203361, 0.4, 0.0, -0.4, -0.5432488724203361, -0.4, -0.1552139635486674, 1.1701083086090883e-17, 0.025868993924777907, 2.1836329850641248e-17, -0.00940690688173742, -2.807603181808536e-17, 0.004522551385450683, 6.480266785053461e-18};
float waveform_biphase[32] = {0.00048792898537812, -0.0006259889636969852, 0.0008222549152560989, -0.0011115066443382834, 0.0015573307379464962, -0.0022850785947540293, 0.0035676349628880324, -0.006086822099947743, 0.011939535657589805, -0.030391545310228592, 0.16462087043040483, 0.5173798784955582, 0.1552139635486674, 0.0, -0.1552139635486674, -0.5173798784955582, -0.16462087043040483, 0.030391545310228592, -0.011939535657589805, 0.006086822099947743, -0.0035676349628880324, 0.0022850785947540293, -0.0015573307379464962, 0.0011115066443382834, -0.0008222549152560989, 0.0006259889636969852, -0.00048792898537812, 0.0003878864829215714, -0.0003135635627245806, 0.00025716303373497773, -0.00021357134703021155, 0.00017933642000528266};

View File

@@ -6,4 +6,4 @@
Released under the GNU GPL v3 license.
*/
extern float waveform_biphase[24];
extern float waveform_biphase[32];