waterfall icon indicating copy to clipboard operation
waterfall copied to clipboard

json data structure for websocket

Open isemann opened this issue 3 years ago • 2 comments

Dear Jeppe, I like your waterfall implementation very much and have connected it to an FFT stream from the LimeSDR. I am struggling with the json structure required by the script, could you share that ? thanks a lot in advance brgds Bernhard

isemann avatar Jan 22 '22 15:01 isemann

The JSON structure is quite simple as shown here : https://github.com/jledet/waterfall/blob/885cb7bfd56ac1969e7c2a219819609a6ee8d0e6/script.js#L17

The spectrum data is sent in this format, with number of data points corresponding to the FFT bin count:

{"s":[-44,-46,-47,-49,-53,-51,-46,-46,-46,.................,-49,-44]}

Tuning parameters like "center" Frequency and "span" are sent independently during websock init or can be called when dynamically changing the frequency.

https://github.com/jledet/waterfall/blob/885cb7bfd56ac1969e7c2a219819609a6ee8d0e6/server.py#L38

For dynamic changing of parameters from keyboard and PlutoSDR support, you can check out my fork

r4d10n avatar Jan 22 '22 16:01 r4d10n

Thanks a lot!

isemann avatar Jan 22 '22 23:01 isemann