25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 4.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. Palleted 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|t|m|p]
  37. Output image type
  38. Raw (r), Channel A (a), Channel B (b), Palleted (p), 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. -p <filename>
  56. Path to palette
  57. -r
  58. Realtime decode. When decoding in realtime it is highly recommended to choose a plain raw image.
  59. ```
  60. ## Output
  61. Generated images are outputted in PNG and are 24 bit RGB for all image types apart from pure greyscale images.
  62. Image names are `audiofile-x.png`, where `x` is:
  63. - `r` for raw images
  64. - `a` channel A images
  65. - `b` channel B images
  66. - `p` for a paletted image
  67. - `t` for temperature calibrated images
  68. - `m` for MCIR images
  69. Currently there are 6 available effects:
  70. - `t` for crop telemetry, off by default, only has effects on raw images
  71. - `h` for histogram equalise
  72. - `d` for a median denoise filter
  73. - `p` for a precipitation overlay
  74. - `f` to flip the image (for southbound passes)
  75. - `l` to linearly equalise the image, stretch the colors in the image to black and white
  76. ## Examples
  77. `aptdec -d images -i ab *.wav`
  78. This will process all `.wav` files in the current directory, generate calibrated channel A and B images and put them in the `images` directory.
  79. `aptdec -e dh -i b audio.wav`
  80. Decode `audio.wav` with denoise and histogram equalization and save it into the current directory.
  81. `aptdec -e d -p palettes/N19-June-High-Vegetation.png -i p audio.wav`
  82. Create a false color image from the `N19-June-High-Vegetation.png` palette.
  83. ## Realtime decoding
  84. As of recently a realtime output was added allowing realtime decoding of images.
  85. ```
  86. mkfifo /tmp/aptaudio
  87. aptdec /tmp/aptaudio
  88. sox -t pulseaudio alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -c 1 -t wav /tmp/aptaudio
  89. ```
  90. Perform a realtime decode with the audio being played out of `alsa_output.pci-0000_00_1b.0.analog`. To stop the decode kill the `sox` process.
  91. ## Palette formatting
  92. Palettes are PNG images that are 256x256 in size with 24bit RGB color. The X axis is the value of Channel A and the Y axis is the value of Channel B
  93. ## Further reading
  94. [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)
  95. [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)
  96. ## License
  97. See LICENSE.