daniestevez / gr-satellites

GNU Radio decoder for Amateur satellites
GNU General Public License v3.0
762 stars 155 forks source link

start_time not propagated to kiss server #455

Closed kb7ky closed 1 year ago

kb7ky commented 1 year ago

Reproduce: Server:

gr_satellites ${NORADID} --wavfile ${INFILE} --kiss_server 8101 --throttle --kiss_server_address 0.0.0.0 --start_time 1970-01-01T00:00:00 ... * VERBOSE PDU DEBUG PRINT ** ((transmitter . 2k4 FSK downlink)) pdu length = 116 bytes pdu vector contents = 0000: 01 21 00 62 ec 07 75 82 dd b0 64 fd a2 b1 ca 12 0010: e1 50 bb 05 a0 96 9a c2 ae aa a5 2c d5 f5 39 61 0020: 2e d8 9c 68 ba 59 6b 0b 58 42 0d 3b 00 34 93 a3 0030: a2 91 26 1e 53 c5 43 ae ff 4f 0d c5 6a dd 9f d4 0040: ea b3 a4 eb 6a b1 7b b5 39 1b 97 d9 2e 0f d7 97 0050: 87 32 b1 6b bc b4 3e 47 ca 25 ef 02 4f fd 8f 97 0060: 09 29 10 a1 e5 36 34 76 6a 89 6d 1f 45 4f 92 38 0070: e1 52 f0 74


...

Client: nc 127.0.0.1 8101 | hexdump -C 00000000 c0 09 00 00 01 87 e0 8c ca cd c0 c0 00 01 21 00 |..............!.| 00000010 62 ec 07 75 82 dd b0 64 fd a2 b1 ca 12 e1 50 bb |b..u...d......P.| 00000020 05 a0 96 9a c2 ae aa a5 2c d5 f5 39 61 2e d8 9c |........,..9a...| 00000030 68 ba 59 6b 0b 58 42 0d 3b 00 34 93 a3 a2 91 26 |h.Yk.XB.;.4....&| 00000040 1e 53 c5 43 ae ff 4f 0d c5 6a dd 9f d4 ea b3 a4 |.S.C..O..j......| 00000050 eb 6a b1 7b b5 39 1b 97 d9 2e 0f d7 97 87 32 b1 |.j.{.9........2.| 00000060 6b bc b4 3e 47 ca 25 ef 02 4f fd 8f 97 09 29 10 |k..>G.%..O....).| 00000070 a1 e5 36 34 76 6a 89 6d 1f 45 4f 92 38 e1 52 f0 |..64vj.m.EO.8.R.|

Note: bytes 2-9 (00 00 01 87 e0 8c ca cd) represent current unix time in Kiss record type 9 even though start time was specified as 1970-01-01T00:00:00 (near epoch)

Expected: Client: nc 127.0.0.1 8101 | hexdump -C 00000000 c0 09 00 00 00 00 00 00 60 50 c0 c0 00 01 21 00 |........`P....!.| 00000010 62 ec 07 75 82 dd b0 64 fd a2 b1 ca 12 e1 50 bb |b..u...d......P.| 00000020 05 a0 96 9a c2 ae aa a5 2c d5 f5 39 61 2e d8 9c |........,..9a...| 00000030 68 ba 59 6b 0b 58 42 0d 3b 00 34 93 a3 a2 91 26 |h.Yk.XB.;.4....&| 00000040 1e 53 c5 43 ae ff 4f 0d c5 6a dd 9f d4 ea b3 a4 |.S.C..O..j......| 00000050 eb 6a b1 7b b5 39 1b 97 d9 2e 0f d7 97 87 32 b1 |.j.{.9........2.| 00000060 6b bc b4 3e 47 ca 25 ef 02 4f fd 8f 97 09 29 10 |k..>G.%..O....).| 00000070 a1 e5 36 34 76 6a 89 6d 1f 45 4f 92 38 e1 52 f0 |..64vj.m.EO.8.R.|

Note: bytes 2-9 (00 00 00 00 00 00 60 50) represent time near epoch

Comments: 1) I don't do much python, so please excuse any "interesting" code. Basically a lift from kiss_file_sync.py to add support for start_time. I'm using the kiss server in a pipeline after pulling from satnogs and I would like the date/time to flow with the kiss data. 2) Am I doing this process correctly? I'm retired from corporate world where we never get to contribute to open source :-(

kb7ky commented 1 year ago

Created Pull Request

daniestevez commented 1 year ago

The code was good, no worries!

Am I doing this process correctly? I'm retired from corporate world where we never get to contribute to open source :-(

Yes! That's pretty much the way to do it. Since you were sending a Pull Request, it wasn't completely necessary to open an issue too. You could have put all the information in the Pull Request. But opening a related issue is okay and somewhat common.

I've merge the pull request, and backported to maint-3.9 and maint-3.8. I guess this can be closed now.

kb7ky commented 1 year ago

Thanks!