#!/usr/bin/env python3 max_length = 100 # meters eps = 0.4 # meters invalid_lengths = [] valid_lengths = [] freqs = [ # Mhz [1.8, 2.0], # 160m [3.5, 3.8], # 80m [7.0, 7.2], # 40m [10.1, 10.15], # 30m [14.0, 14.35], # 20m [18.068, 18.168], # 17m [21.0, 21.45], # 15m [24.89, 24.99], # 12m [28.0, 29.7] # 10m ] for f in freqs: [ ff, ft ] = f # print("From: %.03f, to: %.03f" % (ff, ft)) while ff <= ft: ln = 0 mult = 1 while True: ln = (150/ff)*mult if ln > max_length: break invalid_lengths.append(ln) mult += 1 ff += 0.001 # + 1kHz ln = 10 while ln < max_length: valid = True for i in range(0, len(invalid_lengths)): if abs(ln-invalid_lengths[i]) < eps: valid = False break if valid: print("Valid length: %f" % (ln)) ln += 0.1 # 10 cm