Merge pull request #743 from Mehanik/fix_sdriq_doc

Fix sdriq file format documentation
This commit is contained in:
Edouard Griffiths 2021-01-04 10:46:53 +01:00 committed by GitHub
commit aafa88ab37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -4,9 +4,9 @@
This sample sink plugin sends its samples to file in the SDRangel .sdriq format. This sample sink plugin sends its samples to file in the SDRangel .sdriq format.
The format is S16LE I/Q samples. Thus there are 4 bytes per sample. I and Q values are 16 bit signed integers. The file starts with a context header containing information about center frequency, sample rate and timestamp of the start of the recording. This header has a length which is a multiple of a sample size (normally 24 bytes thus 6 samples). Thus this file can be used as a raw I/Q file with S16LE samples tolerating a glitch at the start corresponding to the 6 "random" samples. For example in GNURadio you can simply specify your file source format as short complex. The format is S16LE or S32LE I/Q samples. Thus there are 4 or 8 bytes per sample. Depending on sample size I and Q values are 16 bit signed integers for 16 bit sample size or 32 bit signed integers for 24 bit sample size. The file starts with a context header containing information about center frequency, sample rate and timestamp of the start of the recording. This header has a length which is a multiple of a sample size (normally 32 bytes thus 8 32-bit samples). Thus this file can be used as a raw I/Q file with S16LE samples tolerating a glitch at the start corresponding to the 8 "random" samples. For example in GNURadio you can simply specify your file source format as short complex.
You can also zap the 24 bytes header with this Linux command: `tail -c +25 myfile.sdriq > myfile.raw` You can also zap the 32 bytes header with this Linux command: `tail -c +33 myfile.sdriq > myfile.raw`
To convert in another format you may use the sox utility. For example to convert to 32 bit (float) complex samples do: `sox -r 48k b 16 e signed-integer -c 2 myfile.raw -e float -c 2 myfilec.raw` To convert in another format you may use the sox utility. For example to convert to 32 bit (float) complex samples do: `sox -r 48k b 16 e signed-integer -c 2 myfile.raw -e float -c 2 myfilec.raw`