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

Integrate with Radio Sky Spectrograph (RSS) #11

Open
bvacaliuc opened this issue Jul 23, 2016 · 7 comments
Open

Integrate with Radio Sky Spectrograph (RSS) #11

bvacaliuc opened this issue Jul 23, 2016 · 7 comments

Comments

@bvacaliuc
Copy link
Member

There is a desire to integrate RASDR software with Jim Sky's Radio Sky Spectrograph.

@bvacaliuc
Copy link
Member Author

Ok. So with commit 61676c4 this feature is introduced. To enable it, open the Setup RSS Output panel and define the settings as follows:

rasdrproc-configure-rss-output

On RSS, tell it to use the Radio that is an RTL Dongle Receiver:

rss-configure-rasdrproc-input

The server is setup when you 'Start Acquisition' on RASDRproc and torn down when you 'Stop Acquisition'. RSS will make a connection to the server when you press 'Start' in its GUI. If you change parameters that will affect the frequency plan, RASDRproc will disconnect and you can just press 'Start' again in RSS to pick up the new frequencies, etc.

Please let me know what issues there may be. I'm not certain about the colors on RSS, so I might have gotten the bytes swabbed the wrong way.

@bvacaliuc
Copy link
Member Author

With commit 44efacb8, I have updated the control panel to provide additional controls:

rasdrproc-configure-rss-output-update1

  • Channel Offset
  • Channel Gain
  • Channel Bias

These affect the calculation of the spectrum output as follows: S[n] = (( s[n] + offset ) * gain ) + bias

  • Minimum Value (clip)
  • Maximum value (clip)

These will enforce the spectral outputs to prevent RSS from slowing down or going unresponsive.

  • Frequency Offset

This can be used if you are using an upconverter to provide the correct offset frequency so that RSS will display the actual RF frequency instead of the IF frequency that the RASDR unit is tuned to. NOTE: by rights, this is needed to be known by RASDRproc itself, but so far it was not implemented that way. In the future this control may move to a different place, but for now it is listed here with the RSS stuff.

There are a few caveats (as of RSS 2.4.20 used to test this release):

  • Values transmitted must never be less than zero. It slows RSS down (not sure why, perhaps handling exceptions).
  • 256 is the largest number of channels. If you go above this, strange artifacts appear in the RSS waterfall output.
  • Frequency offset must never be less than zero. It will crash RSS.
  • RSS does a pretty nice job with scaling (see RSS Color->Multiply, Color->Non-Linear Multiply and Color->No Multiply menu).

@bvacaliuc
Copy link
Member Author

With commit a54af6bd, I have fixed an issue with the values taken for frequency bins and tested with RSS 2.8.19. The above caveats are no longer applicable, and you can go to 512 channels as documented.

@bvacaliuc
Copy link
Member Author

With commit 2cc7770, I have updated the control panel layout based on user feedback:

rasdrproc-v0 2 3 5-setup-rss-output

The values in the Adjustments box can be made without closing the control panel and are applied immediately to the processing stream so real-time feedback can be observed. When the OK/Close button is pressed, the values are applied and any stream connections are closed.

@bvacaliuc
Copy link
Member Author

bvacaliuc commented Sep 8, 2016

It was noted that the implementation of the above is not explained very well. Here is a rudimentary explanation:

  1. For every FFT computed (either with or without averaging) a call to LMLL_Testing_SetFFTSpectra() is made which places a range of bins onto a FIFO (m_fftAvgFIFO with a packet format of FFTAvgPacket) that includes the center and offset frequencies as well as the amplitudes.
  2. When the user STARTs acquisition, and the RSS output is enabled, a thread is created that uses the socket library to bind/listen/accept incoming connections.
  3. The above thread, upon receiving a connection, reads a spectra from the FIFO to respond according to the RSS protocol, using this code.
  4. Afterward, it continuously obtains spectra from the FIFO to perform offset/gain/bias/clip corrections on the FFT amplitudes array using this code; then sends the data over the socket.

@bvacaliuc
Copy link
Member Author

As of today, Spectrograph 2.9.30 requires a slightly different setting to connect to RASDRproc. See below.

rss-settings-2 3 30+

@bvacaliuc
Copy link
Member Author

Might want to check to make sure latest version of RSS works with RASDR, so keeping this open for a bit longer.

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

1 participant