gut-space / svarog

📡 A ground stations network for receiving satellite transmissions, using VHF, UHF, and more.
MIT License
10 stars 0 forks source link

GNU Radio integration #10

Closed fivitti closed 2 years ago

fivitti commented 4 years ago

GNU Radio has a lot of built-in, awesome tools for work with SDR. Also exists gr-satellites with ready GNU Radio blocks to reception data from satellites. We should be able use this power. We need a possibility to use GNU Radio pipelines in our station.

fivitti commented 3 years ago

APT decoder may be implemented using GNU Radio blocks: link. But it is primitive and doesn't include advanced processing as Doppler correction or NOAA telemetry decoding.

I think that re-implement existing, specialized, decoding tools isn't good way. It requires a lot of time and knowledge, but doesn't increase the value of project. As our team is small we need a solution which allow us easily integrate different solutions as noaa-apt, meteor-demod, GNU Radio and other.

fivitti commented 3 years ago

Now, the reception recipes are shell scripts. It allow us to easily run standalone programs (as sox or noaa-apt), but call Python modules (as GNU Radio) is harder. This way doesn't support re-use the code or follow good practices well. Shell scripts cannot return complex data.

We should analyze the possibility to organize the recipes as Python scripts.

fivitti commented 3 years ago

Shell script recipe specification

Now, our recipes realize schema:

Input parameters

  1. Prefix path. All path created by this script will be start with it
  2. Frequency
  3. Recording duration in seconds

Output parameters

The output is print on standard output in format:

!! <TYPE>: "<PATH>"

where <PATH> is absolute path to file. Recipe IS NOT responsible for clean up this file. <TYPE> specify how product was saved. Now we used these types:

Type Description
Signal WAV file with recorded signal after normalization
Product PNG file with decoded imagery

Algorithm

All our recipes realize similar algorithm.

  1. Record the signal - we use rtl_fm for it
  2. Normalize the signal - using sox
  3. Decoding - in this step we run specialized tools different for each satellite
  4. Clean up temporary files
  5. Print to std out

Notes

Advantages:

Disadvantages

fivitti commented 3 years ago

I propose to use sh library to call external programs. It allow to execute process as call standard Python object methods. For example:

from sh import ifconfig
print(ifconfig("eth0"))

We can use it to support rtl_fm, sox, noaa-apt, metor-decode or meteor_demod without write additional code.

It is so much fancy, but it should allow to simplify recipes.

fivitti commented 3 years ago

GNU Radio developers prepare PyBOMBS utility. It allow to install dependencies from different package managers.

PyBOMBS is good at building GNU Radio, UHD, and various Out of Tree (OOT) modules from source and then installing into a specified user directory rather than in the system files. PyBOMBS detects the user's Operating System and loads all of the prerequisites in the first stage of the build.

It is dedicated for install GNU Radio, but may be used to install another software too. We can use it for install noaa-apt, meteor-demod, meteor-decode, rtl_fm(?) in setup.py file. Now installing dependencies for our station is complicated.

A lot of recipes are stored in this repository.

tomaszmrugalski commented 3 years ago

I've started looking at GNU Radio. Here are my notes.

tomaszmrugalski commented 2 years ago

50 integrated GR. We now have GNU Radio based recipe for NOAA.