Skip to content

ykchong45/GK2A-Satellite-Data-Decode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crispy-octo-umbrella

This project decodes the GK2A satellite signal into VCDU for further processing.

Huge thanks to Lucas Teske's blog series and code.

以及善麟提供的前期数据处理data/rec_128输入!

This repo is almost a fork of Lucas' work with little changes. Together with a detailed procedure, I will guide you through the necessary steps to run this project on a Windows 10 computer.

关于本repo

本repo从data/rec_128中读入GK2A卫星的 8-bit soft decision 比特流,进行帧对齐、Viterbi解码、Reed-Solomon纠正后输出 896-byte VCDU。输出文件存放在vcdu目录下,命名方式为virtualChannelID_virtualChannelFrameCount。详见AOS Space Data Link Protocol 4.1.2节。

目前还没有接入TCP进行实时解码。因此数据处理循环是在decode.c第190行定义的。

另外,makefile_libfec是供libfec库使用的。详见 安装libfec库

Clone repo到本地

请确保本地目录中没有中文字符和空格。

环境配置

本repo使用到libfec,因此编译和运行需要进行以下配置:

  1. 安装Cygwin及编译依赖库
  2. 安装libfec
  3. 使用本程序

安装Cygwin及编译依赖库

首先在Cygwin官网上下载安装包。过程中不需要改变默认选项。

Choose A Download Site时选择一个离您较近的网站。

接着会弹出Select Packages的窗口,请选择Full,输入要查询的package名称,并点击对应的package行的三角形选择要安装的版本,最后单击Next。我们本次需要安装gcc-core, make, chere这三个packages。

安装完成后不要删除安装包,未来可能还需要用到它来增减package。

结束之前,记得在最后一页里勾选把Cygwin添加到开始菜单。至此就完成了Cygwin相关的安装。

为了方便调试,我们打开Cygwin命令行后输入

chere -i -t mintty -s bash

这样我们就可以在工作的目录右键,并用Cygwin打开当前目录了!

安装libfec

本repo中,我们使用了移植到x86_64上的libfec——一个非常经典的FEC(Forward Error Correction)库。具体安装过程如下:

首先将上述库下载到本地(注意:目录中不要出现中文字符和空格),再用本repo的makefile_libfec替换它原本的文件,并重命名为makefile。最后用Cygwin打开当前目录,执行以下指令:

./configure
make
make test (可以不执行,若执行应该不会报错)
make install

完成安装。

使用本程序

首先在makefile中配置一下libfec的目录。用文本编辑器打开makefile,修改LIB_DIR_WIN的值为libfec的目录:

# 假设libfec在您电脑中的安装目录为 E:\libfec
LIB_DIR_WIN := e/libfec

注意:请勿在磁盘名前加斜杠,且斜杠为 / 而非 \!

用Cygwin打开当前目录,使用以下指令:

make:生成decode.exe。

make clean:删除decode.exe。

运行时可以使用下面的指令,让命令行的输出同时也被记录在log.txt中。(请使用VSCode等文本编辑器查看log,它们能识别出Linux的换行符)

stdbuf -o 0 ./decode | tee log.txt

有问题?

欢迎提交issue 👍!

About

This project decodes the GK2A satellite signal to packets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published