Commit Graph

200 Commits

Author SHA1 Message Date
Manolis Surligas d48e066a66 Improve AX.25 filtering to reduce false positives
The CRC16 of the AX.25 seems that is too weak for the new
decoding approach and we get many false positives.

Now the AX.25 decoder, makes waits for at least two
occurances of the AX.25 SYNC flag.
2019-12-27 23:56:33 +02:00
Manolis Surligas 8b8e322a5b Fix IQ file sink file creation
The IQ File sink, tried to create the IQ
file even if it was instructed by the user not to
store IQ data. Despite the fact that no data were
written, it could trigger however errors in case
the destination file could not be opened,
eg. due to permissions.

The problem was that the base class tried to
open the file at its contructor. This commit
deals with this issue and the file is created
only if the user specifies that wants the IQ
data to be stored.
2019-12-24 00:29:15 +02:00
Manolis Surligas d656020bc2 Make doppler correction block compatible with the coarse one 2019-12-20 13:00:58 +02:00
Manolis Surligas 96aaf11a30 Improve doppler correction and decimation
This commit adds a hierarchical block that performs Doppler
compensation and resampling.

Rather than using directly the available Doppler correction blocks,
based on the user parameters of the incoming sampling rate and the
desired target sampling rate, it applies proper decimation on the signal
so the frequency shift to be applied to a smaller sampling rate,
reducing significantly the CPU resources required. At the previous
architecture (gr-satnogs 1.x.x) we used seperate blocks for the doppler
correction and the LO digital shift, operating at the device sampling rate.
These two blocks, performing almost the same operation, contributed to a
30% CPU usage of the overall application. Now the LO is compensated by
the Doppler correction block, taking into account at the same time the
Doppler drift.

After the digital LO shift, the Doppler corrected signal is passed through
an Polyphase Arbitrary Resampler, to match exactly the sampling rate
requested by the user.
2019-12-20 13:00:58 +02:00
Manolis Surligas 8072219a8a Support timestamping in the waterfall intermediate file
The waterfall file has now 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 that 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.
2019-12-17 15:59:43 +02:00
Manolis Surligas cbc733c25e Integrate libfec as part of the gr-satnogs 2019-12-12 01:46:37 +02:00
Manolis Surligas 2a03fc66bf Drop boost::chrono in favor of std::chrono
The new GNU Radio linkage system seems that has some
issues. There are linkage dependencies that they should
be private on the GNU Radio target.

In addition, find_package(Boost) is also called on the
gnuradio-runtime target. Calling it again in the OOT
module overwrites the existing list of dependencies,
causing many problems.

We are staring a process of dropping Boost and use
the C++11 variants.
2019-12-11 18:15:49 +02:00
Manolis Surligas 303b26db62 Remove obsolete cmake macros 2019-12-09 19:19:28 +02:00
Manolis Surligas 073df24112 Convert all blocks from XML to YAML 2019-12-04 19:42:01 +02:00
Manolis Surligas cd5dfc69c9 Updated library and Swig files to GNU Radio 3.8 2019-12-02 21:53:26 +02:00
Manolis Surligas 747195f054 Make the non-scrambled AX.25 decoder more conservative
In case of scrambling the self synchronizing scrambler ensures
that enough repetitions of the AX.25 flag have been received.
However, this does not hold for the case of non scrambled
transmissions. In this case, we wait for at least two consecutive
AX.25 flags to reduce the false alarms. Experiments have shown
that due to the poor CRC there were many false positive frames.

It is expected however, to miss some transmissions that use only one
AX.25 flag.
2019-10-03 16:54:37 +03:00
Manolis Surligas 040763af11 Fix issue with the PMT messages and their format 2019-09-30 20:17:08 +03:00
Manolis Surligas 860395a997 Remove obsolete flowgraphs
Update the obsolete flowgraphs and update the existing with
the new decoding architecture blocks. Client should
not have big problems with the new decoders as we utilizing
the multiformat frame sink that takes care of it. This
is just a work around for testing as we move forward for
fully socket-based communication with the client
2019-09-30 19:32:21 +03:00
Manolis Surligas 2cc9184fbc Support both legacy and new PMT messages at the file sink
To allow easier integration to the new architecture the
multi format file sink supports bot legacy and the new
format of the PMT messages. In poth cases, only the PDU
is extracted. Legacy used the PDU as a BLOB, whereas
now the PDU is stored in base64 format inside a
dictionary, which structure is defined through
the gr::satnogs::metadata() class
2019-09-30 19:32:21 +03:00
Manolis Surligas 7a95b44475 Fix FSM at the IEEE 802.15.4 decoder 2019-09-30 19:32:21 +03:00
Manolis Surligas 2019718b3f Support frame tagging on the IEEE 802.15.4 decoder 2019-09-30 19:32:21 +03:00
Manolis Surligas ab442833c2 Instruct Astyle to wrap code at 80 chars 2019-09-30 19:32:21 +03:00
Manolis Surligas 729d97c73c Add support for AX.25 frame tagging on the IQ stream 2019-09-30 19:32:21 +03:00
Manolis Surligas ab45da4ad3 Implement a decoder covering COMMS from GOMSpace 2019-09-30 19:32:21 +03:00
Manolis Surligas c40b83211f Add a IEEE 802.15.4 compatible decoder
Add a IEEE 802.15.4 like decoder, which supports
the IEEE 802.15.4 standard but also a large variety
of ICs based on this framing scheme. Such framings
are quite common in many Cubesat missions.

The decoder has been tested an works well with at least
the Reaktor Hello World satellite
2019-09-30 19:32:21 +03:00
Manolis Surligas e09c180f84 Format all C++ files using the astyle beautifier 2019-09-30 19:32:21 +03:00
Manolis Surligas 7b7fb82adc Continue with the transition to the new decoder API
* Removed obsolete blocks
* Created a new CRC class with static methods. This will make easier the
integration of new CRC schemes. The old way was rather too C-styled
2019-09-30 19:32:21 +03:00
Manolis Surligas 14382ddc4f Remove obsolete blocks
* Blocks removed are now covered from decoders available supporting the
new decoder architecture
* The quadrature demodulation filter block, had as primary goal to
reduce the false alarms and the performance of the DUV decoder. Now the
new DUV decoder, uses a shift register approach, likewise the AX.25
decoder, therefore it is not needed anymore.
2019-09-30 19:32:21 +03:00
Manolis Surligas c9f685d1c1 Use the shift register approach for the DUV decoder 2019-09-30 19:32:21 +03:00
Manolis Surligas c5f376929c Convert AMSAT FOX DUV decoder to the new architecture
TODO:
* Use the shift register likewise the AX.25 to get rid off the
quadrature demodulation filter. This will significantly increase the
number of decoded frames
2019-09-30 19:32:21 +03:00
Manolis Surligas 110ab30d26 Add JSON converter block for the decoders
The decoders produce a PMT message containing several information about
the decoded frame. While this is very convenient for handling data
inside the flowgraph, it is not for third party applications. The JSON
converter block is responsible to serialize all the information
contained in a PMT originating from a decoded frame.

For simple demonstration some metadata were added on the AX.25 decoder.
These metadata are still a WIP and they subjected to changes.
2019-09-30 19:32:21 +03:00
Manolis Surligas 19c68f825d Port AX.25 decoder to the new architecture 2019-09-30 19:32:21 +03:00
Manolis Surligas ad590174e0 Implement the generic decoder API
To simplify the logic and allow an easy and more efficient way to add
new decoders, the new architecture uses only one decoder block.

This block takes as input a void* stream and produces PDUs with their
metadata. To do so, the block accepts a decoder object. Every decoder
should implement the virtual class decoder(). This class provides the
necessary API and an arbitrary number of decoders can be supported. The
decoding status is reported to the frame_decoder block through the
decoder_status_t structure.
2019-09-30 19:32:21 +03:00
Manolis Surligas 9fe6b6f274 Improvements on the overall structure of the project
* Improve performance of the Golay decoder
* Modernize some CMake modules of GNU Radio
* Re-introduce the CPPUnit automated tests
2019-09-30 19:32:21 +03:00
Manolis Surligas 89d4184393 Redesign of the AX.25 decoder
This commits introduces a significant redesign of the AX.25 decoding
block. Due to the poor AX.25 sync flag, the decoders exhibited too many
false alarms. To deal with this problem, we introduced the quadrature
demod filter block, that tried to measure the SNR based on the running
variance of the signal. The problem with that was that the user should
have to fine tune two parameters, the one related with the amplitude of
the incoming signal and the second one related with the window that the
calculations should take place. This solution worked until now, but we
can always increase the performance.

