aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcalctenna.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/calctenna.py b/calctenna.py
index 8bf9bb3..88a6758 100755
--- a/calctenna.py
+++ b/calctenna.py
@@ -85,12 +85,12 @@ def check_input(frequency, velocity_factor):
# fill struct
def calc(antenna_data):
- c = 299792458 # speed of light
- antenna_data.wavelength = float(c) / float(antenna_data.frequency)
+ c = 299792458.0 # speed of light
+ antenna_data.wavelength = c / antenna_data.frequency
antenna_data.wavelength_2 = antenna_data.wavelength/2
antenna_data.wavelength_4 = antenna_data.wavelength/4
antenna_data.dipole_leg_length = antenna_data.wavelength_4 \
- * float(antenna_data.velocity_factor)
+ * antenna_data.velocity_factor
if __name__ == '__main__':
args = run_argparse()
@@ -102,7 +102,8 @@ if __name__ == '__main__':
if not check_input(args.frequency, args.velocity_factor):
exit()
- antenna_data = AntennaData(args.frequency, args.velocity_factor)
+ # check_input OK -> float()
+ antenna_data = AntennaData(float(args.frequency), float(args.velocity_factor))
calc(antenna_data)
if not args.quiet:
in each repos: see "about"-tab (if existing) for more details / README.
mailto contact at omeckman dot net
all timestamps in UTC (German winter time: UTC+01:00, summer time: UTC+02:00)
dark theme is a modded version of: https://gist.github.com/Yoplitein/f4b671a2ec70c9e743fa