cubehub / doppler

Command line utility that takes IQ data stream as input and produces doppler corrected output stream based on TLE
MIT License
51 stars 13 forks source link

Using doppler on GQRX raw files #10

Open RYNEQ opened 2 years ago

RYNEQ commented 2 years ago

I'm trying to use doppler on GQRX's raw files like this:

cat gqrx_20220804_154702_137100000_80000_fc.raw | doppler track --frequency 137100000 -i f32 -o f32 -s 80000 --time 2022-08-04T15:47:02 --tlefile weather-tle.txt --tlename 'NOAA 19' --location lat=x,lon=x,alt=x > fixed.raw

But resulting file is neither playable in GQRX nor SDR++

I tried to convert resulting file to i16 format using sox:

sox -t raw -e floating-point -b 32 -c 2 -r 80000 fixed.wav -t raw -e signed-integer -b 16 -c 2 -r 80000 fixed_i16.raw

and i got:

sox WARN dither: dither clipped 34814543 samples; decrease volume?
sox WARN sox: `dop.wav' input clipped 39521951 samples

while before the doppler shift there was no problem with this command

As I know GQRX records raw file in little endian float 32 bit, 2 channel IQ file (one for I and one for Q)

What is the problem?

andresv commented 2 years ago

Haven't used it quite some time. However could you share your gqrx_20220804_154702_137100000_80000_fc.raw maybe I have a chance to look into it.

RYNEQ commented 2 years ago

Haven't used it quite some time. However could you share your gqrx_20220804_154702_137100000_80000_fc.raw maybe I have a chance to look into it.

Thank you, Here is the gqrx_20220804_154702_137100000_80000_fc.raw: https://mega.nz/file/E2BjBICR#QTBmv8v_jh7lXGBEb4FaRhU8rdW--iJi12RJ_PJWC_M

I also tried to apply a zero const shift to it and again got the same result.

I tried to investigate output and it seems there is some overflow and clipping I recorded another signal (137.1 MHz with sample rate 144000) file and I applied a const 50Hz shift like this:

cat gqrx_20220806_143821_137100000_144000_fc.raw |doppler const -i f32 -o f32 -s 144000 --shift 50 > gqrx_20220806_143821_137100000_144000_fc_f32_shifted50.raw

Then I tried to compare time and frequency domain of original and result file, and I see lots of clippings:

Spectrum:
image image

Time Domain: image

andresv commented 2 years ago

Oh my, something must be horribly wrong. It spiked my interest. I try to allocate time for investigating. Thanks for clear example.