From 16517b7d919164322b948e0fcef2a8c25ad6c1a6 Mon Sep 17 00:00:00 2001 From: Eugene Mikhantiev Date: Sun, 3 Jan 2021 22:09:49 +0700 Subject: [PATCH] Fix sdriq file format documentation Specify different data formats depending on sample size --- plugins/samplesink/fileoutput/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/samplesink/fileoutput/readme.md b/plugins/samplesink/fileoutput/readme.md index 992d1ce61..a54dcdf63 100644 --- a/plugins/samplesink/fileoutput/readme.md +++ b/plugins/samplesink/fileoutput/readme.md @@ -4,9 +4,9 @@ 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`