initial commit

This commit is contained in:
Paul 2022-07-17 03:19:43 +02:00
commit 74a7c9dc50
3 changed files with 39 additions and 0 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# WolfPack Helpers
collection of python scripts for calculations in the UBoat game Wolfpack

26
aob_calc/aob_calc.py Normal file
View File

@ -0,0 +1,26 @@
import math
print("Humorhenker AOB calc script")
print("---------------------------")
print("Enter height (in m)")
height = float(input())
print("Enter length (in m)")
length = float(input())
print("Enter vertical marks")
vertical = float(input())
print("Enter horizontal marks")
horizontal = float(input())
try:
aob = math.degrees(math.asin(height/length*horizontal/vertical*1.745))
except ValueError:
print("ValueError | AOB close to 90°")
print("Ship already passed?")
passed = input()
if (passed in ["y", "Y", "yes", "Yes", "j", "J", "ja", "Ja"]): aob = 180-aob
print("---------------------------")
print("AOB is %s°" % round(aob, 2))

10
speed_calc/speed_calc.py Normal file
View File

@ -0,0 +1,10 @@
print("Humorhenker speed calc script")
print("---------------------------")
print("Enter length (in m)")
length = float(input())
print("Enter time (in s)")
time = float(input())
print("---------------------------")
print("speed is %s kn" % round(length/time*1.944, 2))