diff --git a/groundstation/fc_block_decode.py b/groundstation/fc_block_decode.py index 7434e44b..2e7b87f6 100644 --- a/groundstation/fc_block_decode.py +++ b/groundstation/fc_block_decode.py @@ -33,8 +33,8 @@ head_string = '\n\n

  
' foot_string = "

\n" telem_string = f"\nSequence number: {sequence:5d} Image ID: {image_id:3d} count: {image_count:2d}

" + \ - f"Vx (mv): {Vx:5d} Vy (mV): {Vy:5d} Vz (mV): {Vz:5d}

" + \ - f"Ix (mA): {Ix:5d} Iy (mA): {Iy:5d} Iz (mA): {Iz:5d}

Vbat: {Vb:5d} mV Ibat: {Ib:5d} mA" + f" Vx(mV): {Vx:5d} Vy(mV): {Vy:5d} Vz(mV): {Vz:5d}

" + \ + f" Ix(mA): {Ix:5d} Iy(mA): {Iy:5d} Iz(mA): {Iz:5d}

Vbat(mV): {Vb:5d} Ibat(mA): {Ib:5d}" with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file: html_file.write(head_string) html_file.write(telem_string) @@ -83,7 +83,7 @@ if __name__ == "__main__": Ic = (0x03 & data_block[extended + FC_EPS + 10]) * 2**8 + data_block[extended + FC_EPS + 11] * 2**2 + (data_block[extended + FC_EPS + 12] >> 6) Ib = data_block[extended + FC_EPS + 12] * 2**4 + (data_block[extended + FC_EPS + 13] >> 4) if (Ib == 0): - Ib = (-1) * Ic + Ib = 0 = Ic print("Vx: {:d} mV Vy: {:d} mV Vz: {:d} mV".format(Vx, Vy, Vz)) print('Payload {:x} {:x} \n'.format(data_block[FC_PAYLOAD + extended], data_block[FC_PAYLOAD + extended + 1])) if (data_block[FC_PAYLOAD + extended] == 0x55) and (data_block[FC_PAYLOAD + extended + 1] == 0x68): @@ -133,9 +133,8 @@ if __name__ == "__main__": system("/home/pi/ssdv/ssdv -d -J /home/pi/fctelem/image_file " + filename) system("cp " + filename + " /home/pi/CubeSatSim/groundstation/public_html/image_file.jpeg") telem_string = f"\nSequence number: {sequence:5d} Image ID: {image_id:3d} count: {image_count:2d}

" + \ - f"Vx (mv): {Vx:5d} Vy (mV): {Vy:5d} Vz (mV): {Vz:5d}

" + \ - f"Ix (mA): {Ix:5d} Iy (mA): {Iy:5d} Iz (mA): {Iz:5d}

Vbat: {Vb:5d} mV Ibat: {Ib:5d} mA" - with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file: + f" Vx(mV): {Vx:5d} Vy(mV): {Vy:5d} Vz(mV): {Vz:5d}

" + \ + f" Ix(mA): {Ix:5d} Iy(mA): {Iy:5d} Iz(mA): {Iz:5d}

Vbat(mV): {Vb:5d} Ibat(mA): {Ib:5d}" with open("/home/pi/CubeSatSim/groundstation/public_html/index.html", "w") as html_file: html_file.write(head_string) html_file.write(telem_string) html_file.write(foot_string)