GNU Radio's SATNOGS Package
gr::satnogs::waterfall_sink Class Reference

This block computes the waterfall of the incoming signal and stores the result to a file. More...

#include <waterfall_sink.h>

Inheritance diagram for gr::satnogs::waterfall_sink:
gr::satnogs::waterfall_sink_impl

Public Types

typedef boost::shared_ptr< waterfall_sinksptr
 

Static Public Member Functions

static sptr make (float samp_rate, float center_freq, float rps, size_t fft_size, const std::string &filename, int mode=0)
 

Detailed Description

This block computes the waterfall of the incoming signal and stores the result to a file.

The file has a special header, so plotting tools can reconstruct properly the spectrum.

Member Typedef Documentation

◆ sptr

Member Function Documentation

◆ make()

static sptr gr::satnogs::waterfall_sink::make ( float  samp_rate,
float  center_freq,
float  rps,
size_t  fft_size,
const std::string &  filename,
int  mode = 0 
)
static

This block computes the waterfall of the incoming signal and stores the result to a file.

The file has a constant sized header of 52 bytes, so that plotting tools can reconstruct properly the spectrum.

The structure of the header is the following:

  • A 32 byte string containing the timestamp in ISO-8601 format. This timer has microsecond accuracy.
  • A 4 byte integer containing the sampling rate
  • A 4 byte integer with the FFT size
  • A 4 byte integer containing the number of FFT snapshots for one row at the waterfall
  • A 4 byte float with the center frequency of the observation.
  • A 4 byte integer indicating the endianness of the rest of the file. If set to 0 the file continues in Big endian. Otherwise, in little endian. The change of the endianness is performed to reduce the overhead at the station.
Note
All contents of the header are in Network Byte order! The rest of the file is in native byte order, mainly for performance reasons. Users can use data of the header to determine if their architecture match the architecture of the host generated the waterfall file and act accordingly.

The file continues with information regarding the spectral content of the observation. Each waterfall line is prepended with a int64_t field indicating the absolute time in microseconds with respect to the start of the waterfall data (stored in the corresponding header field). The spectral content is stored in $FFT$ float values already converted in dB scale.

Parameters
samp_ratethe sampling rate
center_freqthe observation center frequency. Used only for plotting reasons. For a normalized frequency x-axis set it to 0.
rpsrows per second
fft_sizeFFT size
filenamethe name of the output file
modethe mode that the waterfall.
  • 0: Simple decimation
  • 1: Max hold
  • 2: Mean energy
Returns
shared pointer to the object

The documentation for this class was generated from the following file: