diff options
author | pux <pux@pux.dom> | 2021-03-22 01:06:39 +0100 |
---|---|---|
committer | pux <pux@pux.dom> | 2021-03-22 01:06:39 +0100 |
commit | 46169e6a75130cd8e0719a39b92a1454279da312 (patch) | |
tree | 66a68219c09126838fc5213f67e8ecb2502f4500 /calctenna.py | |
parent | 89fb2f470b08068a8578e75fd093bc62493ec413 (diff) | |
download | calctenna-46169e6a75130cd8e0719a39b92a1454279da312.tar.gz calctenna-46169e6a75130cd8e0719a39b92a1454279da312.tar.bz2 calctenna-46169e6a75130cd8e0719a39b92a1454279da312.zip |
floatsy
Diffstat (limited to 'calctenna.py')
-rwxr-xr-x | calctenna.py | 9 |
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: |