コード例 #1
0
def test_loxodrome_inverse(lat1, lon1, lat2, lon2, arclen, az):
    """
    distance('rh', 40, -80, 65, -148, wgs84Ellipsoid)
    azimuth('rh', 40, -80, 65, -148, wgs84Ellipsoid)
    """
    rhdist, rhaz = pm.loxodrome_inverse(lat1, lon1, lat2, lon2)

    assert rhdist == approx(arclen)
    assert rhaz == approx(az)
コード例 #2
0
ファイル: test_rhumb.py プロジェクト: unjambonakap/pymap3d
def test_rhumb():
    """
    distance('rh', 40, -80, 65, -148, wgs84Ellipsoid)
    azimuth('rh', 40, -80, 65, -148, wgs84Ellipsoid)
    """
    rhdist, rhaz = pm.loxodrome_inverse(40, -80, 65, -148)

    assert rhdist == approx(5248666.20853187)
    assert rhaz == approx(302.0056736)
コード例 #3
0
def test_numpy_loxodrome_inverse():
    pytest.importorskip("numpy")
    d, a = pm.loxodrome_inverse([40, 40], [-80, -80], 65, -148)

    assert d == approx(5248666.209)
    assert a == approx(302.00567)