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

Ellipsoid.emm

Auxiliary quantity \(m = \omega^2 a^2 b / (GM)\)

Ellipsoid.first_eccentricity

The first eccentricity [adimensional]

Ellipsoid.gravity_equator

The norm of the gravity vector at the equator on the ellipsoid [m/s^2]

Ellipsoid.gravity_pole

The norm of the gravity vector at the poles on the ellipsoid [m/s^2]

Ellipsoid.linear_eccentricity

The linear eccentricity [meters]

Ellipsoid.mean_radius

The arithmetic mean radius [meters]

Ellipsoid.second_eccentricity

The second eccentricity [adimensional]

Ellipsoid.semiminor_axis

The small (polar) axis of the ellipsoid [meters]

Methods

Ellipsoid.geodetic_to_spherical(longitude, …)

Convert from geodetic to geocentric spherical coordinates.

Ellipsoid.normal_gravity(latitude, height)

Calculate normal gravity at any latitude and height.

Ellipsoid.spherical_to_geodetic(longitude, …)

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].

Parameters
  • latitude (float or array) – The (geodetic) latitude where the normal gravity will be computed (in degrees).

  • height (float or array) – The ellipsoidal (geometric) height of computation point (in meters).

Returns

gamma (float or array) – The normal gravity in mGal.

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.

Examples using boule.Ellipsoid