您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 library/program that decodes images transmitted by the NOAA POES 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, the transmission can be demodulated in narrow FM mode.
  7. Aptdec can turn the audio into PNG images and generate other products such as:
  8. - Raw image: both channels (including telemetry)
  9. - Individual channel: one channel (including telemetry)
  10. - Visible image: a calibrated visible image of either channel 1 or 2
  11. - Thermal image: a calibrated thermal image from channel B
  12. - LUT image: a image where the color is derived from a LUT (used for false color, etc)
  13. The input audio format can be anything supported by `libsndfile` (although only tested with WAV, FLAC and Ogg Vorbis). While sample rate doesn't matter, it is recommended to use 16640 Hz (4x oversampling).
  14. ## Quick start
  15. Grab a release from [Releases](https://github.com/Xerbo/aptdec/releases) or compile from source:
  16. ```sh
  17. sudo apt install cmake git gcc libsndfile-dev libpng-dev
  18. git clone --recursive https://github.com/Xerbo/aptdec.git && cd aptdec
  19. cmake -B build
  20. cmake --build build
  21. # Resulting binary is build/aptdec-cli
  22. ```
  23. In place builds are not supported.
  24. ## Examples
  25. To create an image from `gqrx_20200527_115730_137914960.wav` (output filename will be `gqrx_20200527_115730_137914960-raw.png`)
  26. ```sh
  27. aptdec-cli gqrx_20200527_115730_137914960.wav
  28. ```
  29. To manually specify the output filename
  30. ```sh
  31. aptdec-cli -o image.png gqrx_20200527_115730_137914960.wav
  32. ```
  33. Decode all WAV files in the current directory:
  34. ```sh
  35. aptdec-cli *.wav
  36. ```
  37. Apply a denoise filter (see [Post-Processing Effects](#post-processing-effects) for a full list of post-processing effects)
  38. ```sh
  39. aptdec-cli -e denoise gqrx_20200527_115730_137914960.wav
  40. ```
  41. Create a calibrated IR image from NOAA 18
  42. ```sh
  43. aptdec-cli -i thermal gqrx_20200527_115730_137914960.wav
  44. ```
  45. Apply a falsecolor LUT
  46. ```sh
  47. aptdec-cli -i lut -l luts/WXtoImg-N18-HVC.png gqrx_20200527_115730_137914960.wav
  48. ```
  49. ## Usage
  50. ### Arguments
  51. ```
  52. -h, --help show this help message and exit
  53. -i, --image=<str> set output image type (see the README for a list)
  54. -e, --effect=<str> add an effect (see the README for a list)
  55. -s, --satellite=<int> satellite ID, must be either NORAD or 15/18/19
  56. -l, --lut=<str> path to a LUT
  57. -o, --output=<str> path of output image
  58. -r, --realtime decode in realtime
  59. ```
  60. ### Image output types
  61. - `raw`: Raw Image
  62. - `a`: Channel A (including telemetry)
  63. - `b`: Channel B (including telemetry)
  64. - `thermal`: Calibrated thermal (MWIR/LWIR) image
  65. - `visible`: calibrated visible/NIR image
  66. - `lut`: LUT image, see also `-l/--lut`
  67. ### Post-Processing Effects
  68. - `strip`: Strip telemetry (only effects raw/a/b images)
  69. - `equalize`: Histogram equalise
  70. - `stretch`: Linear equalise
  71. - `denoise`: Denoise
  72. - ~~`precipitation`: Precipitation overlay~~
  73. - `flip`: Flip image (for northbound passes)
  74. - `crop`: Crop noise from ends of image
  75. ## Realtime decoding
  76. Aptdec supports decoding in realtime. The following captures and decodes audio from the `pipewire` interface:
  77. ```sh
  78. arecord -f cd -D pipewire | aptdec -r -
  79. ```
  80. or directly from an SDR:
  81. ```sh
  82. rtl_fm -f 137.1M -g 40 -s 40k | sox -t raw -r 40k -e signed-integer -b 16 - -t wav - | aptdec -r -
  83. ```
  84. Image data will be streamed to `CURRENT_TIME.png` (deleted when finished). To stop the decode and normalize the image simply `Ctrl+C` the process.
  85. ## LUT format
  86. LUT's are just plain 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.
  87. ## Building for Windows
  88. You can cross build for Windows from Linux (recommended) using with the following commands:
  89. ```sh
  90. sudo apt install wget cmake make mingw-w64 git unzip
  91. ./build_windows.sh
  92. ```
  93. To build natively on Windows using MSVC, you will need: git, ninja and cmake. Then run:
  94. ```
  95. ./build_windows.bat
  96. ```
  97. If you only want to build libaptdec, libpng and libsndfile aren't needed.
  98. ## References
  99. - [User's Guide for Building and Operating Environmental Satellite Receiving Stations](https://noaasis.noaa.gov/NOAASIS/pubs/Users_Guide-Building_Receive_Stations_March_2009.pdf)
  100. - [NOAA KLM Users Guide](https://archive.org/details/noaa-klm-guide)
  101. ## License
  102. See `LICENSE`