FSK modulator improvements

1. Phase is now changed proportional to the time of the bit change, if
   it happens somewhere between samples. The amount of phase change per
   bit is now the same for all bits, no matter how many samples
   currently lay inside this bit.

2. IIR filter is removed, because it causes distortions. A cosine shape
   is now used to transit between phase change of F0 to F1 and vice
   versa. This limits the spectrum. This filter is optional.
This commit is contained in:
Andreas Eversberg
2022-12-16 10:18:19 +01:00
parent 7609e98b8f
commit fd3b4dae50
6 changed files with 137 additions and 50 deletions

View File

@@ -314,7 +314,7 @@ int send_sto(am791x_t *am791x, sample_t *sample, int length)
/* modulate STO */
phaseshift = am791x->sto_phaseshift65536;
while (count < length && fsk->tx_bitpos < 1.0) {
while (count < length) {
sample[count++] = fsk->sin_tab[(uint16_t)phase];
phase += phaseshift;
if (phase >= 65536.0)