Goonhilly Spectrum Stream

Latest News and Discussion about the use of the DATV transponder on Es'hail-2
EA7KIR
Posts: 86
Joined: Tue Feb 09, 2021 3:38 pm

Re: Goonhilly Spectrum Stream

Post by EA7KIR » Fri Aug 27, 2021 12:52 pm

G4EWJ wrote:
Fri Aug 27, 2021 12:38 pm
I don't know the exact specification of the spectrum stream, but from observation:
Wow! Thank you so much, Brian. I'm sure this will get me started. I was just reading through https://github.com/F5OEO/eshail-ghy-wb- ... ter/main.c and becoming very confused. It looks like Goonhilly sends 4 streams in succession, each with a unique protocol - that all look the same. I'll follow your findings and let you know.
Michael EA7KIR

G4EWJ
Posts: 1340
Joined: Wed Feb 17, 2010 10:11 am

Re: Goonhilly Spectrum Stream

Post by G4EWJ » Fri Aug 27, 2021 1:02 pm

As far as I can see, it sends a new scan every 250ms or so.

Which language are you writing in?

Brian

EA7KIR
Posts: 86
Joined: Tue Feb 09, 2021 3:38 pm

Re: Goonhilly Spectrum Stream

Post by EA7KIR » Fri Aug 27, 2021 1:12 pm

G4EWJ wrote:
Fri Aug 27, 2021 1:02 pm
Which language are you writing in?
I'm writing in Swift for both the Raspberry Pi server and the Apple Mac client. The Mac user interface uses SwiftUI. I'm still learning the language. Like everything technical, it seems easy to begin with. Then, the deeper you get the harder it becomes - hence the memory leaks I can't fix. Why do you ask?
Michael EA7KIR

G4EWJ
Posts: 1340
Joined: Wed Feb 17, 2010 10:11 am

Re: Goonhilly Spectrum Stream

Post by G4EWJ » Fri Aug 27, 2021 1:19 pm

I don't know anything about MACs or SwiftUI.

I've been playing with some code on the RPi to decode the spectrum feed. I couldn't find a C library for Websockets that I could actually get to work, but the Python library worked without problems. I've never used Python before, so the code is probably pretty horrible.

Brian

EA7KIR
Posts: 86
Joined: Tue Feb 09, 2021 3:38 pm

Re: Goonhilly Spectrum Stream

Post by EA7KIR » Fri Aug 27, 2021 1:32 pm

G4EWJ wrote:
Fri Aug 27, 2021 1:19 pm
I don't know anything about MACs or SwiftUI.

I've been playing with some code on the RPi to decode the spectrum feed. I couldn't find a C library for Websockets that I could actually get to work, but the Python library worked without problems. I've never used Python before, so the code is probably pretty horrible.

Brian
I started this project in Python for both ends, and yes it was very easy, but I didn't like the look of the user interface. It looked like something from the 80s (like most HAM software). Python is very good, but Swift is the way to go, particularly for the server community who are beginning to use Swift-NIO. Why? Because they need compatibility between many back-end servers. Swift and Swift-NIO are open source. SwiftUI is only for Apple at the moment. Almost all new macOS, iOS and tvOS products are using it now.

Now I know the stream uses websockets, you could try this https://pypi.org/project/websocket-client/
Michael EA7KIR

G8GKQ
Site Admin
Posts: 2794
Joined: Sun Mar 22, 2009 1:21 pm

Re: Goonhilly Spectrum Stream

Post by G8GKQ » Fri Aug 27, 2021 1:50 pm

We'll be publishing some advice and guidelines on the use of the Goonhilly Spectrum Stream over the next few days, so please be patient and you'll get some help from the the system designer.

The delay is because he has a "real" job as well!

Thanks for your patience

Dave, G8GKQ

EA7KIR
Posts: 86
Joined: Tue Feb 09, 2021 3:38 pm

Re: Goonhilly Spectrum Stream

Post by EA7KIR » Fri Aug 27, 2021 1:57 pm

