You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 4.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. ![Aptdec logo](textlogo.png)
  2. Copyright (c) 2004-2009 Thierry Leconte (F4DWV), Xerbo (xerbo@protonmail.com) 2019-2020
  3. ## Description
  4. Aptdec is an FOSS program that decodes images transmitted by NOAA weather satellites. These satellites transmit continuously (among other things), medium resolution (1px/4km) images of the earth on 137 MHz.
  5. These transmissions could be easily received with an simple antenna and cheap SDR. Then the transmission can easily be decoded in narrow band FM mode.
  6. Aptdec can convert these audio files into `png` images.
  7. For each audio file up to 6 images can be generated:
  8. 1. Raw image: contains the 2 transmitted channel images + telemetry and synchronization pulses.
  9. 2. Calibrated channel A image
  10. 3. Calibrated channel B image
  11. 4. Temperature compensated IR image
  12. 5. False color image
  13. 6. MCIR (Map Color InfraRed) image
  14. The input audio file must be mono with a sample rate in the range of 4160-62400 Hz, lower samples rates will process faster.
  15. Aptdec uses `libsndfile` to read the input audio, so any format supported by `libsndfile` may be used (however it has only tested with `.wav` files).
  16. ## Compilation
  17. Aptdec is portable since it is written in standard C.
  18. It has successfully compiled and ran on Debian with both `gcc`, `clang` and `tcc` and will most likely work on any Unix platform.
  19. Just edit the Makefile and run `make` (no configure script as of right now).
  20. Aptdec uses `libsndfile`, `libpng` and `libm`.
  21. The `snd.h` and `png.h` headers must be present on your system.
  22. If they are not on standard path, edit the include path in the Makefile.
  23. ## Usage
  24. To compile
  25. `make`
  26. To run without installing
  27. `./aptdec [options] audio files...`
  28. To install
  29. `sudo make install`
  30. To run once installed
  31. `aptdec [options] audio files...`
  32. To uninstall
  33. `sudo make uninstall`
  34. ## Options
  35. ```
  36. -i [r|a|b|c|t|m]
  37. Output image type
  38. Raw (r), Channel A (a), Channel B (b), False Color (c), Temperature (t) or MCIR (m)
  39. Default: "ab"
  40. -d <dir>
  41. Images destination directory (optional)
  42. Default: Current directory
  43. -s [15|16|17|18|19]
  44. Satellite number
  45. For temperature calibration
  46. Default: "19"
  47. -e [r|a|b|c|t|m]
  48. Effects
  49. Histogram equalise (h), Crop Telemetry (t), Denoise (d), Precipitation (p) or Linear equalise (l)
  50. Defaults: off
  51. -m <file>
  52. Map file generated by wxmap
  53. -o <filename>
  54. Output image filename
  55. -r
  56. Realtime decode. When decoding in realtime it is highly recommended to choose a plain raw image.
  57. ```
  58. ## Output
  59. Generated images are outputted in PNG and are 24 bit RGB for all image types apart from pure greyscale images.
  60. Image names are `audiofile-x.png`, where `x` is:
  61. - `r` for raw images
  62. - Sensor ID (`1`, `2`, `3A`, `3B`, `4`, `5`) for channel A|B images
  63. - `c` for false color
  64. - `t` for temperature calibrated images
  65. - `m` for MCIR images
  66. Currently there are 6 available effects:
  67. - `t` for crop telemetry, off by default, only has effects on raw images
  68. - `h` for histogram equalise, stretch the colors in the image to black and white
  69. - `d` for a median denoise filter
  70. - `p` for a precipitation overlay
  71. - `f` to flip the image (for southbound passes)
  72. - `l` to linearly equalise the image (recommended for falsecolor images)
  73. ## Examples
  74. `aptdec -d images -i ab *.wav`
  75. This will process all `.wav` files in the current directory, generate calibrated channel A and B images and put them in the `images` directory.
  76. `aptdec -e dh -i b audio.wav`
  77. Decode `audio.wav` with denoise and histogram equalization and save it into the current directory.
  78. ## Realtime decoding
  79. As of recently a realtime output was added allowing realtime decoding of images.
  80. ```
  81. mkfifo /tmp/aptaudio
  82. aptdec /tmp/aptaudio
  83. sox -t pulseaudio alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -c 1 -t wav /tmp/aptaudio
  84. ```
  85. Perform a realtime decode with the audio being played out of `alsa_output.pci-0000_00_1b.0.analog`.
  86. ## Further reading
  87. [https://noaasis.noaa.gov/NOAASIS/pubs/Users_Guide-Building_Receive_Stations_March_2009.pdf](https://noaasis.noaa.gov/NOAASIS/pubs/Users_Guide-Building_Receive_Stations_March_2009.pdf)
  88. [https://web.archive.org/web/20141220021557/https://www.ncdc.noaa.gov/oa/pod-guide/ncdc/docs/klm/tables.htm](https://web.archive.org/web/20141220021557/https://www.ncdc.noaa.gov/oa/pod-guide/ncdc/docs/klm/tables.htm)
  89. ## License
  90. See LICENSE.