def main(): with open('teksty.txt', 'r') as file: data = file.readlines() points = [] for line in data: point = line.strip().split() points.append(Point(point[0], point[1], point[2])) length = 0 azimuth = 0 for i in range(len(points)-1): azimuth += points[i].get_azimuth(points[i+1]) length += points[i].get_length(points[i+1]) print(f'length = {length}') print(f'azimuth = {azimuth}') print(angles.dms_deg2decimal_deg([2, 4, 6]))
def test_dms_deg2decimal_deg(): assert dms_deg2decimal_deg([252, 27, 20]) == 252.45555555555555 assert dms_deg2decimal_deg([1, 1, 1]) == 1.0169444444444444
def test_dms_deg2decimal_deg(): assert dms_deg2decimal_deg([1, 1, 0]) == 1.0166666666666666 assert dms_deg2decimal_deg([59, 12, 50]) == 59.21388888888889
def test_dms_deg2decimal_deg(): assert dms_deg2decimal_deg([1, 1, 1.1]) == 1.0169722222222222 assert dms_deg2decimal_deg([2, 4, 6]) == 2.0683333333333334 # correct for 5 pass
def test_dms_deg2decimal_deg(): assert dms_deg2decimal_deg([42, 247, 20]) == 46.12222222222222 assert dms_deg2decimal_deg([12, 42, 21]) == 12.705833333333333
def test_dms_deg2decimal_deg(): assert dms_deg2decimal_deg([360, 13, 30]) == 360.22499999999997 assert dms_deg2decimal_deg([100, 50, 50]) == 100.84722222222221
def test_dms_deg2decimal_deg(): assert dms_deg2decimal_deg([1, 1, 1.1]) == 1.0169722222222222 assert dms_deg2decimal_deg([1, 2, 3.3]) == 1.0342500000000001 # correct for 5 pass