Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion lunarsky/moon.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,25 @@ class CE1LAM10SelenodeticRepresentation(BaseGeodeticRepresentation):
_flattening = 1 / 973.463


class IAU2000SelenodeticRepresentation(BaseGeodeticRepresentation):
"""Lunar ellipsoid as a sphere defined by IAU 2000

Radius defined by the "Report of the IAU/IAG Working Group on Cartographic
Coordinates and Rotational Elements of the Planets and Satellites: 2000"
(https://doi.org/10.1023/A:1013939327465).
"""

_equatorial_radius = 1737.4 * u.km
_flattening = 0.0


# Define reference ellipsoids
SELENOIDS = {
"SPHERE": SPHERESelenodeticRepresentation,
"GSFC": GSFCSelenodeticRepresentation,
"GRAIL23": GRAIL23SelenodeticRepresentation,
"CE-1-LAM-GEO": CE1LAM10SelenodeticRepresentation,
"IAU2000": IAU2000SelenodeticRepresentation,
}


Expand Down Expand Up @@ -341,7 +354,8 @@ def from_selenodetic(cls, lon, lat, height=0.0, ellipsoid=None):
from the center of mass of the Moon.
ellipsoid : str, optional
Name of the reference ellipsoid to use (default: 'SPHERE').
Available ellipsoids are: 'SPHERE', 'GRAIL23', 'CE-1-LAM-GEO'.
Available ellipsoids are: 'SPHERE', 'GSFC', 'GRAIL23',
'CE-1-LAM-GEO', 'IAU2000'.
See docstrings for classes in ELLIPSOIDS dictionary for references.

Raises
Expand Down
2 changes: 1 addition & 1 deletion lunarsky/tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def test_topo_zenith_shift(ell, lat, lon):
# Also fails near poles.

# Comparing against the SPHERE ellipsoid. Test fails for this due to divide by zero
if ell == "SPHERE":
if ell in {"SPHERE", "IAU2000"}:
return

lat *= un.deg
Expand Down
Loading