Ejemplo n.º 1
0
def test_resection4():
    P7res = Point("P7")
    oP7res = PolarObservation('P7', "station", Angle(0))
    sP7res = Station(P7res, oP7res)
    p101res = Point("101", -50, 80)
    p102res = Point("102", 0, 80)
    p103res = Point("103", 50, 80)
    o101res = PolarObservation("101", None, Angle("225", "DMS"))
    o102res = PolarObservation("102", None, Angle("45", "DMS"))
    o103res = PolarObservation("103", None, Angle("45", "DMS"))
    with pytest.raises(AttributeError):
        Calculation.resection(sP7res, p101res, p102res, p103res, o101res, o102res, o103res)
Ejemplo n.º 2
0
def test_resection2(resection_points_fixture):
    P5res = Point("P5")
    oP5res = PolarObservation('P5', "station", Angle(0))
    sP5res = Station(P5res, oP5res)
    p101res = resection_points_fixture[0]
    p102res = resection_points_fixture[1]
    p103res = resection_points_fixture[2]
    o101res = PolarObservation("101", None, Angle("88-41-35.8669", "DMS"))
    o102res = PolarObservation("102", None, Angle("40-11-52.9394", "DMS"))
    o103res = PolarObservation("103", None, Angle("155-23-15.1567", "DMS"))
    with pytest.raises(TypeError):
        Calculation.resection(sP5res, p101res, p102res, p103res, o101res, o102res, o103res)
Ejemplo n.º 3
0
def test_resection3():
    P6res = Point("P6")
    oP6res = PolarObservation('P6', "station", Angle(0))
    sP6res = Station(P6res, oP6res)
    p101res = Point("101", -50, 80)
    p102res = Point("102", 0, 80)
    p103res = Point("103", 50, 80)
    o101res = PolarObservation("101", None, Angle("140-32-24", "DMS"))
    o102res = PolarObservation("102", None, Angle("97-13-15", "DMS"))
    o103res = PolarObservation("103", None, Angle("70-43-22", "DMS"))
    P6res = Calculation.resection(sP6res, p101res, p102res, p103res, o101res, o102res, o103res)[0]
    assert compare(P6res, Point("P6", -29.6182, 142.6576))
Ejemplo n.º 4
0
def test_resection1(resection_points_fixture):
    P4res = Point("P4")
    oP4res = PolarObservation('P4', "station", Angle(0))
    sP4res = Station(P4res, oP4res)
    p101res = resection_points_fixture[0]
    p102res = resection_points_fixture[1]
    p103res = resection_points_fixture[2]
    o101res = PolarObservation("101", None, Angle("202-45-56", "DMS"))
    o102res = PolarObservation("102", None, Angle("344-38-59", "DMS"))
    o103res = PolarObservation("103", None, Angle("276-23-12", "DMS"))
    P4res = Calculation.resection(sP4res, p101res, p102res, p103res, o101res, o102res, o103res)[0]
    assert compare(P4res, Point("P4", 657871.9494, 247973.2414))
Ejemplo n.º 5
0
def test_resection(resection_points_fixture):
    p1res = Point("3")
    o1res = PolarObservation('3', None, "station", Angle(0))
    s1res = Station(p1res, o1res)
    p101res = resection_points_fixture[0]
    p102res = resection_points_fixture[1]
    p103res = resection_points_fixture[2]
    o101res = PolarObservation("101", None, Angle("22-45-56", "DMS"))
    o102res = PolarObservation("102", None, Angle("164-38-59", "DMS"))
    o103res = PolarObservation("103", None, Angle("96-23-12", "DMS"))
    p1res = Calculation.resection(s1res, p101res, p102res, p103res, o101res, o102res, o103res)[0]
    assert compare(p1res, Point("3", 657871.9494, 247973.2414))