FlexAPI Waterfall Code

  • 1
  • Question
  • Updated 4 weeks ago
  • (Edited)
Can anyone share some code (C#) or at least explain the process for displaying a waterfall using FlexAPI?
Photo of Mark Erbaugh

Mark Erbaugh

  • 510 Posts
  • 43 Reply Likes

Posted 4 weeks ago

  • 1
Photo of James Whiteway

James Whiteway

  • 1049 Posts
  • 300 Reply Likes
Photo of Mark Erbaugh

Mark Erbaugh

  • 510 Posts
  • 43 Reply Likes
That’s an excellent write up.

It begs the question, why is the waterfall data so complex? Why couldn’t the same data that generates the panadapter be applied to a gradient and plotted?
Photo of Doug - K3TZR

Doug - K3TZR

  • 120 Posts
  • 17 Reply Likes
Mark,


I’ve wondered the same thing but don’t have a good answer for you. If you want to look at code, take a look at my GitHub repo for xSDR6000 (the v3 branch is the latest). It’s a SmartSDR-like client for use on the Mac (i.e. Apple Mac). My implementation of a waterfall is there. The code is in Swift but probably readable by a C# programmer. It uses Apple’s graphics approach (Metal) but again, probably pretty readable.
(Edited)
Photo of Eric - KE5DTO

Eric - KE5DTO, Official Rep

  • 887 Posts
  • 339 Reply Likes
The waterfall data is actually very similar to the Panadapter data.  However, this requires that we render it in the client.  We chose to leave it this way architecturally for several reasons.  The biggest was that leaving the rendering to the client allows the client to re-render when the display view is changed (zoom in/out, shifted center frequency, color or gain changes).  If we pushed this functionality into the radio, it would burden the radio with additional CPU and memory requirements (per Panadapter) and additional bandwidth whenever changes were made.  Ultimately we are very pleased with the results of what our architecture enables.

Admittedly, it is more complex to setup for developers than the Panadapter, but ultimately this was a price we were willing to pay in order to get the features and performance we were seeking for the sake of our customers.
Photo of Mark Erbaugh

Mark Erbaugh

  • 510 Posts
  • 43 Reply Likes
I figured the reasoning was something like what you said. Thanks for the explanation.