diff options
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: |