GithubHelp home page GithubHelp logo

meteordemod's People

Contributors

cirromulus avatar digitelektro avatar mihajlo2003petkovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

meteordemod's Issues

Needed to add path of opencv library

Not a problem , but after I compiled opencv and meteordemod and tried to run I got an error:
meteordemod: error while loading shared libraries: libopencv_imgcodecs.so.406: cannot open shared object file: No such file or directory
So I had to use the export command to point to where it was installed:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/arm-linux-gnueabihf
After that all works great!
Not sure if I omitted something along the way.

Manual Build of MeteorDemod

I'd installed opencv using:
sudo apt install python3-opencv
Then following the instructions to manually install MeteorDemod (I'm using a Raspberry Pi, so can't pull from the Debian repository), all is fine (or looks to be with no reported errors) until:
make -j4
Most of the way through:
Scanning dependencies of target meteordemod

[ 34%] Building CXX object CMakeFiles/meteordemod.dir/main.cpp.o
[ 38%] Building CXX object CMakeFiles/meteordemod.dir/decoder/bitio.cpp.o
[ 38%] Building CXX object CMakeFiles/meteordemod.dir/imageproc/spreadimage.cpp.o
[ 40%] Building CXX object CMakeFiles/meteordemod.dir/imageproc/threatimage.cpp.o
In file included from /home/pi/MeteorDemod/imageproc/threatimage.cpp:1:
/home/pi/MeteorDemod/imageproc/threatimage.h:4:10: fatal error: opencv2/core.hpp: No such file or directory
    4 | #include <opencv2/core.hpp>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/meteordemod.dir/build.make:108: CMakeFiles/meteordemod.dir/imageproc/threatimage.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/pi/MeteorDemod/imageproc/spreadimage.cpp:1:
/home/pi/MeteorDemod/imageproc/spreadimage.h:6:10: fatal error: opencv2/core.hpp: No such file or directory
    6 | #include <opencv2/core.hpp>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/meteordemod.dir/build.make:95: CMakeFiles/meteordemod.dir/imageproc/spreadimage.cpp.o] Error 1
In file included from /home/pi/MeteorDemod/decoder/packetparser.h:6,
                 from /home/pi/MeteorDemod/main.cpp:4:
/home/pi/MeteorDemod/decoder/meteorimage.h:6:10: fatal error: opencv2/core.hpp: No such file or directory
    6 | #include <opencv2/core.hpp>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/meteordemod.dir/build.make:82: CMakeFiles/meteordemod.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/meteordemod.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

It looks like the code is looking for OpenCV2 but not finding it.

I've validated that the pre-req of OpenCV for python is installed:

python3
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.6.0'

Composite Images - how to create

The readme shows an example Composite IR Image (Composite IR Image) which covers multiple different Meteor M-2 passes.

Can you document how to create a composite pass, with an example in the readme?

Boundaries seem to drift

I have been noticing that boundary alignment seems to be on and off on different passes.
I download keps each day and clock time is accurate, don't know if the PC time clock varies.
Anyone else notice that?
equidistant_rain_IR_2022-12-12-22-20-59_sm
mercator_rain_IR_2022-12-14-12-0-29_sm

ReadMe - settings.ini file location not specified

In the readme it has the line:
Other settings can be found in the settings.ini file.
However the location of this file isn't specified.

Looking in the source code, settings.cpp in gerREsourcesPath, there is a default location of ~.config/meteordemod/, however there is code that will look elsewhere.

Could you add the default location of the settings.ini file to the readme to make it easier for people to locate this file?

Equidistant composite projection - unexpected viewpoint

Equidistant composites can result in an unusual viewpoint which is less than ideal.

equidistant_2022-12-03-19-37-18_221_composite

Not quite sure what is going wrong here, but given that the south pole is aligned with the right hand side of the image, I suspect there could be a link with where the code is setting a maximum / minimum value.

Source file for settings.ini and the .s and .tle files - https://kiwiweather.com/downloads/meteordemod.zip (339MB - let me know when you've downloaded this so I can remove it). I can supply the .wav files, but that is about twice as much space!

Commands used to generate the images:
meteordemod -i 2022-12-01-16-41-42-METEOR-M_2.s -t 2022-12-01-16-41-42-METEOR-M_2weather.tle -f jpg -d 01-12-2022
meteordemod -i 2022-12-01-18-21-57-METEOR-M_2.s -t 2022-12-01-18-21-57-METEOR-M_2weather.tle -f jpg -d 01-12-2022
meteordemod -i 2022-12-02-06-41-13-METEOR-M_2.s -t 2022-12-02-06-41-13-METEOR-M_2weather.tle -f jpg -d 02-12-2022

Example Command?

It took me a few hours to get OpenCV installed. I think it is good now. I was finally able to compile. I did get some errors but I think they were really warnings. It seems to have compiled fine. (The warnings had something to do with how variables were being passed after 7.2, I didn't copy one in time and it not in my terminal anymore.)

What I am wondering is if you can provide an example call to the program?

I was thinking it would be something like: MeteorDemod input.qpsk output.bmp

I get command not found. I am not sure if I did not install everything correctly or don't know the proper command.

Readme Correction

Not a big deal but on a fresh installation it needs to be

git clone https://github.com/Digitelektro/MeteorDemod.git

instead of:

git pull https://github.com/Digitelektro/MeteorDemod.git
cd MeteorDemod
git submodule update --init --recursive
mkdir build && cd build
cmake ../
make
sudo make install

Invalid number of arguments, exiting... - when using -h or --help

I'd expect when using the argument -h or --help that I'd not see an error message for "Invalid number of arguments, exiting...".

See below...

pi@alpha:~/MeteorDemod/build $ meteordemod -h
Invalid number of arguments, exiting...
MeteorDemod Version 2.4.4
-h      --help  Print help
-t      --tle   TLE file required for pass calculation
-i      --input Input S file containing softbits
-o      --output        Output folder where generated files will be placed
-d      --date  Specify pass date, format should be dd-mm-yyyy
-f      --format        Output image format (bmp, jpg)
-s      --symbolrate    Set symbol rate for demodulator
-m      --mode  Set demodulator mode to qpsk or oqpsk
-diff   --diff  Use differential decoding (Maybe required for newer satellites)
-int    --int   Deinterleave (Maybe required for newer satellites)
-b      --brokenM2      Broken M2 modulation

pi@alpha:~/MeteorDemod/build $ meteordemod --help
Invalid number of arguments, exiting...
MeteorDemod Version 2.4.4
-h      --help  Print help
-t      --tle   TLE file required for pass calculation
-i      --input Input S file containing softbits
-o      --output        Output folder where generated files will be placed
-d      --date  Specify pass date, format should be dd-mm-yyyy
-f      --format        Output image format (bmp, jpg)
-s      --symbolrate    Set symbol rate for demodulator
-m      --mode  Set demodulator mode to qpsk or oqpsk
-diff   --diff  Use differential decoding (Maybe required for newer satellites)
-int    --int   Deinterleave (Maybe required for newer satellites)
-b      --brokenM2      Broken M2 modulation

Map alignment

Hi folks - i am working on getting this into https://github.com/jekhokie/raspberry-noaa-v2 as a processing option. I am loving meteordemod - and have it working - however i am struggling with map alignment.

GIven the only data passed to meteordemod is the day and the .tle file I am assuming that the alignment is evaluated from some data in the .s source file?

If so i wonder why the .s file we already generate (using https://github.com/jekhokie/raspberry-noaa-v2/blob/master/scripts/audio_processors/rtlsdr_m2_lrpt_rx.py ) which works with METDET_ARM (the current M2 decoding) and indeed produces images with meteordemod however since there are no maps with METDET_ARM output I can't be sure the source .s files actually have what meteordemod needs for the accurate overlay.

Or perhaps i need to specufy Date-Time when i pass that into meteordemod as a param? Any tips?

Embedding meteordemod Binary in raspberry-noaa-v2?

Hi @Digitelektro!

I'm working on the raspberry-noaa-v2 framework (https://github.com/jekhokie/raspberry-noaa-v2) and many of us are interested in using meteordemod on the Raspberry Pi but don't want to obviously build OpenCV and the binary every time a new install comes up. Would you be ok with me committing a pre-built meteordemod binary to the raspberry-noaa-v2 framework and distributing it and required resources as part of the installation so that users don't have to mess with/wait for building the binary each time something is installed?

I'm happy to add credit to the README pointing to this repository and your user profile if that's acceptable to you as a tradeoff? Thanks!

CMake error for OpenCV path

When I install all the dependencies and run cmake ../, this is the error I get:

CMake Error at CMakeLists.txt:41 (find_package):
  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/home/pi/MeteorDemod/build/CMakeFiles/CMakeOutput.log".

Partial image decode - premature end of signal detection

I've been experimenting with MeteorDemod, comparing the results I'm getting with using meteor_demod and medet_arm.

Example output from a 18 degree pass this morning - https://kiwiweather.com/2022/11/30/images/2022-11-30-18-42-36-METEOR-M_2-fixed-rectified.jpg
This was using:

This data shows the pass over New Zealand this morning, which started at 18:42:36 on the 30th Nov 2022 UTC.

However using MeteorDemod, using the command:
meteordemod -i /home/pi/wxcapture/audio/2022-11-30-18-42-36-METEOR-M_2.wav -t /home/pi/wxcapture/output/2022-11-30-18-42-36-METEOR-M_2weather.tle -o /home/pi/md/ -f jpg
I'm getting a much shorter output file.
spread_221_2022-12-1-18-48-9

I've updated the settings.ini file with the following changes:

  • JpgQuality=90 - to cut down the file sizes whilst I am experimenting
  • Latitude=-36.920 - for fairly close to where I live in Auckland, New Zealand
  • Longitude=-174.800 - note that East has a negative sign, which is the opposite to Google Maps which uses a negative sign for West, not East (ideally this should be documented as this could confuse people, like I was initially, until looking at the projected images which had the image inverted relative to the projection lines)

It looks like the thick black band shown is enough to make the processing think that it has reached the end of the available signal.
image

Is it possible to make this "end of signal" detection a bit more forgiving?

Composite file selection use date / time in filename, not image age

In main.cpp, searchForImages, the code looks for which data sets to use for creating composite images based on the file creation date being within 6 hours (21,600 seconds) of the current time:
if(entry.path().extension() == ".gcp" && fileCreatedSec < 21600) { //6h

This works well when images are created just after each pass has been created when the file creation time for the .gcp file is accurate. However when processing pass .wav files in a batch mode, i.e. some time after the passes, when several .gcp files will have been created in the last few minutes or so, this will inaccurately match file data sets to be included in the composite data selection.

What I'd suggest is to parse the filenames for the gcp files to get the age of the passes as this directly reflects the pass date time and not when the pass data was processed:
2022-12-1-18-27-38.gcp

settings.ini - documentation

Can the settings.ini file be documented to explain in more detail what each configuration does in the readme, ideally with some examples.

error while building meterodemod

pi@raspberrypi:/opencv $ pwd
/home/pi/opencv
pi@raspberrypi:
/opencv $ cmake ../ -DBUILD_LIST=core,imgproc,imgcodecs -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_SHARED_LINKER_FLAGS=-latomic
-- Build type: Release
CMake Error at /usr/share/cmake-3.18/Modules/ExternalProject.cmake:2555 (message):
No download info given for 'sgp4' and its source directory:

/home/pi/external/sgp4

is not an existing non-empty directory. Please specify one of:

  • SOURCE_DIR with an existing non-empty directory
  • DOWNLOAD_COMMAND
  • URL
  • GIT_REPOSITORY
  • SVN_REPOSITORY
  • HG_REPOSITORY
  • CVS_REPOSITORY and CVS_MODULE
    Call Stack (most recent call first):
    /usr/share/cmake-3.18/Modules/ExternalProject.cmake:3206 (_ep_add_download_command)
    CMakeLists.txt:23 (ExternalProject_Add)

CMake Error at /usr/share/cmake-3.18/Modules/ExternalProject.cmake:2555 (message):
No download info given for 'libcorrect' and its source directory:

/home/pi/external/libcorrect

is not an existing non-empty directory. Please specify one of:

  • SOURCE_DIR with an existing non-empty directory
  • DOWNLOAD_COMMAND
  • URL
  • GIT_REPOSITORY
  • SVN_REPOSITORY
  • HG_REPOSITORY
  • CVS_REPOSITORY and CVS_MODULE
    Call Stack (most recent call first):
    /usr/share/cmake-3.18/Modules/ExternalProject.cmake:3206 (_ep_add_download_command)
    CMakeLists.txt:32 (ExternalProject_Add)

-- Configuring incomplete, errors occurred!
See also "/home/pi/opencv/CMakeFiles/CMakeOutput.log".

Cities marked in wrong country

With the equidistant render of Meteor I've noticed twice a wrong location marker.
I have seen both Brighton as well as Canberra located in Russia. With the other renders it's fine.
TLEs are updated on a daily basis.

Receiver location incorrectly marked

As per the example, the X to mark the receiver location is appearing in the wrong location.

equidistant_221_2022-12-1-18-27-38

From the settings.ini file (note - not the exact location of my receiver, but within 25km of it:

Latitude=-36.920
Longitude=-174.800

As per Google Maps, this is located within Auckland, not a significant distance out in the Pacific on what looks to be the same latitude, but a more easterly longitude.
image

What I suspect may be happening is that the longitude is impacted by a calculation linked to the current time in New Zealand being UTC + 13 since it is during our daylight savings time for being summer, the opposite for the northern hemisphere. We're normally on UTC + 12 over our winter.

Source file for settings.ini and the .s and .tle files - https://kiwiweather.com/downloads/meteordemod.zip (339MB - let me know when you've downloaded this so I can remove it). I can supply the .wav files, but that is about twice as much space!

Commands used to generate the images:
meteordemod -i 2022-12-01-16-41-42-METEOR-M_2.s -t 2022-12-01-16-41-42-METEOR-M_2weather.tle -f jpg -d 01-12-2022
meteordemod -i 2022-12-01-18-21-57-METEOR-M_2.s -t 2022-12-01-18-21-57-METEOR-M_2weather.tle -f jpg -d 01-12-2022
meteordemod -i 2022-12-02-06-41-13-METEOR-M_2.s -t 2022-12-02-06-41-13-METEOR-M_2weather.tle -f jpg -d 02-12-2022

QT5 Error

While trying to install this I got this error:

CMake Error at cmake/OpenCVFindLibsGUI.cmake:18 (find_package):
Could not find a package configuration file provided by "Qt5" with any of
the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:707 (include)

Mercator images / Mercator composite images overlapping the international date line - unexpected behaviour

Capturing images from NZ, I'm about 174 west, so captures can often overlap the dateline, i.e. 180 east / west, which results in a rendering which covers from 180 East through 0 through 180 West.

Example to illustrate the issue:

mercator_2022-12-03-19-24-01_68_rain_composite

Can the code be updated to handle this with just showing the area covered by the captured areas? This will also have a significant impact on performance as this requires a lot less rendering time for the images.

Source file for settings.ini and the .s and .tle files - https://kiwiweather.com/downloads/meteordemod.zip (339MB - let me know when you've downloaded this so I can remove it). I can supply the .wav files, but that is about twice as much space!

Commands used to generate the images:
meteordemod -i 2022-12-01-16-41-42-METEOR-M_2.s -t 2022-12-01-16-41-42-METEOR-M_2weather.tle -f jpg -d 01-12-2022
meteordemod -i 2022-12-01-18-21-57-METEOR-M_2.s -t 2022-12-01-18-21-57-METEOR-M_2weather.tle -f jpg -d 01-12-2022
meteordemod -i 2022-12-02-06-41-13-METEOR-M_2.s -t 2022-12-02-06-41-13-METEOR-M_2weather.tle -f jpg -d 02-12-2022

Output filenames

I've just generated images from a pass at 18:48 on the 1st Dec 2022 local time for a pass from this morning. However the filename used in the output reflects the date / time the output files were generated.

Is it possible to have the date / time component of the filename reflect the pass date / time, ideally using UTC time and not local?

pi@alpha:~/md $ ls
2022-12-1-18-48-9_125.bmp                   mercator_221_2022-12-1-18-48-9.jpg
2022-12-1-18-48-9_221.bmp                   mercator_IR_2022-12-1-18-48-9.jpg
2022-12-1-18-48-9_64.bmp                    mercator_rain_125_2022-12-1-18-48-9.jpg
2022-12-1-18-48-9_65.bmp                    mercator_rain_221_2022-12-1-18-48-9.jpg
2022-12-1-18-48-9_68.bmp                    mercator_rain_IR_2022-12-1-18-48-9.jpg
2022-12-1-18-48-9.gcp                       mercator_thermal_2022-12-1-18-48-9.jpg
equidistant_125_2022-12-1-18-48-9.jpg       spread_125_2022-12-1-18-48-9.jpg
equidistant_221_2022-12-1-18-48-9.jpg       spread_221_2022-12-1-18-48-9.jpg
equidistant_IR_2022-12-1-18-48-9.jpg        spread_IR_2022-12-1-18-48-9.jpg
equidistant_rain_125_2022-12-1-18-48-9.jpg  spread_rain_125_2022-12-1-18-48-9.jpg
equidistant_rain_221_2022-12-1-18-48-9.jpg  spread_rain_221_2022-12-1-18-48-9.jpg
equidistant_rain_IR_2022-12-1-18-48-9.jpg   spread_rain_IR_2022-12-1-18-48-9.jpg
equidistant_thermal_2022-12-1-18-48-9.jpg   spread_thermal_2022-12-1-18-48-9.jpg
mercator_125_2022-12-1-18-48-9.jpg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.