You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have modified this code to print input symbol and output symbol before modulation and after demodulation, in a loop, but demodulator output does not match with the input. Here is the code. Any idea whats going wrong
int main() {
// options
unsigned int k = 10; // filter samples/symbol
unsigned int m = 7; // filter delay (symbols)
float BT = 0.25f; // bandwidth-time product
// create modulator/demodulator objects
gmskmod mod = gmskmod_create(k, m, BT);
gmskdem demod = gmskdem_create(k, m, BT);
unsigned int i;
unsigned int sym_in; // input data symbol
float complex x[k]; // modulated samples
unsigned int sym_out; // demodulated data symbol
int n=0;
while(n<20)
{
n++;
// generate random symbol {0,1}
sym_in = rand() % 2;
printf("Input symbol=%d\n",sym_in);
// modulate
gmskmod_modulate(mod, sym_in, x);
//for(int a=0; a<k; a++)
// printf("output_complex real=%f img=%f\n",creal(x[a]),cimag(x[a]));
// demodulate
gmskdem_demodulate(demod, x, &sym_out);
printf("output_decoded=%d\n \n",sym_out);
}
// destroy modem objects
gmskmod_destroy(mod);
gmskdem_destroy(demod);
}
The text was updated successfully, but these errors were encountered:
I have modified this code to print input symbol and output symbol before modulation and after demodulation, in a loop, but demodulator output does not match with the input. Here is the code. Any idea whats going wrong
The text was updated successfully, but these errors were encountered: