Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

README.md 4.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ![Aptdec logo](textlogo.png)
  2. Copyright (c) 2004-2009 Thierry Leconte (F4DWV), Xerbo (xerbo@protonmail.com) 2019-2020
  3. ![Release Build](https://github.com/Xerbo/aptdec/workflows/Release%20Build/badge.svg?branch=master)
  4. ## Introduction
  5. Aptdec is a FOSS program that decodes images transmitted by NOAA weather satellites. These satellites transmit constantly (among other things) medium resolution (4km/px) images of the earth over a analog mode called APT.
  6. These transmissions can easily be received with a cheap SDR and simple antenna. Then the transmission can be decoded in narrow FM mode.
  7. Aptdec can turn the audio recordings into PNG images and generate images such as:
  8. - Raw image: both channels with full telemetry included
  9. - Individual channel: one of the channels form the image
  10. - Temperature image: a temperature compensated image derived from the IR channel
  11. - Palleted image: a image where the color is derived from a palette (false color, etc)
  12. - MCIR: a false color that uses a underlay map for color
  13. The input audio format can be anything supported by `libsndfile` (although only tested with WAV and FLAC). Sample rate doesn't matter, although lower samples rates will process faster.
  14. ## Quick start
  15. ```sh
  16. sudo apt install git gcc libsndfile-dev libpng-dev
  17. git clone https://github.com/Xerbo/aptdec.git && cd aptdec
  18. make
  19. ```
  20. ## Examples
  21. To create an image from `gqrx_20200527_115730_137914960.wav` (output filename will be `gqrx_20200527_115730_137914960-r.png`)
  22. ```sh
  23. ./aptdec gqrx_20200527_115730_137914960.wav
  24. ```
  25. To manually set the output filename
  26. ```sh
  27. ./aptdec -o image.png gqrx_20200527_115730_137914960.wav
  28. ```
  29. Decode all WAV files in the current directory and put them in `images`
  30. ```sh
  31. mkdir images && ./aptdec -d images *.wav
  32. ```
  33. Apply a denoise filter (see [Post-Processing Effects](#post-processing-effects) for a full list of post-processing effects)
  34. ```sh
  35. ./aptdec -e d gqrx_20200527_115730_137914960.wav
  36. ```
  37. Create a temperature compensated image for NOAA 18
  38. ```sh
  39. ./aptdec -i t -s 18 gqrx_20200527_115730_137914960.wav
  40. ```
  41. Apply a falsecolor palette
  42. ```sh
  43. ./aptdec -i p -p palettes/WXtoImg-N18-HVC.png gqrx_20200527_115730_137914960.wav
  44. ```
  45. ## Usage
  46. ### Arguments
  47. ```
  48. -i [r|a|b|t|m|p] Output type (stackable)
  49. -e [t|h|l|d|p|f] Effects (stackable)
  50. -o <path> Output filename
  51. -d <path> Destination directory
  52. -s (15-19) Satellite number
  53. -m <path> Path to WXtoImg map
  54. -p <path> Path to palette
  55. -r Realtime decode
  56. -g Gamma adjustment (1.0 = off)
  57. -k Map offset (in px, default: 0)
  58. ```
  59. ### Image output types
  60. - `r`: Raw Image
  61. - `a`: Channel A
  62. - `b`: Channel B
  63. - `t`: Temperature
  64. - `m`: MCIR (Map Color InfraRed)
  65. - `p`: Palleted
  66. ### Post-Processing Effects
  67. - `t`: Crop telemetry (only effects raw image)
  68. - `h`: Histogram equalise
  69. - `l`: Linear equalise
  70. - `d`: Denoise
  71. - `p`: Precipitation overlay
  72. - `f`: Flip image (for northbound passes)
  73. - `c`: Crop noise from ends of image
  74. ## Realtime decoding
  75. Aptdec even supports decoding in realtime. The following decodes the audio coming from the audio device `pulseaudio alsa_output.pci-0000_00_1b.0.analog-stereo`
  76. ```
  77. mkfifo /tmp/aptaudio
  78. aptdec -r /tmp/aptaudio
  79. sox -t pulseaudio alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -c 1 -t wav /tmp/aptaudio
  80. ```
  81. To stop the decode and calibrate the image simply kill the `sox` process.
  82. ## Palette formatting
  83. Palettes are just simple PNG images, 256x256px in size with 24bit RGB color. The X axis represents the value of Channel A and the Y axis the value of Channel B.
  84. ## Compiling with cmake
  85. Thanks to the help of [Aang23](https://github.com/Aang23) aptdec is moving towards cmake + cpack for builds.
  86. To use cmake to build instead of GNU automake:
  87. ```
  88. mkdir build && cd build
  89. cmake ..
  90. make
  91. ```
  92. Since cmake is now being used for building, windows support has come. You can build for windows with the `build_windows.sh` script, you will need wine and mingw64 installed:
  93. ```
  94. ./build_windows.sh
  95. ```
  96. ## Further Reading
  97. [User's Guide for Building and Operating
  98. Environmental Satellite Receiving Stations](https://noaasis.noaa.gov/NOAASIS/pubs/Users_Guide-Building_Receive_Stations_March_2009.pdf)
  99. [NOAA KLM coefficients](https://web.archive.org/web/20141220021557/https://www.ncdc.noaa.gov/oa/pod-guide/ncdc/docs/klm/tables.htm)
  100. [NOAA Satellite specifications and more information](https://www1.ncdc.noaa.gov/pub/data/satellite/publications/podguides/N-15%20thru%20N-19/pdf/)
  101. ## License
  102. See `LICENSE`