0

I am still new to the python when it comes to parsing data. I'd like solve this problem that can be seen in the image and the respective "telemetry.bin" and 'TLM_LIST.csv" are in the google drive folder. I am able to operate the csv file using pandas but don't how to deal with the bin file as it throws output like below:

https://drive.google.com/open?id=1h_15khW2abjT8V6L38VSrqpb5vrmDfa-

b'\n\x00\x00\x07\x08\x01\x0b\xe7\x08\xc3\x0b\xd9\x07\x9e\x04\xe4\x00\x00\x0c\xef\x00\x99\x1f\xdb\x00\x00\x00\x00\xbe\xef\xca\xfe\x00\x00\x01\x00\x02\x04\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00mg2878_a A\x00\xc1\x00\x8fe\xb8>\x00\x00\x00\x05\x00%~\x1a\x00\x00\x00\x96\x00\x00\x00\x91\x00\x01\x02\x00\x00\x00\x00\x8fe\xb8?\x00\x00\x00\x00' enter image description here

Please I really wanna learn so please help. Thanks in advance.

  • What have you tried so far? Can you share your code with us? – jv95 May 20 '20 at 18:12
  • The binary data has to have some format and without knowing that, there really isn't anything we can do to help. If this is a standard format, there is a good chance that a python module has been written to parse it. – tdelaney May 20 '20 at 18:12
  • The format is basically just like TLM_LIST.csv (the file is in the drive). – Rushikesh Badgujar May 20 '20 at 18:14
  • I tried following, the output I get is "None" may be due to incorrect format. It is actually a dataframe. from beacontools import parse_packet with open("telemetry.bin","rb") as b_f: data=b_f.read() print(data) da = parse_packet(data) – Rushikesh Badgujar May 20 '20 at 18:15
  • # Can this link help? https://stackoverflow.com/questions/5618988/regular-expression-parsing-a-binary-file?r=SearchResults&s=1|139.4969 – Red May 20 '20 at 19:09
  • Does this answer your question? [Regular expression parsing a binary file?](https://stackoverflow.com/questions/5618988/regular-expression-parsing-a-binary-file) – Red May 20 '20 at 19:10
  • I am still trying your suggestion. – Rushikesh Badgujar May 21 '20 at 07:05
  • Correct me if I am wrong. Obviously the data in bin file is just like that TLM_LIST.csv file with columns ['byte','commands', and so on]. So during parsing (converting data to readable format), do I need to each column to store the respective parsed data in it? – Rushikesh Badgujar May 21 '20 at 07:08

0 Answers0