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

improve SourceVITA49 to support sampling rate detection and handling #2

Open
James-Wang-JM opened this issue Nov 11, 2019 · 2 comments

Comments

@James-Wang-JM
Copy link

Testing with a device which is a VITA49 transmitter. Configure the device to transmit a VITA49 stream which conveys short IQ data. The sampling rate of IQ data is 25kHz

Launch component SourceVITA49 in sandbox and configure it to receive the VITA49 stream, plot port data from dataShort_out and plot port FFT from dataShort_out, observe the labeling of x axis of both plottings.

In time domain plotting, the x axis shows from [0, 1000s], which is not correct and should divide by 25K to be [0, 0.04s].

In frequency domain plotting, the x axis shows from [-0.5Hz, 0.5Hz], which is not correct and should multiply by 25K to be [-12.5kHz, 12.5kHz].

The following code snippet from function SourceVITA49_i::process_context() in SourceVITA49.cpp shall relate to detect and handle the sampling rate.

    if (!_bulkioPriority) {
        ...
            if (!isNull(contextPacket_g->getSampleRate())) {
            outputSRI.xdelta = 1.0 / contextPacket_g->getSampleRate();
            inputSampleRate = contextPacket_g->getSampleRate();
            LOG_DEBUG(SourceVITA49_i, "Sample Rate: " << contextPacket_g->getSampleRate());
        }
    }
@RedhawkDeployer
Copy link
Collaborator

For this issue, please provide the version of REDHAWK and OS, so we can try to replicated.

@James-Wang-JM
Copy link
Author

Redhawk 2.2.4 on CentOS 7.7.1908 in VirtualBox 5.2.10

@shmahon shmahon transferred this issue from RedhawkSDR/redhawk Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants