1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use crate;
/// Earth reference ellipsoids.
///
/// Status: canonical.
///
/// Given:
/// n i32 ellipsoid identifier (Note 1)
///
/// Returned:
/// (a, f) (f64, f64) equatorial radius (meters) and flattening (Note 2)
///
/// Returned (function value):
/// Result<(f64, f64), i32> Ok((a, f)) or Err(-1) = illegal identifier (Note 3)
///
/// Notes:
///
/// 1) The identifier n is a number that specifies the choice of
/// reference ellipsoid. The following are supported:
///
/// n ellipsoid
///
/// 1 WGS84
/// 2 GRS80
/// 3 WGS72
///
/// The n value has no significance outside the SOFA software.
///
/// 2) The ellipsoid parameters are returned in the form of equatorial
/// radius in meters (a) and flattening (f). The latter is a number
/// around 0.00335, i.e. around 1/298.
///
/// 3) For the case where an unsupported n value is supplied, zero a and
/// f are returned, as well as error status.