1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 19:28:47 -05:00
sdrangel/plugins/channeltx/filesource
2022-09-17 23:00:07 +02:00
..
CMakeLists.txt Install debug symbols on Windows for debug builds 2022-02-06 12:56:58 +00:00
filesource.cpp Replace deprecated QMutex(Recursive) with QRecursiveMutex 2022-09-17 23:00:07 +02:00
filesource.h Replace deprecated QMutex(Recursive) with QRecursiveMutex 2022-09-17 23:00:07 +02:00
filesourcebaseband.cpp Replace deprecated QMutex(Recursive) with QRecursiveMutex 2022-09-17 23:00:07 +02:00
filesourcebaseband.h Replace deprecated QMutex(Recursive) with QRecursiveMutex 2022-09-17 23:00:07 +02:00
filesourcegui.cpp Massive UI revamping (v7): Fixed sizing of channel windows. Part of #1209 2022-04-24 12:28:56 +02:00
filesourcegui.h Massive UI revamping (v7): Fixed sizing of channel windows. Part of #1209 2022-04-24 12:28:56 +02:00
filesourcegui.ui Massive UI revamping (v7): Fixed sizing of channel windows. Part of #1209 2022-04-24 12:28:56 +02:00
filesourceplugin.cpp Updated main and plugin versions 2022-05-14 13:16:33 +02:00
filesourceplugin.h Channel plugins: use specialized ChannelGUI superclass. Handle GUI lifecycle in MainWindow 2020-10-04 22:16:09 +02:00
filesourcereport.cpp SampleSourceFifo refactoring and Tx code reorganization 2019-11-15 01:05:32 +01:00
filesourcereport.h FileSource: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:13:01 +02:00
filesourcesettings.cpp Massive UI revamping (v7): persistent channel show/hide 2022-04-12 18:27:27 +02:00
filesourcesettings.h Massive UI revamping (v7): persistent channel show/hide 2022-04-12 18:27:27 +02:00
filesourcesource.cpp Refactor common code into WavFileRecord class 2021-05-21 21:05:23 +01:00
filesourcesource.h Fixed -Wunused-parameter warnings 2020-11-14 11:13:32 +01:00
filesourcewebapiadapter.cpp Fixed -Wunused-parameter warnings 2020-11-14 11:13:32 +01:00
filesourcewebapiadapter.h REST API: config: GET (13): corrected missing return in deserialize methods of the adapters 2019-08-05 03:42:04 +02:00
readme.md Massive UI revamping (v7): Channel window documentation. Show device type name in index tooltip 2022-04-17 10:20:07 +02:00

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. File formats supported include SDRangel's .sdriq and signed 16-bit PCM .wav files.

.sqriq files start 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

The top and bottom bars of the channel window are described here

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.