boule.TriaxialEllipsoid
Contents
boule.TriaxialEllipsoid#
- class boule.TriaxialEllipsoid(name, semimajor_axis, semimedium_axis, semiminor_axis, geocentric_grav_const, angular_velocity, long_name=None, reference=None)[source]#
A rotating triaxial ellipsoid.
The ellipsoid is defined by five parameters: semimajor axis, semimedium axis, semiminor axis, geocentric gravitational constant, and angular velocity The thee semi-axis are different and the ellipsoid spins around it’s largest moment of inertia.
This class is read-only: Input parameters and attributes cannot be changed after instantiation.
Units: All input parameters and derived attributes are in SI units.
Attention
Gravity calculations have not been implemented yet for triaxial ellipsoids. If you’re interested in this feature or would like to help implement it, please get in touch.
- Parameters
name (str) – A short name for the ellipsoid, for example
"WGS84"
.semimajor_axis (float) – The semimajor (largest) axis of the ellipsoid. Definition: \(a\). Units: \(m\).
semimedium_axis (float) – The semimedium (middle) axis of the ellipsoid. Definition: \(b\). Units: \(m\).
semiminor_axis (float) – The semiminor (smallest) axis of the ellipsoid. Definition: \(c\). Units: \(m\).
geocentric_grav_const (float) – The geocentric gravitational constant. The product of the mass of the ellipsoid \(M\) and the gravitational constant \(G\). Definition: \(GM\). Units: \(m^3.s^{-2}\).
angular_velocity (float) – The angular velocity of the rotating ellipsoid. Definition: \(\omega\). Units: \(\\rad.s^{-1}\).
long_name (str or None) – A long name for the ellipsoid, for example
"World Geodetic System 1984"
(optional).reference (str or None) – Citation for the ellipsoid parameter values (optional).
Examples
We can define an ellipsoid by setting the 5 key numerical parameters:
>>> ellipsoid = TriaxialEllipsoid( ... name="VESTA", ... long_name="Vesta Triaxial Ellipsoid", ... semimajor_axis=286_300, ... semimedium_axis=278_600, ... semiminor_axis=223_200, ... geocentric_grav_const=1.729094e10, ... angular_velocity=326.71050958367e-6, ... reference=( ... "Russell, C. T., Raymond, C. A., Coradini, A., McSween, " ... "H. Y., Zuber, M. T., Nathues, A., et al. (2012). Dawn at " ... "Vesta: Testing the Protoplanetary Paradigm. Science. " ... "doi:10.1126/science.1219381" ... ), ... ) >>> print(ellipsoid) TriaxialEllipsoid(name='VESTA', ...) >>> print(ellipsoid.long_name) Vesta Triaxial Ellipsoid
The class then defines several derived attributes based on the input parameters:
>>> print(f"{ellipsoid.mean_radius:.0f} m") 262700 m >>> print(f"{ellipsoid.volume * 1e-9:.0f} km³") 74573626 km³
Attributes#
- TriaxialEllipsoid.equatorial_flattening#
The equatorial flattening of the ellipsoid. Definition: \(f_b = \frac{a - b}{a}\). Units: adimensional.
- TriaxialEllipsoid.mean_radius#
The arithmetic mean radius of the ellipsoid. Definition: \(R = \dfrac{a + b + c}{3}\). Units: \(m\).
- TriaxialEllipsoid.meridional_flattening#
The meridional flattening of the ellipsoid in the meridian plane containing the semi-major axis. Definition: \(f_c = \frac{a - c}{a}\). Units: adimensional.
- TriaxialEllipsoid.volume#
The volume bounded by the ellipsoid. Definition: \(V = \dfrac{4}{3} \pi a b c\). Units: \(m^3\).
Methods#
List of methods
|
Radial distance from the center of the ellipsoid to its surface. |
Methods documentation
- TriaxialEllipsoid.geocentric_radius(longitude, latitude, longitude_semimajor_axis=0.0)[source]#
Radial distance from the center of the ellipsoid to its surface.
Assumes geocentric spherical latitude and geocentric spherical longitudes. The geocentric radius is calculated following [Pec1983].
- Parameters
longitude (float or array) – Longitude coordinates on spherical coordinate system in degrees.
latitude (float or array) – Latitude coordinates on spherical coordinate system in degrees.
longitude_semimajor_axis (float (optional)) – Longitude coordinate of the meridian containing the semi-major axis on spherical coordinate system in degrees. Optional, default value is 0.0.
- Returns
geocentric_radius (float or array) – The geocentric radius for the given spherical latitude(s) and spherical longitude(s) in the same units as the axes of the ellipsoid.
Tip
No elevation is taken into account.
Notes
Given geocentric spherical latitude \(\phi\) and geocentric spherical longitude \(\lambda\), the geocentric surface radius \(R\) is computed as (see Eq. 1 of [Pec1983])
\[R(\phi, \lambda) = \frac{ a \, (1 - f_c) \, (1 - f_b) }{ \sqrt{ 1 - (2 f_c - f_c^2) \cos^2 \phi - (2 f_b - f_b^2) \sin^2 \phi - (1 - f_c)^2 (2 f_b - f_b^2) \cos^2 \phi \cos^2 (\lambda - \lambda_a) } },\]where \(f_c\) is the meridional flattening
\[f_c = \frac{a - c}{a},\]\(f_b\) is the equatorial flattening
\[f_b = \frac{a - b}{a},\]with \(a\), \(b\) and \(c\) being the semi-major, semi-medium and semi-minor axes of the ellipsoid, and \(\lambda_a\) being the geocentric spherical longitude of the meridian containing the semi-major axis.
Note that [Pec1983] use geocentric spherical co-latitude, while here we used geocentric spherical latitude.