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.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ![Aptdec logo](textlogo.png)
  2. Copyright (c) 2004-2009 Thierry Leconte (F4DWV), Xerbo (xerbo@protonmail.com) 2019-2020
  3. ## Introduction
  4. 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.
  5. These transmissions can easily be received with a cheap SDR and simple antenna. Then the transmission can be decoded in narrow FM mode.
  6. Aptdec can turn the audio recordings into PNG images and generate images such as:
  7. - Raw image: both channels with full telemetry included
  8. - Individual channel: one of the channels form the image
  9. - Temperature image: a temperature compensated image derived from the IR channel
  10. - Palleted image: a image where the color is derived from a palette (false color, etc)
  11. - MCIR: a false color that uses a underlay map for color
  12. 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.
  13. ## Quick start
  14. ```sh
  15. sudo apt install git gcc libsndfile-dev libpng-dev
  16. git clone https://github.com/Xerbo/aptdec.git && cd aptdec
  17. make
  18. ```
  19. ## Examples
  20. To create an image from `gqrx_20200527_115730_137914960.wav` (output filename will be `gqrx_20200527_115730_137914960-r.png`)
  21. ```sh
  22. ./aptdec gqrx_20200527_115730_137914960.wav
  23. ```
  24. To manually set the output filename
  25. ```sh
  26. ./aptdec -o image.png gqrx_20200527_115730_137914960.wav
  27. ```
  28. Decode all WAV files in the current directory and put them in `images`
  29. ```sh
  30. mkdir images && ./aptdec -d images *.wav
  31. ```
  32. Apply a denoise filter (see [Post-Processing Effects](#post-processing-effects) for a full list of post-processing effects)
  33. ```sh
  34. ./aptdec -e d gqrx_20200527_115730_137914960.wav
  35. ```
  36. Create a temperature compensated image for NOAA 18
  37. ```sh
  38. ./aptdec -i t -s 18 gqrx_20200527_115730_137914960.wav
  39. ```
  40. Apply a falsecolor palette
  41. ```sh
  42. ./aptdec -i p -p palettes/WXtoImg-N18-HVC.png gqrx_20200527_115730_137914960.wav
  43. ```
  44. ## Usage
  45. ### Arguments
  46. ```
  47. -i [r|a|b|t|m|p] Output type (stackable*)
  48. -e [t|h|l|d|p|f] Effects (stackable)
  49. -o <path> Output filename
  50. -d <path> Destination directory
  51. -s (15-19) Satellite number
  52. -m <path> Path to WXtoImg map
  53. -p <path> Path to palette
  54. -r Realtime decode
  55. -g Gamma adjustment (1.0 = off)
  56. -k Map offset (in px, default: 0)
  57. ```
  58. \* Should work with all combinations, but temperature needs to be done last as it calibrates the buffer
  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 /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`