diff --git a/groundstation/fc_block_decode.py b/groundstation/fc_block_decode.py index 598169ab..0250a1dd 100644 --- a/groundstation/fc_block_decode.py +++ b/groundstation/fc_block_decode.py @@ -24,7 +24,7 @@ sequence, image_id, image_count = 0, 0, 0 Vx, Vy, Vz, Vb = 0, 0, 0, 0 Ix, Iy, Iz, Ic, Ib = 0, 0, 0, 0, 0 frame_count, frame_type = 0, " " -frequency_string, errors, first_byte = " ", 0, 0 +frequency_string, frequency, errors, first_byte = " ", 0, 0, 0 # html_dir = "/home/pi/CubeSatSim/groundstation/public_html/" html_dir = "/home/pi/fctelem/public_html/" @@ -45,7 +45,7 @@ telem_string_format = " Image: {image_id:3d} count: {image_count:2d}
" + \ " Ix(mA): {Ix:5d} Iy(mA): {Iy:5d} Iz(mA): {Iz:5d}
" + \ " Vbat(mV): {Vb:5d} Ibat(mA): {Ib:5d}
" + \ - " Freq: {frequency_string} errors: {errors} Seq: {sequence:d} {frame_type} frames: {frame_count:d}" + " Freq: {frequency:10f} errors: {errors} Seq: {sequence:d} {frame_type} frames: {frame_count:d}" csv_format = "{frame_count:4d}, {frequency_string:12s}, {errors:3d}, {first_byte: 2x}, {sequence:5d}, {frame_type:9s}, {image_id:3d}, {image_count:2d}, " + \ "{Vx:5d}, {Vy:5d}, {Vz:5d}, {Ix:5d}, {Iy:5d}, {Iz:5d}, {Vb:5d}, {Ib:5d}" @@ -84,6 +84,8 @@ if __name__ == "__main__": data_block_string = line.split() # print(data_block_string) frequency_string = data_block_string[2] + print(frequency_string) + frequency = int(frequency_string[:len(frequency_string) - 2] errors = int(data_block_string[5]) data_block = [int(number_string,16) for number_string in data_block_string[7:]] first_byte = data_block[0]