G8GKQ wrote:
Fri Aug 27, 2021 1:50 pm
We'll be publishing some advice and guidelines on the use of the Goonhilly Spectrum Stream over the next few days, so please be patient and you'll get some help from the the system designer.

The delay is because he has a "real" job as well!

Thanks for your patience

Dave, G8GKQ
Thank you Dave. This is just what I need.
Michael EA7KIR

G4EWJ
Posts: 1340
Joined: Wed Feb 17, 2010 10:11 am

Re: Goonhilly Spectrum Stream

Post by G4EWJ » Fri Aug 27, 2021 2:21 pm

>>Now I know the stream uses websockets, you could try this https://pypi.org/project/websocket-client/

Yes, that's the one I'm using.

Brian

Phil M0DNY
Posts: 39
Joined: Sat Jun 01, 2013 10:45 am

Re: Goonhilly Spectrum Stream

Post by Phil M0DNY » Sun Aug 29, 2021 12:57 pm

Hi Michael,

Apologies for the delayed response - I'll copy this into a wiki article once I've posted here:

Technical Description
As you've seen (from Evariste's copy of the original source https://github.com/BritishAmateurTelevi ... ter/main.c ), the FFT feed uses a websocket over TLS ( wss://eshail.batc.org.uk/wb/fft ).

There are two 'protocols' implemented that are used to provide the feeds on the https://eshail.batc.org.uk/wb/ webpage:
  • 'fft' - Provides the 'Slow' data feed (4x per second)
  • 'fft_fast' - Provides the 'Fast' data feed (10x per second)
For those who've requested access to the FFT service for integration into applications, I've then added a separate protocol. The data is identical, but this allows me to monitor the usage specific to clients, isolate any problems to the specific client, and if necessary to protect the other services - to block that particular client until the problem is resolved. (This has happened when a client was accidentally written to open 1 connection per second without closing any..)
  • 'fft_m0dtslivetune' - Provides a 4x per second data feed for Rob's Live Tune application
  • 'fft_f5oeoplutofw' - Provides a 4x per second data feed for Evariste's Pluto firmware display
As Brian has worked out, the feed is sent as a packed array of 922 unsigned 16-bit integers representing the amplitude in each frequency bin, from the lower frequency to the upper, (Airspy samples at 10Ms/s, 1024-bin FFT is used, 9MHz TPX therefore ~= 922 bins). There is some post-shaping to deal partially with roll-off and cable impedance mismatches. The produced values are limited at 0 and 65535 (will not underflow or overflow).

Use of the Feed
I'm very happy with people carefully experimenting with the default 'fft'/'fft-fast', however for ongoing use or if you're distributing (or making publicly available) an application/webpage that uses it then please contact me and ask for a defined protocol so I can keep track of the usage and isolate any issues. I can add more easily with less than a second of downtime on the system. My email address is phil@philcrump.co.uk

Ongoing availability and compatibility of the feed is on a best-effort basis. It's all working well for now and I've got no pressing reason to change anything any time soon.

Client Code examples

'eshail.batc.org.uk/wb' webpage: https://github.com/BritishAmateurTelevi ... js#L11-L45
Rob's Live-Tune client: https://github.com/m0dts/QO-100-WB-Live ... cs#L39-L82

Michael - Are you happy if I set up 'fft_ea7kirsatcontroller' for you? What speed (updates per second) would you like the data?

Phil M0DNY

EA7KIR
Posts: 86
Joined: Tue Feb 09, 2021 3:38 pm

Re: Goonhilly Spectrum Stream

Post by EA7KIR » Sun Aug 29, 2021 1:18 pm

Phil M0DNY wrote:
Sun Aug 29, 2021 12:57 pm
Michael - Are you happy if I set up 'fft_ea7kirsatcontroller' for you? What speed (updates per second) would you like the data?
Thank you Phil. This is fantastic, so absolutley please do set up the custom feed. The Slow feed of 4/second will be perfect. I know it will take me some time to get this working, but I'll do my best to not crash the entire system as best I can. If there's anyone out there who'd like to collaborate, just send a PM.
Michael EA7KIR

Post Reply

Return to “Es’hail-2 - DATV Transponder”