Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

README.md 4.5 KiB

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