Skip to content

Commit

Permalink
Add new planetary ellipsoids and new naming scheme (#180)
Browse files Browse the repository at this point in the history
Add ellipsoids for several solar system bodies. Names are now 
CamelCase and include the year at the end so we can have multiple
of the same body. 

Add the optional `comments` attribute to all classes to provide additional
 information for understanding the origin of the numbers used to 
instantiate the class (for example, many papers provide several different 
versions of the ellipsoid, and you need to choose one).

Add the `TriaxialEllipsoid.semimajor_axis_longitude` optional attribute. 
Previously, this parameter was found as an optional argument to the 
`geocentric radius` method but it's an intrinsic property of the ellipsoid 
and the coordinate frame, and will be necessary for all routines that make 
use of longitude coordinates. 

The Vesta ellipsoid was replaced since the there is not enough information 
in the paper to determine the GM, it is not stated if the ellipsoid is 
geocentric or offset from the center of mass, and the directions of the 
principal axes are not given. Instead, two new ellipsoids have been added: 
A biaxial `Vesta2017` and `VestaTriaxial2017`. The triaxial one is not aligned 
with the topography and gravity coordinate axes, and this is specified by 
the new `semimajor_axis_longitude` attribute.

---------

Co-authored-by: Leonardo Uieda <leo@uieda.com>
  • Loading branch information
MarkWieczorek and leouieda authored Apr 17, 2024
1 parent 1969c58 commit 16b4699
Show file tree
Hide file tree
Showing 13 changed files with 487 additions and 106 deletions.
22 changes: 21 additions & 1 deletion boule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,27 @@
#
# Import functions/classes to make the public API
from ._ellipsoid import Ellipsoid
from ._realizations import GRS80, MARS, MERCURY, MOON, VENUS, VESTA, WGS84
from ._realizations import (
EGM96,
GRS80,
WGS84,
Callisto2024,
Ceres2018,
Charon2024,
Enceladus2024,
Europa2024,
Ganymede2024,
Io2024,
Mars2009,
Mercury2015,
Mercury2024,
Moon2015,
Pluto2024,
Titan2024,
Venus2015,
Vesta2017,
VestaTriaxial2017,
)
from ._sphere import Sphere
from ._triaxialellipsoid import TriaxialEllipsoid
from ._version import __version__
5 changes: 4 additions & 1 deletion boule/_ellipsoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Ellipsoid:
The ellipsoid is defined by four parameters: semimajor axis, flattening,
geocentric gravitational constant, and angular velocity. It spins around
it's semiminor axis and has constant gravity potential at its surface. The
its semiminor axis and has constant gravity potential at its surface. The
internal density structure of the ellipsoid is unspecified but must be such
that the constant potential condition is satisfied.
Expand Down Expand Up @@ -59,6 +59,8 @@ class Ellipsoid:
1984"`` (optional).
reference : str or None
Citation for the ellipsoid parameter values (optional).
comments : str or None
Additional comments regarding the ellipsoid (optional).
.. caution::
Expand Down Expand Up @@ -133,6 +135,7 @@ class Ellipsoid:
angular_velocity = attr.ib()
long_name = attr.ib(default=None)
reference = attr.ib(default=None)
comments = attr.ib(default=None)

@flattening.validator
def _check_flattening(self, flattening, value):
Expand Down
Loading

0 comments on commit 16b4699

Please sign in to comment.