sdrangel/plugins/channeltx/filesource
..
CMakeLists.txt
filesource.cpp
filesource.h
filesourcegui.cpp
filesourcegui.h
filesourcegui.ui
filesourceplugin.cpp
filesourceplugin.h
filesourcesettings.cpp
filesourcesettings.h
filesourcewebapiadapter.cpp
filesourcewebapiadapter.h
readme.md

readme.md

File source channel plugin

Introduction

This plugin reads a file of I/Q samples that have been previously saved with the file record button of other sampling source devices. The file starts with a 32 byte header of all unsigned integer of various sizes containing meta data:

Displ. Bytes Description
0 4 Sample rate in S/s
4 8 Center frequency in Hz
12 8 Unix epoch (timestamp) of start
20 4 Sample size (16 or 24 bits)
24 4 Filler with zeroes
28 4 CRC32 of the previous 28 bytes

The header takes an integer number of 16 (4 bytes) or 24 (8 bytes) bits samples. To calculate CRC it is assumed that bytes are in little endian order.

The I/Q samples are copied to the baseband to be transmitted by the sink output device with possibly a chain of half-band interpolators for upsampling and shift of bandwidth.

Interface

File source channel plugin GUI

1: Interpolation factor

The device baseband can be interpolated from the channel and its center can be selected with (5). The resulting sample rate of the I/Q stream pulled from the Local Output device sink is the baseband sample rate divided by this value. The value is displayed in (2).

2: I/Q stream sample rate

This is the sample rate in kS/s of the I/Q stream pulled from the Local Output device sink instance.

3: Half-band filters chain sequence

This string represents the sequence of half-band filters used in the interpolation. Each character represents a filter type:

  • L: lower half-band
  • H: higher half-band
  • C: centered

4: Center frequency shift

This is the shift of the channel center frequency from the device center frequency. Its value is driven by the device sample rate, the interpolation (1) and the filter chain sequence (5).

5: Half-band filter chain sequence

The slider moves the channel center frequency roughly from the lower to the higher frequency in the device baseband. The number on the right represents the filter sequence as the decimal value of a base 3 number. Each base 3 digit represents the filter type and its sequence from MSB to LSB in the filter chain:

  • 0: lower half-band
  • 1: centered
  • 2: higher half-band

6: Level meter in dB

  • top bar (green): average value
  • bottom bar (blue green): instantaneous peak value
  • tip vertical bar (bright green): peak hold value

You must make sure that the peaks do not exceed 0 dB. In fact you should have 1 or 2 dB reserve when you tune the power level with the gain slider (7)

7: Gain

You may use this control to apply a gain to the input signal. You can control the resulting channel power with (6).

8: Open file

Opens a file dialog to select the input file. It expects a default extension of .sdriq. This button is disabled when the stream is running. You need to pause (button 11) to make it active and thus be able to select another file.

9: File path

Absolute path of the file being read

10: File recorded sample rate

Sample rate of the record in kS/s as written in the header. The reading process is based on this sample rate.

11: Sample size

This is the sample size in bits as written in the header. The reading process is based on this sample size.

12: CRC indicator

Indicates if the header block CRC check has succeeded (green) or failed (red) or undetermined yet (grey). If the header is corrupted you may try to reconstruct a valid header using the rescuesdriq utility in the folder with the same name. See the readme for details.

13: Loop

Use this button to read in a loop or read only once

14: Play/pause

This is the play/pause button

15: Current timestamp

This is the timestamp of the current pointer in the file based on the start time, number of samples read and sample rate.

16: Relative timestamp

Left is the relative timestamp of the current pointer from the start of the record.

17: Record length

This is the total record time.

18: Current pointer gauge

This represents the position of the current pointer position in the complete recording. It can be used it paused mode to position the current pointer by moving the slider.