選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

README.md 4.9 KiB

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