(Automatic experiment, in progress)
自動的に前図赤枠の部分になるよう実験継続中。
(satnogs.csvは直近のものを使用。実験途中で各出力ファイルを多少の整形が必要。)
----------------------------------------------------------------------------------------------
[extract1.rb] ... satnogs.csv から行頭 "87BD14" の行を抜粋
> File.open("extract1.txt", "w") do |out|
> File.foreach("satnogs.csv") do |line|
> out.puts line if line.include?("87BD14")
> end
> end
$ ruby extract1.rb > 60809ma1.sh
$ sh 60809ma1.sh
----------------------------------------------------------------------------------------------
[sequence1.rb] ... 前図赤枠の部分になるよう、2行づつ [i]80, [i]00 と並べ替え
> for i in 0..0x0f0
> printf("grep 87BD1400841B000000020D1E695119%02X extract1.txt | head -2 >> sequence1.txt\n", i)
> end
$ ruby sequence1.rb > 60809ma2.sh
$ sh 60809ma2.sh
----------------------------------------------------------------------------------------------
[reverse1.rb] ... その2行づつを [i]80, [i]00 → [i]00, [i]80 と上下入れ替え
全行[i]順を確認。特に1行目にFFD8, 最終行にFFD9の存在を確認
修正後、下記sequence2.txt → reverse1.txt とリネーム保存
> lines = File.readlines("sequence1.txt")
> File.open("sequence2.txt", "w") do |file|
> lines.each_slice(2) do |pair|
> pair.reverse_each { |line| file.print line }
> end
> end
$ ruby reverse1.rb > 60809ma3.sh
$ sh 60809ma3.sh