The new AX.25 decoder stores the bitstream in a queue and always tries
to exlpoit possible valid frames in the queue. If now sync flags have
been encountered, the queue is flushed. After a valid frame extraction,
bits corresponding to this frame are also deleted from the queue.

This technique requires more memory and CPU, but it increases a lot the
decoding performance.
2019-09-30 18:47:46 +03:00
Manolis Surligas 18bfad3277 Remove AX.25 address field check 2019-09-30 18:47:46 +03:00
Manolis Surligas 67ea02a248 Improve CW decoding
* Introduce the hysteresis option, in order the CW demodulator to adjust
properly the plateau length based on the WPM and any filtering that can
be used before

* Instead for a frame per word, now the CW decoder waits for 10 long
spaces before it commits a frame. With this way many words are placed on
the same frame telemetry decoding is easier
2019-09-30 18:47:46 +03:00
Alexandru Csete db08d31f53 Fix compiler warning when printing uint64_t 2018-12-03 02:14:58 +02:00
Alexandru Csete 512260ac88 Remove unneeded link references to gnuradio libs
These are already included with ${GNURADIO_ALL_LIBRARIES}.
2018-12-03 02:14:58 +02:00
Manolis Surligas 4ec333f5e6 Improve the generic frame acquisition
* Add CRC-16-IBM supported by CC11xx products
* Check CRC for frame validity
* Extract variable frame length
* Tested with Reaktor-Hello-World in-orbit frame
2018-12-03 01:42:14 +02:00
Manolis Surligas 4bcd9c8aaa Start the implementation of a generic frame synchronizer
The generic frame synchronizer will be able to adapt in a variety of
common framing schemes used by popular modems.
2018-12-02 00:48:14 +02:00
Manolis Surligas e91611f452 Implement Golay (24, 12, 8) encoder/decoder 2018-11-30 15:08:17 +02:00
Manolis Surligas 40aaeece1c Implement a shift register with dynamic size
std::bitset can be used only with compile time known size. Most of the flowgraphs take the shift register size as a parameter through the GRC so it cannot be used. This commit implements a shift register using the std::deque that supports arbitrary number of memory stages
2018-11-29 02:41:36 +02:00
Manolis Surligas 8fbca87084 Remove left over flowgraphs and files 2018-11-24 02:11:51 +02:00
Manolis Surligas 40a645f355 Fix boost `common_factor` deprecation warning 2018-11-24 00:43:21 +02:00
Manolis Surligas 63218b157b Add LRPT decoding flowgraph 2018-11-24 00:25:32 +02:00
Manolis Surligas 854becb15d Add LRPT decoder
Currently it performs only convolutional decoding
2018-11-24 00:25:32 +02:00
Manolis Surligas dcadfe9ab1 Add convolutional deinterleaver 2018-11-24 00:25:32 +02:00
Manolis Surligas 62fb14e3d1 Extract the coded LRPT CADU 2018-11-24 00:25:32 +02:00
Manolis Surligas a344bc498b Start the LRPT sync block 2018-11-24 00:25:32 +02:00
Manolis Surligas e7797003f7 Fix formatting 2018-10-27 20:44:41 +03:00
Patrick Dohmen 108f60c1e6 Fix spacecraft identification
The ```fox_id``` consists of three bits.
To mask these three bits a value of 0x7 is neccessary.

Added additional spacecraft identifiers.

Signed-off-by: Patrick Dohmen <dl4pd@darc.de>
2018-10-25 08:35:17 +02:00
Manolis Surligas 9ccd4cf4fb Use stroll() for proper long long int parsing 2018-09-17 23:26:09 +03:00
Corey Shields 571d98c924 change incoming freq to long long
allows for higher than 2.1ghz frequencies to be submitted via rigctl.

fixes #132
2018-09-08 11:37:17 -04:00
Manolis Surligas 16854f6495 Improve DUV decoder sensitivity
Due to a large gain in a LPF, large values negatively affected the
quadrature demod filter.
2018-07-30 14:05:23 +03:00