Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_geodetic_alt_geocentric(geodetic_lat, alt_m, geocentric_lat):
assert pm.geod2geoc(geodetic_lat, alt_m) == approx(geocentric_lat)
r = pm.geocentric_radius(geodetic_lat)
assert pm.geoc2geod(geocentric_lat, r) == approx(geodetic_lat)
assert pm.geoc2geod(geocentric_lat, 1e5 + r) == approx(pm.geocentric2geodetic(geocentric_lat, 1e5 + alt_m))
assert pm.geod2geoc(geodetic_lat, 1e5 + alt_m) == approx(pm.geodetic2geocentric(geodetic_lat, 1e5 + alt_m))
def test_geocentric_radius_badval(bad_lat):
with pytest.raises(ValueError):
pm.geocentric_radius(bad_lat)
def test_geocentric_radius():
assert pm.geocentric_radius(0) == approx(ell.semimajor_axis)
assert pm.geocentric_radius(90) == approx(ell.semiminor_axis)
assert pm.geocentric_radius(45) == approx(6367490.0)
assert pm.geocentric_radius(30) == approx(6372824.0)
def test_geocentric_radius():
assert pm.geocentric_radius(0) == approx(ell.semimajor_axis)
assert pm.geocentric_radius(90) == approx(ell.semiminor_axis)
assert pm.geocentric_radius(45) == approx(6367490.0)
assert pm.geocentric_radius(30) == approx(6372824.0)
def test_geocentric_radius():
assert pm.geocentric_radius(0) == approx(ell.semimajor_axis)
assert pm.geocentric_radius(90) == approx(ell.semiminor_axis)
assert pm.geocentric_radius(45) == approx(6367490.0)
assert pm.geocentric_radius(30) == approx(6372824.0)
def test_geocentric_radius():
assert pm.geocentric_radius(0) == approx(ell.semimajor_axis)
assert pm.geocentric_radius(90) == approx(ell.semiminor_axis)
assert pm.geocentric_radius(45) == approx(6367490.0)
assert pm.geocentric_radius(30) == approx(6372824.0)