boule.Ellipsoid¶
-
class
boule.
Ellipsoid
(name, semimajor_axis, flattening, geocentric_grav_const, angular_velocity, long_name=None, reference=None)[source]¶ Reference oblate ellipsoid.
The ellipsoid is oblate and spins around it’s minor axis. It is defined by four parameters and offers other derived quantities as read-only properties. In fact, all attributes of this class are read-only and cannot be changed after instantiation.
All ellipsoid parameters are in SI units.
- Parameters
name (str) – A short name for the ellipsoid, for example
'WGS84'
.semimajor_axis (float) – The semi-major axis of the ellipsoid (equatorial radius), usually represented by “a” [meters].
flattening (float) – The flattening of the ellipsoid (f) [adimensional].
geocentric_grav_const (float) – The geocentric gravitational constant (GM) [m^3 s^-2].
angular_velocity (float) – The angular velocity of the rotating ellipsoid (omega) [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 a reference unit sphere by using 0 as the flattening:
>>> sphere = Ellipsoid( ... name="sphere", ... long_name="Unit sphere", ... semimajor_axis=1, ... flattening=0, ... geocentric_grav_const=1, ... angular_velocity=0 ... ) >>> print(sphere) Ellipsoid(name='sphere', ...) >>> print(sphere.long_name) Unit sphere >>> print("{:.2f}".format(sphere.semiminor_axis)) 1.00 >>> print("{:.2f}".format(sphere.mean_radius)) 1.00 >>> print("{:.2f}".format(sphere.linear_eccentricity)) 0.00 >>> print("{:.2f}".format(sphere.first_eccentricity)) 0.00 >>> print("{:.2f}".format(sphere.second_eccentricity)) 0.00
Attributes
|
Auxiliary quantity \(m = \omega^2 a^2 b / (GM)\) |
|
The first eccentricity [adimensional] |
|
The norm of the gravity vector at the equator on the ellipsoid [m/s^2] |
|
The norm of the gravity vector at the poles on the ellipsoid [m/s^2] |
|
The linear eccentricity [meters] |
|
The arithmetic mean radius [meters] |
|
The second eccentricity [adimensional] |
|
The small (polar) axis of the ellipsoid [meters] |
Methods
|
Convert from geodetic to geocentric spherical coordinates. |
|
Calculate normal gravity at any latitude and height. |
|
Convert from geocentric spherical to geodetic coordinates. |
-
Ellipsoid.
geodetic_to_spherical
(longitude, latitude, height)[source]¶ Convert from geodetic to geocentric spherical coordinates.
The geodetic datum is defined by this ellipsoid. The coordinates are converted following [Vermeille2002].
- Parameters
longitude (array) – Longitude coordinates on geodetic coordinate system in degrees.
latitude (array) – Latitude coordinates on geodetic coordinate system in degrees.
height (array) – Ellipsoidal heights in meters.
- Returns
longitude (array) – Longitude coordinates on geocentric spherical coordinate system in degrees. The longitude coordinates are not modified during this conversion.
spherical_latitude (array) – Converted latitude coordinates on geocentric spherical coordinate system in degrees.
radius (array) – Converted spherical radius coordinates in meters.
-
Ellipsoid.
normal_gravity
(latitude, height)[source]¶ Calculate normal gravity at any latitude and height.
Computes the magnitude of the gradient of the gravity potential (gravitational + centrifugal) generated by the ellipsoid at the given latitude and (geometric) height. Uses of a closed form expression of [LiGotze2001].
-
Ellipsoid.
spherical_to_geodetic
(longitude, spherical_latitude, radius)[source]¶ Convert from geocentric spherical to geodetic coordinates.
The geodetic datum is defined by this ellipsoid. The coordinates are converted following [Vermeille2002].
- Parameters
longitude (array) – Longitude coordinates on geocentric spherical coordinate system in degrees.
spherical_latitude (array) – Latitude coordinates on geocentric spherical coordinate system in degrees.
radius (array) – Spherical radius coordinates in meters.
- Returns
longitude (array) – Longitude coordinates on geodetic coordinate system in degrees. The longitude coordinates are not modified during this conversion.
latitude (array) – Converted latitude coordinates on geodetic coordinate system in degrees.
height (array) – Converted ellipsoidal height coordinates in meters.