xerbo / aptdec Goto Github PK
View Code? Open in Web Editor NEWNOAA APT satellite imagery decoder
License: GNU General Public License v2.0
NOAA APT satellite imagery decoder
License: GNU General Public License v2.0
Same Pi / Buster combo with updated code from previous issue:
aptdec -m 2020-06-10-21-30-06-NOAA_18-map.png 2020-06-10-21-30-06-NOAA_18.wavv
2020-06-10-21-30-06-NOAA_18.zip
pi@Beta:~/temp $ aptdec -m 2020-06-10-21-30-06-NOAA_18-map.png 2020-06-10-21-30-06-NOAA_18.wav
Aptdec; (c) 2004-2009 Thierry Leconte F4DWV, Xerbo ([email protected]) 2019-2020
Input file: 2020-06-10-21-30-06-NOAA_18.wav
Input sample rate: 11025
Total rows: 1793
Channel A: 1 (visble)
Channel B: 4 (thermal-infrared)
WARNING: Map is too short to cover entire image
Adding map overlay
Segmentation fault
Potential link to #4.
Hi, I have this project idea:
https://forums.raspberrypi.com/viewtopic.php?t=358687
on how to get live decoding working on a Raspberry Pi 4 or Raspberry Pi 5.
My question is how would I "pipe" the audio from Gqrx to aptdec on Raspberry Pi OS?
Describe the bug
When building with -DCMAKE_BUILD_TYPE=Release
, gcc 11.1.0 gives the following error:
In function ‘FactPiv’,
inlined from ‘polyreg’ at /home/shuyuan/Build/aptdec/src/libs/reg.c:68:2:
/home/shuyuan/Build/aptdec/src/libs/reg.c:115:34: error: ‘A’ may be used uninitialized [-Werror=maybe-uninitialized]
115 | DET = DET * A[Row[N - 1]][N - 1];
| ~~~~~~~~~~~~~^~~~~~~
/home/shuyuan/Build/aptdec/src/libs/reg.c: In function ‘polyreg’:
/home/shuyuan/Build/aptdec/src/libs/reg.c:23:16: note: ‘A’ declared here
23 | double A[DMAX][DMAX]; /* A */
| ^
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/apt.dir/build.make:132: CMakeFiles/apt.dir/src/libs/reg.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:113: CMakeFiles/apt.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Clang 12.0.0 builds without errors. Also no error is given if the -DCMAKE_BUILD_TYPE=Release
flag is not set.
To Reproduce
git clone ...
cd aptdec
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release ..
Expected behaviour
The array A
should be initialized or a compiler option should be included to suppress the error, so that aptdec can be built successfully.
Build information
Commit 794d69c,
Using CMake, GCC 11.1.0.
This issue will serve as a marker for what's happening in development.
Soon:
pngio.c
with fireFuture:
Done:
rt
produces different results to tr
Cropping a capture's noise crops too much.
It's correct that it crops all the noise, but it also crops part of the captures where there's only slight noise effectively cropping too much.
Maybe it'd be possible to use a selector between 0 and 3 to tell aptdec how strong the noise should be before cropping?
I have just come to notice another issue that I hadn't noticed before... but after trying several recording I've come to realize this happens with every generated image: a large chunk of the left and right side of the image is cut off, compared with wxtoimg.
Clear example in these 2 images where a major part of England is cut off as well as part of Russia and Turkey.
The wxtoimg image (with England and Turkey):
https://i.imgur.com/vrp0zLx.png
The aptdec image (without England and Turkey):
https://i.imgur.com/DlcIfFC.png
Would it be possible to have aptdec be multi threaded?
Ideally with a parameter so we can indicate how many cores we would like to use for decoding (just like with the make command in the compiling process, eg. make -j2, -j3, -j4). This could potentially speed up generation of the images a lot.
Describe the bug
Installs to $CMAKE_INSTALL_PREFIX/lib/
regardless.
To Reproduce
Build, install.
Expected behaviour
Respect for CMAKE_INSTALL_LIBDIR so that the library can be installed to a distro-specific location (/usr/lib64
in my case).
Build information
Todays master, cmake.
Everytime I use a map, I see "WARNING: Map is too short to cover entire image". When subsequently I open the generated file, the map overlay is mispositioned over the capture. Can you help me out? For example I use this syntax to create an MCIR file and use the map generated by wxmap: aptdec -i m -e tdc -m /home/pi/weather/Maps/NOAA1820201022-113709-map.png /home/pi/weather/RAW/NOAA1820201022-113709.wav
This is how the map should be positioned (generated with wxtoimg): https://i.imgur.com/dJeIuJy.png
And this is how aptdec does it: https://i.imgur.com/g98pDjh.png
What am I doing wrong? I really want to start using more aptdec because its faster and imho gives better results when it comes to the amount of noise.
Thank you very much!
Code installed onto a Raspberry Pi 3, running latest fully patched Buster, using instructions for installing from https://github.com/Xerbo/aptdec.
Using the .wav file from a recent NOAA 18 pass over New Zealand:
2020-06-10-21-30-06-NOAA_18.zip
One of the examples for using aptdec from the README.md is:
./aptdec -i t -s 18 gqrx_20200527_115730_137914960.wav
Using the example .wav gives a segmentation fault.
./aptdec -i t -s 18 2020-06-10-21-30-06-NOAA_18.wav
Aptdec; (c) 2004-2009 Thierry Leconte F4DWV, Xerbo ([email protected]) 2019-2020
Input file: 2020-06-10-21-30-06-NOAA_18.wav
Input sample rate: 11025
Total rows: 1793
Channel A: 1 (visble)
Channel B: 4 (thermal-infrared)
Temperature... Done
Segmentation fault
The output file created is a zero length file:
-rw-r--r-- 1 pi pi 0 Jun 12 12:33 2020-06-10-21-30-06-NOAA_18-t.png
This .wav file processes well using wxtoimg, as seen at - https://kiwiweather.com/2020/06/10/2020-06-10-21-30-06-NOAA_18.html.
Following the quickstart guide, I get the following errors:
pi@gadget5:~/aptdec/build $ cmake -DCMAKE_BUILD_TYPE=Release ..
-- Found LibSndFile: /usr/lib/arm-linux-gnueabihf/libsndfile.so
CMake Error at CMakeLists.txt:93 (install):
install TARGETS given no RUNTIME DESTINATION for executable target
"aptdec".
CMake Error at CMakeLists.txt:97 (install):
install TARGETS given no LIBRARY DESTINATION for shared library target
"apt".
-- Configuring incomplete, errors occurred!
See also "/home/pi/aptdec/build/CMakeFiles/CMakeOutput.log".
=========================================
The top portion of the CMakeOutput.log is:
pi@gadget5:~/aptdec/build $ more CMakeFiles/CMakeOutput.log
The system is: Linux - 5.10.11-v7+ - armv7l
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeed
ed.
Compiler: /usr/bin/cc
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produce
d "a.out"
The C compiler identification is GNU, found in "/home/pi/aptdec/build/CMakeFiles
/3.13.4/CompilerIdC/a.out"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" s
ucceeded.
Compiler: /usr/bin/c++
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" p
roduced "a.out"
The CXX compiler identification is GNU, found in "/home/pi/aptdec/build/CMakeFil
es/3.13.4/CompilerIdCXX/a.out"
Determining if the C compiler works passed with the following output:
Change Dir: /home/pi/aptdec/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_1b926/fast"
/usr/bin/make -f CMakeFiles/cmTC_1b926.dir/build.make CMakeFiles/cmTC_1b926.dir/
build
make[1]: Entering directory '/home/pi/aptdec/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_1b926.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_1b926.dir/testCCompiler.c.o -c /home/pi/aptd
ec/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_1b926
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1b926.dir/link.txt --verbose
=1
/usr/bin/cc -rdynamic CMakeFiles/cmTC_1b926.dir/testCCompiler.c.o -o cmTC_
1b926
make[1]: Leaving directory '/home/pi/aptdec/build/CMakeFiles/CMakeTmp'
====================================================
(remainder of 46k file not shown)
Describe the bug
Attempting the installation method shown in the README, the project fails in the linking process:
[ 10%] Linking C executable aptdec
/usr/bin/ld: CMakeFiles/aptdec.dir/src/main.c.o:(.bss+0xc0): multiple definition of `TempPalette'; CMakeFiles/aptdec.dir/src/color.c.o:(.data+0xc0): first defined here
/usr/bin/ld: CMakeFiles/aptdec.dir/src/main.c.o:(.bss+0x0): multiple definition of `PrecipPalette'; CMakeFiles/aptdec.dir/src/color.c.o:(.data+0x0): first defined here
/usr/bin/ld: CMakeFiles/aptdec.dir/src/pngio.c.o:(.bss+0x20): multiple definition of `PrecipPalette'; CMakeFiles/aptdec.dir/src/color.c.o:(.data+0x0): first defined here
/usr/bin/ld: CMakeFiles/aptdec.dir/src/pngio.c.o:(.bss+0xe0): multiple definition of `TempPalette'; CMakeFiles/aptdec.dir/src/color.c.o:(.data+0xc0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/aptdec.dir/build.make:226: aptdec] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/aptdec.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
To Reproduce
Using Fedora 33:
sudo dnf install cmake git gcc libsndfile-devel libpng-devel
git clone https://github.com/Xerbo/aptdec.git && cd aptdec
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
Expected behaviour
The software is linked correctly.
Link to audio
None
Build information
13d9810
Using CMake
With the introduction of the complex data type, aptdec no longer compiles with MSVC, which is a shame, as the latest code can't be included in SDRangel
It's possible to write a little abstraction layer, so complex types can be used both with gcc/clang/MSVC, see here as an example:
https://github.com/srcejon/codec2/blob/windows-freedv/src/compiler.h
Would you be open to a patch that used something along these lines?
Comment in tempcal() says:
// Rescale to 0-255 for -120°C to +40°C
Is it actually -100C to +60C?
After doing the git pull and then a make to test the fix for #3, the following warnings were seen (same Pi / Buster combo). These may result in issues.
pi@Beta:~/aptdec $ make
gcc -O3 -g -Wall -Wextra -I. -c -o pngio.o pngio.c
pngio.c: In function ‘prow2crow’:
pngio.c:262:16: warning: comparison between pointer and integer
if(*palette == NULL)
^~
pngio.c: In function ‘ImageOut’:
pngio.c:297:3: warning: missing initializer for field ‘text_length’ of ‘png_text’ {aka ‘struct png_text_struct’} [-Wmissing-field-initializers]
{PNG_TEXT_COMPRESSION_NONE, "Software", VERSION},
^
In file included from pngio.c:20:
/usr/include/png.h:587:11: note: ‘text_length’ declared here
size_t text_length; /* length of the text string */
^~~~~~~~~~~
pngio.c:298:3: warning: missing initializer for field ‘itxt_length’ of ‘png_text’ {aka ‘struct png_text_struct’} [-Wmissing-field-initializers]
{PNG_TEXT_COMPRESSION_NONE, "Channel", desc, sizeof(desc)},
^
In file included from pngio.c:20:
/usr/include/png.h:588:11: note: ‘itxt_length’ declared here
size_t itxt_length; /* length of the itxt string */
^~~~~~~~~~~
pngio.c:299:3: warning: missing initializer for field ‘itxt_length’ of ‘png_text’ {aka ‘struct png_text_struct’} [-Wmissing-field-initializers]
{PNG_TEXT_COMPRESSION_NONE, "Description", "NOAA satellite image", 20}
^
In file included from pngio.c:20:
/usr/include/png.h:588:11: note: ‘itxt_length’ declared here
size_t itxt_length; /* length of the itxt string */
^~~~~~~~~~~
pngio.c: In function ‘initWriter’:
pngio.c:465:3: warning: missing initializer for field ‘text_length’ of ‘png_text’ {aka ‘struct png_text_struct’} [-Wmissing-field-initializers]
{PNG_TEXT_COMPRESSION_NONE, "Software", VERSION},
^
In file included from pngio.c:20:
/usr/include/png.h:587:11: note: ‘text_length’ declared here
size_t text_length; /* length of the text string */
^~~~~~~~~~~
pngio.c:466:3: warning: missing initializer for field ‘itxt_length’ of ‘png_text’ {aka ‘struct png_text_struct’} [-Wmissing-field-initializers]
{PNG_TEXT_COMPRESSION_NONE, "Channel", desc, sizeof(desc)},
^
In file included from pngio.c:20:
/usr/include/png.h:588:11: note: ‘itxt_length’ declared here
size_t itxt_length; /* length of the itxt string */
^~~~~~~~~~~
pngio.c:467:3: warning: missing initializer for field ‘itxt_length’ of ‘png_text’ {aka ‘struct png_text_struct’} [-Wmissing-field-initializers]
{PNG_TEXT_COMPRESSION_NONE, "Description", "NOAA satellite image", 20}
^
In file included from pngio.c:20:
/usr/include/png.h:588:11: note: ‘itxt_length’ declared here
size_t itxt_length; /* length of the itxt string */
^~~~~~~~~~~
gcc -o aptdec main.o image.o dsp.o filter.o reg.o pngio.o median.o color.o -lm -lsndfile -lpng
Hello, I'm implementing false color in my project using the same palette method you are using. If possible, I would like to know how are you generating the N19-HRPT-Falsecolor.png palette (or to know from where did you get it).
Also, adding an acknowledgement to my program pointing here (Xerbo/aptdec) is ok?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.