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)
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)
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)