Documentation / @interstellar-tools/equations / flatteningOblateSpheroid
Function: flatteningOblateSpheroid()
ts
function flatteningOblateSpheroid(a: number, c: number): number;Defined in: cartography/flattening-oblate-spheroid.ts:39
Compute flattening (
Flattening quantifies how much an ellipsoid of revolution is "squashed" at the poles, using equatorial radius (
Notes:
- (
) is dimensionless. - For a physically valid oblate spheroid with (
), ( ). - Commonly used in geodesy/cartography (e.g., defining reference ellipsoids and deriving related parameters like eccentricity).
Parameters
| Parameter | Type | Description |
|---|---|---|
a | number | Equatorial radius ( |
c | number | Polar radius ( |
Returns
number
Flattening (
Throws
If a or c is not a finite number.
Throws
If a <= 0 or c <= 0.
Example
ts
// Earth (WGS84-ish radii in meters):
const a = 6378137.0;
const c = 6356752.314245;
const f = flatteningOblateSpheroid(a, c);See
- https://en.wikipedia.org/wiki/Flattening Flattening (definition and geodesy usage)
- https://en.wikipedia.org/wiki/Reference_ellipsoid Reference ellipsoid (a, b/c, and flattening used to define ellipsoids)
- https://epsg.org/guidance-notes.html EPSG Guidance Notes (geodesy reference; ellipsoid parameters and derived quantities)