add lesson6

This commit is contained in:
Motiejus Jakštys 2019-11-28 17:51:15 +02:00
parent 7d1de6304d
commit 5574e67ff4
4 changed files with 47 additions and 3 deletions

View File

@ -26,7 +26,7 @@ Plotis L2 (duotas)
Plotis L3 (duotas) Plotis L3 (duotas)
%.3f""" % L3 + """ %.3f""" % L3 + """
Visas kelio A-05 plotis Visas kelio A-05 plotis
******* %.3f""" % A05_plotis + """
Koeficientas L2 plocio atidejimui (+/-0.001) Koeficientas L2 plocio atidejimui (+/-0.001)
******* *******
Koeficientas L3 plocio atidejimui (+/-0.001) Koeficientas L3 plocio atidejimui (+/-0.001)
@ -45,7 +45,7 @@ Plotis L8 (duotas)
Plotis L9 (duotas) Plotis L9 (duotas)
%.3f""" % L9 + """ %.3f""" % L9 + """
Visas kelio A-08 plotis Visas kelio A-08 plotis
******* %.3f""" % A08_plotis + """
Koeficientas L4 plocio atidejimui (+/-0.001) Koeficientas L4 plocio atidejimui (+/-0.001)
******* *******
Koeficientas L5 plocio atidejimui (+/-0.001) Koeficientas L5 plocio atidejimui (+/-0.001)
@ -68,7 +68,7 @@ Plotis L12 (duotas)
Plotis L13 (duotas) Plotis L13 (duotas)
%.3f""" % L13 + """ %.3f""" % L13 + """
Visas griovio G-11 plotis Visas griovio G-11 plotis
******* %.3f""" % G11_plotis + """
Koeficientas L10 plocio atidejimui (+/-0.001) Koeficientas L10 plocio atidejimui (+/-0.001)
******* *******
Koeficientas L11 plocio atidejimui (+/-0.001) Koeficientas L11 plocio atidejimui (+/-0.001)

View File

@ -56,6 +56,10 @@ L11 = Dec('3.305')
L12 = Dec('2.210') L12 = Dec('2.210')
L13 = Dec('4.381') L13 = Dec('4.381')
A05_plotis = L2 + L3
A08_plotis = sum([L4,L5,L6,L7,L8,L9])
G11_plotis = sum([L10,L11,L12,L13])
# Directional coords + angle # Directional coords + angle
X11 = Dec('6091968.055') X11 = Dec('6091968.055')
Y11 = Dec('485944.146') Y11 = Dec('485944.146')

28
Karto/lesson6/cnt.py Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env python3
from math import cos, tan, asin, sqrt
from deg import deg
L12 = 396.942
B12 = deg('40-19-21.0')
D12 = L12 * cos(B12)
L23 = 421.159
H23 = 25.771
B23 = asin(H23 / L23)
D23 = sqrt(L23**2 - H23**2)
L34 = 294.911
B34 = deg('31-56-51.2')
D34 = L34 * cos(B34)
H41 = 77.226
B41 = deg('38-45-7.8')
D41 = H41 / tan(B41)
print("""
D12 = %4.3f""" % D12 + """
D23 = %4.3f""" % D23 + """
D34 = %4.3f""" % D34 + """
D41 = %4.3f""" % D41 + """
Sum = %4.3f""" % (D12 + D23 + D34 + D41) + """
""")

12
Karto/lesson6/deg.py Normal file
View File

@ -0,0 +1,12 @@
from math import pi
def deg(inp):
"""return angle in radians"""
if isinstance(inp, str) and '-' in inp:
deg, mm, ss = inp.split('-')
ddeg, dmm, dss = float(deg), float(mm), float(ss)
deg = ddeg + dmm/60 + dss/3600
else:
deg = float(instr)
return deg * pi / 180