Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Panadapter,waterfall with TCP/IP API

F1AQW
F1AQW Member ✭✭
edited April 2020 in FLEX-6000 Signature Series
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

Answers

  • Chris DL5NAM
    Chris DL5NAM Member ✭✭✭
    edited April 2020
    What is: "my programm" ?

    Chris DL5NAM
  • Mark WS7M
    Mark WS7M Member ✭✭
    edited April 2018
    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.
  • Doug - K3TZR
    Doug - K3TZR Member
    edited October 2018
    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.
  • F1AQW
    F1AQW Member ✭✭
    edited April 2018

    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
  • F1AQW
    F1AQW Member ✭✭
    edited April 2018
    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
  • Doug - K3TZR
    Doug - K3TZR Member
    edited October 2018
    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.
  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited April 2018
    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.

  • F1AQW
    F1AQW Member ✭✭
    edited April 2018
    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
  • Mark WS7M
    Mark WS7M Member ✭✭
    edited April 2018
    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.