107 self.ui.dlambda_outputq.setText("Frekuensi bernilai 0") else: c = 3*10**8 d = 0.25 - abs(ip)/720 d = round(d*(c/f), 7) lamb = round((c/f)/4, 7) self.ui.d_outputq.setText(str(d) + " m") self.ui.dlambda_outputq.setText(str(lamb) + " m") vswr = (1 + abs(rp)) / (1 - abs(rp)) zlnormal = zo / vswr zt = round((zo*zlnormal)**0.5, 7) zlnormal = round(zlnormal, 7) self.ui.daya_outputq.setText(str(daya)+" %") self.ui.zind_outputq.setText(str(zlnormal) + " Ω") self.ui.zt_outputq.setText(str(zt) + " Ω") def hitung1(self): zo = float(self.ui.zo_input_realh.text().replace(',','. ')) zl1 = float(self.ui.zl_input_realh.text().replace(',','. ')) zl2 = float(self.ui.zl_input_imajinerh.text().replace(', ','.')) f = float(self.ui.frekuensi_inputh.text().replace(',', '.')) if (zo==0 and zl1==0 and zl2==0 and f==0): self.ui.lbl_gagal2.setText("GAGAL MENGHITUNG") self.ui.lbl_sukses2.setText("") self.ui.daya_outputh.setText(str()) self.ui.dlambda_outputh.setText(str())
RkJQdWJsaXNoZXIy MTM3NDc5MQ==