I needed a quick vector display to test my QPSK modulator...
Well, eh, that SEEMED simple, with the sdr_rtl USB sticks you can record IQ signals at almost any frequency... So just display...
When you do rtl_sdr -f 107200000 testfile.iq you get a VERY long (2.048 Msamples / second, or 4.096 MB/second) recording of that frequency.
So I thought I just hack some of my xpse spectrum analyzer code to display XY as IQ....
It did not work, and had a night sleep about it usually helps...
So this morning I wrote the few magical lines of code, you find at the bottom of this story, this uses 'idle_cb' in the xforms (libforms) GUI package;
It works very nice, and it is slow, and that is the magic. Once I appreciated that, I added an extra delay...
See it working on youtube:
This recording shows the error in my QPSK modulator I was after:
The interesting new thing about this 'tool', is that
1) you can play slow motion. 2) you can start at any point in the recording using dd: dd if=my_recording.iq bs=1000000 skip=10 | xpvs That skips 10 MB, and shows what is happening there..I really wonder if any tool like this even exists! Probably for a small fortune!
I will probably make xpve available under GPL later, it always takes some time to make a package.
I like this word: Probably', it reminds me of Feynman photons.
The magical lines of code I accidently wrote this morning: ;-)
int idle_cb(XEvent *ev, void *data) { int i, q; double di, dq;
// get I and Q from stdin i = fgetc(stdin); if(feof(stdin) ) return 0;
q = fgetc(stdin); if(feof(stdin) ) return 0;
// make signed di = i - 127.0; dq = q - 127.0;
// debug //fprintf(stderr, "i=%d q=%d\n", i, q); //fprintf(stderr, "di=%f dq=%f\n", di, dq);
/* w magical lines */ fx[0] = di; //