Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iq tool formats #1013

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

vladisslav2011
Copy link
Contributor

@vladisslav2011 vladisslav2011 commented Dec 10, 2021

IQ Tool: Implement playback and recording in different integer IQ formats.

I/Q formats (filename suffix description):

fc 32bit float I/Q gr_complex or std::complex<float>. Old format.
32 32bit signed integer I/Q std::complex<int32_t>.
16 16bit signed integer I/Q std::complex<int16_t>.
8 8bit signed integer I/Q std::complex<int8_t>. HackRF native format .
32u 32bit unsigned integer I/Q std::complex<uint32_t>.
16u 16bit unsigned integer I/Q std::complex<uint16_t>.
8u 8bit unsigned integer I/Q std::complex<uint8_t> RTL SDR native format.
14 14bit signed integer packed I/Q format. Not very useful.
12 12bit signed integer packed I/Q format. Best dynamic range for many "16 bit" SDRs.
10 10bit signed integer packed I/Q format. Good dynamic range and storage efficiency.

Real formats:

32i 32bit signed integer real, sampled from I branch.
16i 16bit signed integer real, sampled from I branch.
8i 8bit signed integer real, sampled from I branch.
14i 14bit signed integer packed real, sampled from I branch.
12i 12bit signed integer packed real, sampled from I branch. Just enough dynamic range to record from RX-888mk2 "16 bit" SDR or something similar without any noticeable quantization noise.
10i 10bit signed integer packed real, sampled from I branch.

Close #881.
Close #1030.
Includes #1010 and #1011 as it depends on some previous IQ Tool changes.

@vladisslav2011 vladisslav2011 force-pushed the iq_tool_formats branch 4 times, most recently from 68e428f to 5184d86 Compare December 16, 2021 10:42
@vladisslav2011 vladisslav2011 marked this pull request as draft December 18, 2021 20:07
@vladisslav2011 vladisslav2011 marked this pull request as ready for review December 18, 2021 22:08
@vladisslav2011
Copy link
Contributor Author

Rebased on top of actual iq_tool_gui_fixes.

@vladisslav2011
Copy link
Contributor Author

Quick rebase to resolve conflicts. Needs more testing.

@pinkavaj
Copy link
Contributor

pinkavaj commented Nov 6, 2022

Would it make sense to split this into more MR's? Splitting it would make testing and review easier and it might possibly go faster into the master. (at least the first commit seems to be useful on its own).

I'm just at starting point here, but it would personally help me to try to help here.

@vladisslav2011 vladisslav2011 mentioned this pull request Nov 6, 2022
@vladisslav2011
Copy link
Contributor Author

Hmmm. This PR is really small, compared to #1106 for example...

It's already split into 3 PRs:
The first: #1010
The second: #1011
The third is this one.
I do not know, how can I split the latest commit into several smaller without adding unused code/bugs.

Consider starting review from #1010 and continue with #1011 once #1010 gets merged/replaced.

@pinkavaj
Copy link
Contributor

pinkavaj commented Nov 6, 2022

Hmmm. This PR is really small, compared to #1106 for example...

It's already split into 3 PRs: The first: #1010 The second: #1011 The third is this one. I do not know, how can I split the latest commit into several smaller without adding unused code/bugs.

Consider starting review from #1010 and continue with #1011 once #1010 gets merged/replaced.

Sure I get it now. Thx, would make sense to reference the other MRs? Also wold make sense to keep this draft until ready to merge? It took my a while to dig throught this and it would help me.

Just asking.

@pinkavaj
Copy link
Contributor

pinkavaj commented Nov 6, 2022

Ok, I'm probably blind and should go to bed now, they are mentioned in the description, of course, sorry!

@vladisslav2011
Copy link
Contributor Author

You are fine.
I've updated descriptions several minutes ago.

@vladisslav2011 vladisslav2011 marked this pull request as draft November 7, 2022 00:06
@vladisslav2011 vladisslav2011 marked this pull request as ready for review November 7, 2022 00:15
@stefanino-ch
Copy link

@vladisslav2011
Made a new build today with #1013.

  • The jumping slider is really gone, thank you for this.
  • I recorded (script based) exactly 60 seconds of data in different formats. Recording length afterwards displayed for the files in IQ Tool is bewteen 28 and 32 seconds. For me it looks like this indication is by factor 2 to small.
  • During replay I've tried to pause the replay with the DSP start/ stop button. Pressing DSP button during replay has paused waterfall and panadapter, but the time slider in the IQ Window did not stop and ran until the end of the file. I've seen this working before correctly in a build where I put many other of your PRs in. So not sure if this is related to a merge issue by myself in this build, or if I just miss a fix from another PR which I've put not in.

@vladisslav2011
Copy link
Contributor Author

vladisslav2011 commented Nov 15, 2022

The jumping slider fix is now merged into master. Thanks to @argilo finding some time to review it.
I've rebased this branch on top of current master, did a build and tested it. I can't confirm wrong playback time indication issue. If I record 1 minute and reselect the file, it always displays 1 minute.
The slider runaway issue #1017 is not fixed by this PR. It may be fixed by #1016

vladisslav2011 and others added 12 commits August 14, 2023 21:45
...while playing back IQ file.

Problem: It is possible to change the center frequency while playing an
IQ file. In this case the real file center frequency does not get shifted
to a correct position, so the spectrum plot/waterfall becomes shifted from
actual played frequency, bookmarks become not valid, freqCtrl shows wrong
frequency, plotter shows wrong frequency and so on.

This commit changes frequency setting logic to be more staraightfroward
and consistent.

Independent of frequency change event source (freqctrls, plotter, remote)
do the things in a same way: calculate new center and offset, taking into
account the fact, that the center frequency may be loked due to IQ file
playback, set the new frequency on a receiver side, then update all GUI
controls to reflect changes.

Enforce new frequency limits on the plotter side when IQ playback is
started.
Reselect file before starting playback. Fixes incorrect sample rate
when playback is started, stopped, devices switched, dsp started,
stopped and then started playback of the same IQ file.
10 bit: 2 samples packed into 5 bytes
12 bit: 1 sample packed into 3 bytes
14 bit: 2 samples packed into 7 bytes
And some generic optimizations
Changing IO devices and loading/saving settings does not look like good thing
to do while recording/playing an IQ file.
Disable seek slider during recording as it has no function in this
state.
Disable file list and directory selector during recording/playback.
@vladisslav2011
Copy link
Contributor Author

Updated with packed 10/12/14 bit formats and real (not I/Q) formats to avoid wasting disk space when recording from direct-sampling SDRs like RX-888 or MSi SDR in Low-IF mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IQ recording informats other than F32 BUG: Freeze after using WAV recorder while playing IQ file
4 participants