Update 'tools/meas.py'
Floatingpoint calculation fixed.
This commit is contained in:
parent
a2e59d7a61
commit
8ce6ddc869
1 changed files with 3 additions and 3 deletions
|
@ -508,10 +508,10 @@ if __name__ == "__main__":
|
|||
|
||||
if m[1] > 0 and m[2] > 0:
|
||||
if m[1] > m[2]:
|
||||
vswr = (m[1] / m[2])
|
||||
vswr = (1.0 * m[1] / m[2])
|
||||
meas_ratio.append(vswr)
|
||||
elif m[1] < m[2]:
|
||||
vswr = (m[2] / m[1])
|
||||
vswr = (1.0 * m[2] / m[1])
|
||||
meas_ratio.append(vswr)
|
||||
else:
|
||||
vswr = 1
|
||||
|
@ -539,7 +539,7 @@ if __name__ == "__main__":
|
|||
FILE.write("freqency;ratio;impedance;watt;drive;a0;a1\n")
|
||||
j = 0
|
||||
for m in meas_ratio:
|
||||
FILE.write("%f;%f;%f;%f;%f;%d,%d\n" % (meas_freq[j], m, meas_r[j], meas_p[j], i, meas_data[j][1], meas_data[j][2]))
|
||||
FILE.write("%f;%f;%f;%f;%f;%d;%d\n" % (meas_freq[j], m, meas_r[j], meas_p[j], i, meas_data[j][1], meas_data[j][2]))
|
||||
j = j + 1
|
||||
FILE.close()
|
||||
print "Output file " + args.output_file + " written."
|
||||
|
|
Loading…
Reference in a new issue