initial commit
This commit is contained in:
commit
74a7c9dc50
|
@ -0,0 +1,3 @@
|
||||||
|
# WolfPack Helpers
|
||||||
|
|
||||||
|
collection of python scripts for calculations in the UBoat game Wolfpack
|
|
@ -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))
|
|
@ -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))
|
Loading…
Reference in New Issue