Reference Ellipsoid
class ahrs.utils.ReferenceEllipsoid(a: float = 1.0, f: float = 0.0, GM: float = 6.6743e-11, w: float = 1.0) : This implementation is based on the World Geodetic System (WGS) reference ellipsoid [198414], which is the most widely used reference ellipsoid for the Global Positioning System (GPS).
The WGS84 uses four elemental parameters to describe a reference ellipsoid:
- Semi-major axis, , in meters.
- Flattening ratio, .
- Standard Gravitational Parameter, , in m^3/s^2.
- Angular velocity, , in rad/s.
The semi-major axis, , is the radius of the ellipsoid at the
equator, while the flattening ratio, , is the ratio of the
difference between the semi-major and semi-minor axes to the semi-major
axis:
where is the semi-minor axis of the ellipsoid. When
the ellipsoid is a perfect sphere. When the ellipsoid is a
flat disc.
The [standard gravitational parameter](https://en.wikipedia.org/wiki/Standard_gravitational_parameter),
, is the product of the **gravitational constant** and the
**mass** of the planetary body:
where \(G = 6.67430 \times 10^{-11} \frac{\mathrm{m}^3}{\mathrm{kg}\mathrm{s}^2}) is the universal constant of gravitation, and is the mass of the planetary body, in kg.
From these four parameters we can derive all other properties of the
ellipsoid.
The default values describe a **perfect sphere** with a radius of 1 meter,
whose gravitational constant is equal the universal constant of gravitation,
and rotates at 1 rad/s.
Parameters:
: - **a** (*float, default: 1.0*) – Semi-major axis of the ellipsoid, in meters.
- **f** (*float, default: 0.0*) – Flattening of the ellipsoid, unitless.
- **GM** (*float, default: 6.6743e-11*) – Standard Gravitational Parameter of the ellipsoid, in m^3/s^2.
- **w** (*float, default: 1.0*) – Angular velocity of the ellipsoid, in rad/s.
*property* arithmetic\_mean\_radius*: float*
: Mean Radius of the Three Semi-Axes, computed as:
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.arithmetic_mean_radius 1.0
*property* aspect\_ratio*: float*
: Aspect Ratio , computed as:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.aspect_ratio
1.0*property* authalic\_sphere\_radius*: float*
: Radius of a Sphere of Equal Area, computed as:
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.authalic_sphere_radius 1.0
*property* curvature\_polar\_radius*: float*
: Polar Radius of Curvature , computed as:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.curvature_polar_radius
1.0*property* dynamical\_form\_factor*: float*
: WGS 84 Dynamical Form Factor , computed as:
where:
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.dynamical_form_factor 0.0
*property* equatorial\_normal\_gravity*: float*
: Normal Gravity at the Equator, in
, computed as:
where:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.equatorial_normal_gravity
14982844642.8839*property* equivolumetric\_sphere\_radius*: float*
: Radius of a Sphere of Equal Volume, computed as:
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.equivolumetric_sphere_radius 1.0
*property* first\_eccentricity\_squared*: float*
: First Eccentricity Squared of the ellipsoid, computed as:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.first_eccentricity_squared
0.0*property* is\_geodetic*: bool*
: Check whether the ellipsoid model is geodetic (describes planet Earth.)
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.is_geodetic False
*property* linear\_eccentricity*: float*
: Linear Eccentricity , computed as:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.linear_eccentricity
0.0*property* mass*: float*
: The Mass of the ellipsoid, in kg, computed as:
where is the universal constant of gravitation equal to
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.mass 1.0
*property* mean\_normal\_gravity*: float*
: Mean Value of Normal Gravity, in
, computed as:
where:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.mean_normal_gravity
14982844642.8839meridian\_curvature\_radius(*lat: float*) → float
: Radius of the curvature in the prime meridian, estimated at a given
latitude, , as per [[Jek16](/u/fab8b0a9fec670cf#id31)]:
Parameters:
: **lat** (*float*) – Geographical latitude, in decimal degrees.
normal\_gravity(*lat: float*, *h: float = 0.0*) → float
: Normal Gravity on (or above) Ellipsoidal Surface
Estimate the normal gravity on or above the surface of an ellipsoidal
body using Somigliana’s formula (on surface) and a series expansion
(above surface).
Somigliana’s closed formula as desribed by H. Moritz in
[[Mor84](/u/fab8b0a9fec670cf#id53)] is:
For numerical computations, a more convenient form is:
with the helper constant :
Parameters:
: - **lat** (*float*) – Geographical latitude, in decimal degrees.
- **h** (*float, default: 0.0*) – Mean sea level height, in meters.
Returns:
: **g** – Normal gravity at given point in space, in m/s^2.
Return type:
: float
Examples
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.normal_gravity(50.0) 9.810702135603085
ref.normal_gravity(50.0, 100.0) 9.810393625316983
*property* normal\_gravity\_constant*: float*
: Normal Gravity Formula Constant , computed as:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.normal_gravity_constant
14982844642.8839*property* normal\_gravity\_potential*: float*
: Normal Gravity Potential of the WGS 84 Ellipsoid, computed
as:
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.normal_gravity_potential 6.6743e-11
*property* polar\_normal\_gravity*: float*
: Normal Gravity at the Pole, in
, computed as:
where:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.polar_normal_gravity
14982844642.8839*property* second\_degree\_zonal\_harmonic*: float*
: WGS 84 Second Degree Zonal Harmonic , computed as:
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.second_degree_zonal_harmonic 0.0
*property* second\_eccentricity\_squared*: float*
: Second Eccentricity Squared , computed as:
Example
```default
>>> ref = ahrs.utils.ReferenceEllipsoid()
>>> ref.second_eccentricity_squared
0.0*property* sidereal\_day*: float*
: Sidereal Day, , in seconds, computed as:
Example
```defaultref = ahrs.utils.ReferenceEllipsoid() ref.sidereal_day 6.283185307179586
vertical\_curvature\_radius(*lat: float*) → float
: Radius of the curvature in the prime vertical, estimated at a given
latitude, , as:
Parameters:
: **lat** (*float*) – Geographical latitude, in decimal degrees.