SatNOGS GS #9 UDP I/Q sinks2022/01/07 16:36

satnogs-clientが未サポートの衛星をデコードできるよう gr-satellites連携を試してみた。

UDP出力は,平時はオフなので,IQファイルの読み込みからスタート。 satnogs-clientが作成するI/Qファイルの仕様は16 bit interleaved integers, sampled at 48kspsなので gr_satellitesでは --rawint16 --iq の指定が必要。 I/Q sample rateは,baudrateと変調方式から計算できるが,必ずしも48e3とはならない!ので注意が必要。

$ gr_satellites CSIM-FD --rawint16 iq.dat --iq --samp_rate 57600 --hexdump --use_agc
* MESSAGE DEBUG PRINT PDU VERBOSE *
((transmitter . 9k6 FSK downlink))
pdu_length = 131
contents = 
0000: 84 86 a8 40 40 40 60 86 a6 92 9a 40 40 e1 03 f0 
0010: 00 3f bc 82 00 6c 32 01 00 58 ea ca 04 04 04 2d 
0020: 04 00 00 e6 1a bc 33 00 34 00 00 77 50 c8 df 16 
0030: 16 0a 14 0f 0e 0a 89 0a a5 0a 59 4d 11 17 59 ff 
0040: 59 0c 8c 0c 7d 00 00 5e 4d 00 00 5f 93 02 03 02 
0050: 00 06 00 ff ff ff ff 00 00 00 01 01 80 ff ff ff 
0060: ff 14 28 2d 00 00 07 00 00 08 dc 00 00 00 00 01 
0070: 23 00 80 00 00 00 00 0e 01 41 00 ff 01 01 02 00 
0080: 00 4c 09 
***********************************

次にUDP接続を試してみた。中身は(なぜかファイル出力と違って)complex64形式のI/Q信号なので --iq --udp_raw の指定が必要。 でも,UDPパケットをgr-satellitesが取りこぼす。

gr::log :WARN: udp_source0 - Too much data; dropping packet.

マシンがpi4だからシカタガナイと思い,高速なcore i5で試しても,状況は変わらなかった。 ググって,GNU Radioのbuf_size_payloadsにたどり着いた。 設定値はここを参考にして,~/.gnuradio/config.confを修正してすればOK!

$ gr_satellites FALCONSAT-3 --udp --udp_port 57356 --iq --udp_raw --samp_rate 57600 --hexdump --use_agc
***** VERBOSE PDU DEBUG PRINT ******
((transmitter . 9k6 FSK downlink))
pdu length = 49 bytes
pdu vector contents = 
0000: a0 86 a8 a4 98 40 10 a0 86 a8 a4 98 40 11 03 f0 
0010: 43 54 52 4c 3a 20 6d 6f 64 65 3d 30 20 74 6f 72 
0020: 71 30 20 65 6c 6f 67 3d 31 20 61 6c 6f 67 3d 30 
0030: 20 
************************************

ちなみに,デコード性能に大差はない;このパスでは satnogs-client:62 > gr_satellites:48 な成績だった。

念願のNAYIF-1もデコードできて,SatNOGSにデータを送り込めたが,Observationsにデコード結果が表示されない。SatNOGS DBのNAYIF-1 ObserverにはJH4XSY-piが表示されており,謎が深まる... satnogs-clientからのアップロードが必要.とのこと。

$ gr_satellites EO-88 --udp --udp_port 57356 --iq --udp_raw --samp_rate 48e3 --hexdump
gr::log :DEBUG: decode_rs0 - Reed-Solomon decode corrected 0 bytes (interleaver path 0)
gr::log :DEBUG: decode_rs0 - Reed-Solomon decode corrected 0 bytes (interleaver path 1)
* MESSAGE DEBUG PRINT PDU VERBOSE *
((transmitter . 1k2 BPSK downlink) (rs_errors . 0) (iterations . -1))
pdu_length = 256
contents = 
0000: cc 08 46 91 0d c4 78 60 32 33 9e e2 79 90 40 ad 
0010: 00 40 80 80 00 00 cc 5b 55 01 84 e0 48 db 15 c0 
0020: 57 fc 44 44 5f c7 7f fb e3 f4 f2 b4 2f fc be 2a 
0030: 0a 1f 13 bf a4 00 0f 64 01 48 d0 50 c2 03 01 65 
0040: 55 55 45 55 55 55 55 55 50 10 8c 05 0c 30 30 13 
0050: 55 55 54 55 55 55 55 55 55 01 48 b0 50 c5 03 01 
0060: 05 55 55 45 55 55 55 55 55 50 14 8a 05 0c 60 30 
0070: 0e 55 55 54 55 55 55 55 55 55 01 48 80 50 c7 03 
0080: 00 c5 55 55 45 55 55 55 55 55 50 14 87 05 0c 90 
0090: 30 0b 55 55 54 55 55 55 55 55 55 01 48 60 50 ca 
00a0: 03 00 95 55 55 45 55 55 55 55 55 50 10 84 05 0c 
00b0: b0 30 08 55 55 54 55 55 55 55 55 55 01 08 30 50 
00c0: cc 03 00 65 55 55 45 55 55 55 55 55 50 14 81 05 
00d0: 0c d0 34 06 55 55 54 55 55 55 55 55 55 01 48 00 
00e0: 50 ce 03 40 65 55 55 45 55 55 55 55 55 50 14 7e 
00f0: 05 0c f0 34 06 55 55 54 55 55 55 55 55 55 01 47 
***********************************