1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-04 16:01:14 -05:00
sdrangel/plugins/channeltx/filesource
2020-10-06 07:41:32 +02:00
..
CMakeLists.txt SampleSourceFifo refactoring and Tx code reorganization 2019-11-15 01:05:32 +01:00
filesource.cpp FileSource: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:13:01 +02:00
filesource.h Delete channel API from DeviceUISet. Update FeatureUISet 2020-10-04 22:16:09 +02:00
filesourcebaseband.cpp Tx plugins fixes and further refactoring around MsgConfigureChannelizer and audio 2019-11-21 00:42:31 +01:00
filesourcebaseband.h FileSource: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:13:01 +02:00
filesourcegui.cpp Delete channel API from DeviceUISet. Update FeatureUISet 2020-10-04 22:16:09 +02:00
filesourcegui.h Removed dangling PluginInstanceGUI references 2020-10-05 16:30:24 +02:00
filesourcegui.ui FileSource: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:13:01 +02:00
filesourceplugin.cpp Updated version and changelogs 2020-10-06 07:41:32 +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 Channel Tx plugins: added support of MIMO devices 2019-11-17 11:09:35 +01:00
filesourcesettings.h Channel Tx plugins: added support of MIMO devices 2019-11-17 11:09:35 +01:00
filesourcesource.cpp FileSource: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:13:01 +02:00
filesourcesource.h FileSource: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:13:01 +02:00
filesourcewebapiadapter.cpp REST API: config: use specialized ChannelWebAPIAdapter class similar to what has been done for devices 2019-08-05 00:10:56 +02: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 FileSource channel plugin: updated documentation 2019-07-10 22:02:34 +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. 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.