📡 Receive images from weather satellite GEO-KOMPSAT-2A (GK-2A).

sam210723 sam210723 Last update: Jul 31, 2022

📡 xrit-rx - LRIT/HRIT Downlink Processor

GitHub releasePython versionsGithub all releasesGitHub license

xrit-rx is a packet demultiplexer and file processor for receiving images from geostationary weather satellite GEO-KOMPSAT-2A (GK-2A). It is designed for use with goesrecv (originally by Pieter Noordhuis), or xritdecoder by Lucas Teske.

xrit-rx receives Virtual Channel Data Units (VCDUs) over the network from either goesrecv or xritdecoder and demultiplexes them into separate virtual channels, each containing a different type of image data.The demultiplexed packets are assembled into complete files which are output as images such as the ones below.

GK-2A Wavelengths

Getting Started

A guide for setting up the hardware and software components of a GK-2A LRIT receiver is available on my site. It also covers the types of images that can be received, image post-processing techniques and data decryption.

The RTL-SDR Blog has also written a guide for setting up the hardware and software required to receive imagery from GOES-16/17 and GK-2A. Once you are able to receive the GK-2A LRIT downlink with goesrecv, you can begin installing and configuring xrit-rx.

Installing xrit-rx

Download the latest version of xrit-rx (xrit-rx.zip) from the Releases page, then unzip the contents to a new folder.

numpy, pillow, colorama and pycryptodome are required to run xrit-rx. Use the following command to download and install these packages:

pip3 install -r requirements.txt

Images downlinked from GK-2A are encrypted by the Korean Meteorological Administration (KMA). Decryption keys can be downloaded from KMA's website and used with xrit-rx.More information is available in the setup guide.

Configuring xrit-rx

All user-configurable options are found in the xrit-rx.ini file. The default configuration will work for most situations.

If xrit-rx is not running on the same device as goesrecv / xritdecoder, the ip option will need to be updated with the IP address of the device running goesrecv / xritdecoder.

List of options

rx section

SettingDescriptionOptionsDefault
spacecraftName of spacecraft being receivedGK-2AGK-2A
modeType of downlink being receivedlrit or hritlrit
inputInput sourcegoesrecv or ospgoesrecv
keysPath to decryption key fileAbsolute or relative file pathEncryptionKeyMessage.bin

output section

SettingDescriptionOptionsDefault
pathRoot output path for received filesAbsolute or relative file path"received"
imagesEnable/Disable saving Image files to disktrue or falsetrue
xritEnable/Disable saving xRIT files to disktrue or falsefalse
channel_blacklistList of virtual channels to ignore
Can be multiple channels (e.g. 4,5)
0: Full Disk
4: Alpha-numeric Text
5: Additional Data
none

goesrecv section

SettingDescriptionOptionsDefault
ipIP Address of a device running goesrecvAny IPv4 address127.0.0.1
vchanOutput port of goesrecvAny TCP port number5004

osp section

SettingDescriptionOptionsDefault
ipIP Address of a device running Open Satellite Project xritdecoderAny IPv4 address127.0.0.1
vchanOutput port of Open Satellite Project xritdecoderAny TCP port number5001

udp section

SettingDescriptionOptionsDefault
ipIP Address to bind UDP socket toAny IPv4 address127.0.0.1
vchanPort number to bind UDP socket toAny UDP port number5002

dashboard section

SettingDescriptionOptionsDefault
enabledEnable/Disable dashboard servertrue or falsetrue
portPort number for server to listen onAny TCP port number1692
intervalUpdate interval in secondsinteger1

Dashboard

xrit-rx includes a web-based dashboard for easy monitoring and viewing of received data.The current GK-2A LRIT schedule is also displayed on the dashboard (retrieved from KMA NMSC).

Dashboard

By default the dashboard is enabled and accessible on port 1692 via HTTP (no HTTPS). These settings can be changed in the [dashboard] section of xrit-rx.ini.

HTTP API

xrit-rx has a basic API accessible via HTTP primarily to support its web-based monitoring dashboard.This may be useful for integrating xrit-rx with other applications.

The API only supports GET requests and will return either a 200 OK or 404 Not Found status.The root endpoint is located at /api which returns information about the current xrit-rx configuration (example below).

{  "version": 1.1,  "spacecraft": "GK-2A",  "downlink": "LRIT",  "vcid_blacklist": [    4,    5  ],  "output_path": "received/LRIT/",  "images": true,  "xrit": false,  "interval": 1}

The API also supports a special dynamic endpoint for retrieving image files over a network. This endpoint uses the start of the relative decoder output path found in the configuration object at the API root endpoint (/api).

For example, if output_path is "received/LRIT" the endpoint will be /api/received/LRIT. From there the URL follows the folder structure created by xrit-rx for saving received images (e.g. /api/received/LRIT/20190722/FD/IMG_FD_047_IR105_20190722_075006.jpg). The API does not currently support directory listing.

List of Endpoints

URLDescriptionExampleMIME
/apiGeneral configuration informationsee aboveapplication/json
/api/current/vcidCurrently active virtual channel number{ "vcid": 63 }application/json
/api/latest/imagePath to most recently received product{ "image": "received/LRIT/[...].jpg" }application/json
/api/latest/xritPath to most recently received xRIT file{ "xrit": "received/LRIT/[...].lrit" }application/json

Acknowledgments

libjpeg

xrit-rx uses libjpeg for converting JPEG2000 (J2K/JP2) images to Portable Pixmap Format (PPM) images.A compiled 32-bit binary for Windows is included in xrit-rx releases along with the libjpeg LICENSE (GPLv3) and README.

The source code for libjpeg can be found at https://github.com/thorfdbg/libjpeg.

Subscribe to our newsletter