Added minimal documentation
This commit is contained in:
parent
dc2cb5ca29
commit
932369429a
|
@ -9,9 +9,10 @@ for decoding signals from various scientific and academic sattelites.
|
||||||
* CMake ( > 3.1)
|
* CMake ( > 3.1)
|
||||||
* G++ (with C++11 support)
|
* G++ (with C++11 support)
|
||||||
* VOLK
|
* VOLK
|
||||||
* libogg
|
* libogg
|
||||||
* libvorbis
|
* libvorbis
|
||||||
* libpng
|
* libpng
|
||||||
|
* libpng++
|
||||||
* git
|
* git
|
||||||
|
|
||||||
**Optional**
|
**Optional**
|
||||||
|
@ -34,12 +35,12 @@ If this is the first time you are building the gr-satnogs module run
|
||||||
By default, the **SatNOGS** module will use the default installation prefix.
|
By default, the **SatNOGS** module will use the default installation prefix.
|
||||||
This highly depends on the Linux distribution. You can use the `CMAKE_INSTALL_PREFIX`
|
This highly depends on the Linux distribution. You can use the `CMAKE_INSTALL_PREFIX`
|
||||||
variable to alter the default installation path.
|
variable to alter the default installation path.
|
||||||
E.g:
|
E.g:
|
||||||
|
|
||||||
`cmake -DCMAKE_INSTALL_PREFIX=/usr ..`
|
`cmake -DCMAKE_INSTALL_PREFIX=/usr ..`
|
||||||
|
|
||||||
Also, by default the build system enables a set of blocks used for debugging
|
Also, by default the build system enables a set of blocks used for debugging
|
||||||
during the development. The enable/disable switch is controled through the
|
during the development. The enable/disable switch is controled through the
|
||||||
`INCLUDE_DEBUG_BLOCKS` boolean variable. If for example, you want to disable the
|
`INCLUDE_DEBUG_BLOCKS` boolean variable. If for example, you want to disable the
|
||||||
debugging blocks, the **CMake** command would be:
|
debugging blocks, the **CMake** command would be:
|
||||||
|
|
||||||
|
@ -64,4 +65,4 @@ For more indormation about SatNOGS please visit our [site](https://satnogs.org/)
|
||||||
|
|
||||||
© 2016,2017 [Libre Space Foundation](http://librespacefoundation.org).
|
© 2016,2017 [Libre Space Foundation](http://librespacefoundation.org).
|
||||||
|
|
||||||
Licensed under the [GPLv3](LICENSE).
|
Licensed under the [GPLv3](LICENSE).
|
||||||
|
|
|
@ -31,6 +31,8 @@ namespace gr
|
||||||
{
|
{
|
||||||
namespace satnogs
|
namespace satnogs
|
||||||
{
|
{
|
||||||
|
// Noaa apt sync pattern A
|
||||||
|
// (see https://sourceforge.isae.fr/attachments/download/1813/apt_synch.gif)
|
||||||
const bool SYNCA_SEQ[] = {false, false, false, false,
|
const bool SYNCA_SEQ[] = {false, false, false, false,
|
||||||
true, true, false, false, // Pulse 1
|
true, true, false, false, // Pulse 1
|
||||||
true, true, false, false, // Pulse 2
|
true, true, false, false, // Pulse 2
|
||||||
|
@ -42,6 +44,8 @@ namespace gr
|
||||||
false, false, false, false,
|
false, false, false, false,
|
||||||
false, false, false, false};
|
false, false, false, false};
|
||||||
|
|
||||||
|
// Noaa apt sync pattern B
|
||||||
|
// (see https://sourceforge.isae.fr/attachments/download/1813/apt_synch.gif)
|
||||||
const bool SYNCB_SEQ[] = {false, false, false, false,
|
const bool SYNCB_SEQ[] = {false, false, false, false,
|
||||||
true, true, true, false, false,
|
true, true, true, false, false,
|
||||||
true, true, true, false, false,
|
true, true, true, false, false,
|
||||||
|
@ -63,6 +67,7 @@ namespace gr
|
||||||
flip));
|
flip));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The private constructor
|
* The private constructor
|
||||||
*/
|
*/
|
||||||
|
@ -90,6 +95,7 @@ namespace gr
|
||||||
init_images();
|
init_images();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
noaa_apt_sink_impl::init_images () {
|
noaa_apt_sink_impl::init_images () {
|
||||||
size_t len = d_filename_png.size();
|
size_t len = d_filename_png.size();
|
||||||
|
@ -109,6 +115,7 @@ namespace gr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
noaa_apt_sink_impl::write_image (png::image<png::gray_pixel> image, std::string filename) {
|
noaa_apt_sink_impl::write_image (png::image<png::gray_pixel> image, std::string filename) {
|
||||||
if(d_flip) {
|
if(d_flip) {
|
||||||
|
@ -130,6 +137,7 @@ namespace gr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
noaa_apt_sink_impl::write_images () {
|
noaa_apt_sink_impl::write_images () {
|
||||||
write_image(d_full_image, d_full_filename);
|
write_image(d_full_image, d_full_filename);
|
||||||
|
@ -140,6 +148,7 @@ namespace gr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
noaa_apt_sink_impl::~noaa_apt_sink_impl () {
|
noaa_apt_sink_impl::~noaa_apt_sink_impl () {
|
||||||
write_images();
|
write_images();
|
||||||
}
|
}
|
||||||
|
@ -159,6 +168,7 @@ namespace gr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
noaa_apt_sink_impl::skip_to (size_t new_x, size_t pos, const float *samples) {
|
noaa_apt_sink_impl::skip_to (size_t new_x, size_t pos, const float *samples) {
|
||||||
if(new_x > d_current_x) {
|
if(new_x > d_current_x) {
|
||||||
|
@ -170,6 +180,7 @@ namespace gr
|
||||||
d_current_x = new_x;
|
d_current_x = new_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
noaa_apt_sync_marker
|
noaa_apt_sync_marker
|
||||||
noaa_apt_sink_impl::is_marker(size_t pos, const float *samples) {
|
noaa_apt_sink_impl::is_marker(size_t pos, const float *samples) {
|
||||||
size_t count_a = 0;
|
size_t count_a = 0;
|
||||||
|
@ -199,6 +210,7 @@ namespace gr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
noaa_apt_sink_impl::work (int noutput_items,
|
noaa_apt_sink_impl::work (int noutput_items,
|
||||||
gr_vector_const_void_star &input_items,
|
gr_vector_const_void_star &input_items,
|
||||||
|
@ -217,7 +229,6 @@ namespace gr
|
||||||
if(d_synchronize_opt) {
|
if(d_synchronize_opt) {
|
||||||
if(is_marker(i, in) == noaa_apt_sync_marker::SYNC_A) {
|
if(is_marker(i, in) == noaa_apt_sync_marker::SYNC_A) {
|
||||||
skip_to(39, i, in);
|
skip_to(39, i, in);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(is_marker(i, in) == noaa_apt_sync_marker::SYNC_B) {
|
else if(is_marker(i, in) == noaa_apt_sync_marker::SYNC_B) {
|
||||||
skip_to(d_width / 2 + 39, i, in);
|
skip_to(d_width / 2 + 39, i, in);
|
||||||
|
|
|
@ -71,21 +71,33 @@ namespace gr
|
||||||
gr_vector_void_star &output_items);
|
gr_vector_void_star &output_items);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// Generate empty images and filenames to save them to
|
||||||
void
|
void
|
||||||
init_images ();
|
init_images ();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if the history portion of the input contains a sync marker.
|
||||||
|
* Matches the 40 samples before pos against the patterns.
|
||||||
|
*/
|
||||||
noaa_apt_sync_marker
|
noaa_apt_sync_marker
|
||||||
is_marker (size_t pos, const float *samples);
|
is_marker (size_t pos, const float *samples);
|
||||||
|
|
||||||
|
// Set the pixel indicated by coordinates in the images (both full and split)
|
||||||
void
|
void
|
||||||
set_pixel (size_t x, size_t y, float sample);
|
set_pixel (size_t x, size_t y, float sample);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Updates d_current_x to new_x,
|
||||||
|
* while using historical samples to fill any resulting gaps in the images.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
skip_to (size_t new_x, size_t pos, const float *samples);
|
skip_to (size_t new_x, size_t pos, const float *samples);
|
||||||
|
|
||||||
|
// Write the images to disk
|
||||||
void
|
void
|
||||||
write_images ();
|
write_images ();
|
||||||
|
|
||||||
|
// Write a single image to disk, also takes care of flipping
|
||||||
void
|
void
|
||||||
write_image (png::image<png::gray_pixel> image, std::string filename);
|
write_image (png::image<png::gray_pixel> image, std::string filename);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue