Panadapter,waterfall with TCP/IP API

  • 1
  • Question
  • Updated 5 months ago
Currently, with TCP / IP API SmartSDR I know how to read the frequency, mode, temperature, level, all meters through ports 4992 and 5100 (udpport command) Could you explain to me how to retrieve the data panadapter, waterfall to draw it with my program thank you
Photo of F1AQW

F1AQW

  • 7 Posts
  • 0 Reply Likes

Posted 5 months ago

  • 1
Photo of Chris DL5NAM

Chris DL5NAM

  • 589 Posts
  • 128 Reply Likes
What is: "my programm" ?

Chris DL5NAM
Photo of Mark WS7M

Mark WS7M

  • 386 Posts
  • 113 Reply Likes
Seque,

There are some examples posted in these forums.

The short answer is that you will receive UDP Vita packets, one type if FFT and in that will be a list of points which basically form the Y values to connect a line between drawn from left to right.

To get this data you have to send the API the size of your window that you will be displaying the data in.  It will scale the return data so the points moving from left to right of your defined window match your window size.
Photo of Doug - K3TZR

Doug - K3TZR

  • 93 Posts
  • 11 Reply Likes
Here's a link to a post by Stu Phillips from a number of years ago. In it he explains how the Panadapter and Waterfall data are sent from the Radio.

https://community.flexradio.com/flexradio/topics/generating-a-pan-adaptor-and-waterfall-display

If you want to read some code, Swift in this case, you can look at my GitHub repo which contains a Mac/Swift version of the API (called xLib6000) and a SmartSDR-like client (xSDR6000). In those you can see how I've processed the Panadapter and Waterfall.

https://github.com/DougPA

I hope that helps.
(Edited)
Photo of F1AQW

F1AQW

  • 7 Posts
  • 0 Reply Likes
thank you for the answer I did not find these posts My development tools is WINDEV12 I will try to draw the panadapter and the waterfall
Photo of F1AQW

F1AQW

  • 7 Posts
  • 0 Reply Likes
Thank you for your answers
Currently I receive on the UDP port all the data concerning the meters as well as the data for the panadapter and the Waterfall
My problem is that I do not know how to sort them to differentiate meter data and panadapter data
Could you give me some additional explanations to perform this sort.
When reading only the meters data G3WGV explanations are perfect
mias I did not find the equivalent to manage the panadapter data.

For displaying panadapter points I do not have any problems
Thanks for your help
Photo of Doug - K3TZR

Doug - K3TZR

  • 93 Posts
  • 11 Reply Likes
The UDP streams are in an industry-standard format, Vita-49. The vita "class code" identifies what type of vita packet has been received.

I'm confused by your statement "I did not find these posts".

The Stu Phillips explanation is on this community and is probably the best explanation I've found. If my link isn't correct in some way you can look for posts by Stu (there are a lot of them).

My GitHub page has code to do what you want to do, unfortunately it isn't a simple problem (especially the Waterfall). The Vita.swift file in xLib6000 has code that "decodes" and "encodes" Vita data.

If you can clarify your question I would be happy to help.
Photo of Mark - WS7M

Mark - WS7M

  • 993 Posts
  • 353 Reply Likes
Doug is right.

When you receive a UDP packet and decode it using the Vita49 header you will end up with some identifying items. 

The FFT data which is used to draw the pan part (not the waterfall) comes with a class type of:

#define SL_VITA_FFT_CLASS             0x8003

When you see this you know the payload is the data needed to draw the pan line across your window.
Photo of F1AQW

F1AQW

  • 7 Posts
  • 0 Reply Likes
Thank you
I'm progressing slowly but I'm progressing
When I run the command "display pan create x = 1024 y = 700 fps = 10 center = 14.1 bandwidth = 0.2 min_dbm = -130 max_dbm = -50"
The created slice is not on the right frequency?
and every time I launch my program he creates me a new panadapter?
it's normal?
Now I sort according to the identifiers "8002" data meters and "8003" data panadapter
Not easy when you do not have all the information
Thanks for your help
Photo of Mark WS7M

Mark WS7M

  • 386 Posts
  • 113 Reply Likes
Without more info I'm not sure we can solve the off frequency problem.

When you first connect to the radio you can subscribe to things.  In my case I do:

  cmds.append( "sub tx all" );
  cmds.append( "sub atu all" );
  cmds.append( "sub meter all" );
  cmds.append( "sub pan all" );
  cmds.append( "sub slice all" );
  cmds.append( "sub gps all" );
  cmds.append( "sub audio_stream all" );
  cmds.append( "sub cwx all" );
  cmds.append( "sub xvtr all" );
  cmds.append( "sub memories all" );
  cmds.append( "sub daxiq all" );
  cmds.append( "sub dax all" );

This subscribes my program to notifications from the radio for all of these things.  One of them as you see is "sub pan all".  This means when you connect to the radio and you issue these subscriptions you will be notified (over the TCP/IP connection, NOT the UDP) that there are existing Pan and Slices.

Basically with these subscriptions you will get a BUNCH of stuff that you can decide to listen to or not.  

So your code should at minimum subscribe to "sub pan all" and "sub slice all" and you will get notifications of existing Pan and slices.  Then instead of creating one you can use any existing ones and simply change them.