Skip to content

Instantly share code, notes, and snippets.

@jh4xsy
Last active April 8, 2023 08:39
Show Gist options
  • Save jh4xsy/94c5a7a933148942e90c5295ae68cdaa to your computer and use it in GitHub Desktop.
Save jh4xsy/94c5a7a933148942e90c5295ae68cdaa to your computer and use it in GitHub Desktop.
CAS-5AのHEXファイルから特定のカメラ画像を自動抽出するバッチを生成するrubyスクリプト
#
# SatNOGSからダウンロードしたデータ/HEXファイルから
# CAS-5A カメラ画像27番だけ抽出するスクリプトの生成 by JH4XSY/1
#
# $ grep 0303AA0001010017010E033113081B07 foo.csv | head -1 | cut -c 59- > foo.hex
# ~~~~ ~~
# 27
f = open("ext.sh", "w")
for i in 1..0x3AA
f.printf("grep 0303AA%04X....17010E033113081B07 foo.csv | head -1 | cut -c 59- >> foo.hex\n",i )
end
f.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment