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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ![Aptdec Logo](textlogo.png)
  2. Copyright (c) 2004-2009 Thierry Leconte (F4DWV), Xerbo (xerbo@protonmail.com) 2019-2022
  3. [![Build](https://github.com/Xerbo/aptdec/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/Xerbo/aptdec/actions/workflows/build.yml)
  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 cmake git gcc libsndfile-dev libpng-dev
  17. git clone --recursive https://github.com/Xerbo/aptdec.git && cd aptdec
  18. cmake -B build
  19. cmake --build build
  20. # Resulting binary is build/aptdec
  21. ```
  22. ## Examples
  23. To create an image from `gqrx_20200527_115730_137914960.wav` (output filename will be `gqrx_20200527_115730_137914960-r.png`)
  24. ```sh
  25. ./aptdec gqrx_20200527_115730_137914960.wav
  26. ```
  27. To manually set the output filename
  28. ```sh
  29. ./aptdec -o image.png gqrx_20200527_115730_137914960.wav
  30. ```
  31. Decode all WAV files in the current directory and put them in `images`
  32. ```sh
  33. mkdir images && ./aptdec -d images *.wav
  34. ```
  35. Apply a denoise filter (see [Post-Processing Effects](#post-processing-effects) for a full list of post-processing effects)
  36. ```sh
  37. ./aptdec -e d gqrx_20200527_115730_137914960.wav
  38. ```
  39. Create a temperature compensated image for NOAA 18
  40. ```sh
  41. ./aptdec -i t -s 18 gqrx_20200527_115730_137914960.wav
  42. ```
  43. Apply a falsecolor palette
  44. ```sh
  45. ./aptdec -i p -p palettes/WXtoImg-N18-HVC.png gqrx_20200527_115730_137914960.wav
  46. ```
  47. ## Usage
  48. ### Arguments
  49. ```
  50. -i [r|a|b|t|m|p] Output type (stackable)
  51. -e [t|h|l|d|p|f] Effects (stackable)
  52. -o <path> Output filename
  53. -d <path> Destination directory
  54. -s (15-19) Satellite number
  55. -m <path> Path to WXtoImg map
  56. -p <path> Path to palette
  57. -r Realtime decode
  58. -g Gamma adjustment (1.0 = off)
  59. -k Map offset (in px, default: 0)
  60. ```
  61. ### Image output types
  62. - `r`: Raw Image
  63. - `a`: Channel A
  64. - `b`: Channel B
  65. - `t`: Temperature
  66. - `m`: MCIR (Map Color InfraRed)
  67. - `p`: Palleted
  68. ### Post-Processing Effects
  69. - `t`: Crop telemetry (only effects raw image)
  70. - `h`: Histogram equalise
  71. - `l`: Linear equalise
  72. - `d`: Denoise
  73. - `p`: Precipitation overlay
  74. - `f`: Flip image (for northbound passes)
  75. - `c`: Crop noise from ends of image
  76. ## Realtime decoding
  77. 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`
  78. ```
  79. mkfifo /tmp/aptaudio
  80. aptdec -r /tmp/aptaudio
  81. sox -t pulseaudio alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -c 1 -t wav /tmp/aptaudio
  82. ```
  83. To stop the decode and calibrate the image simply kill the `sox` process.
  84. ## Palette formatting
  85. 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.
  86. ## Building for Windows
  87. You can cross build for Windows from Linux with the `build_windows.sh` script, you will need the following:
  88. ```
  89. sudo apt install wget cmake make mingw-w64 git unzip
  90. ```
  91. To build natively on Windows using MSVC, you will also need: git, ninja and cmake. Then run:
  92. ```
  93. .\build_windows.bat
  94. ```
  95. If you just wish to build libaptdec on Windows, libpng and libsndfile aren't needed.
  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`