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
44
45
46
47
48
49
50
51
52
53
54
// Copyright (c) 2020-2021 Swift Navigation Inc.
// Contact: Swift Navigation <dev@swiftnav.com>
//
// This source is subject to the license found in the file 'LICENSE' which must
// be be distributed together with this source. All other rights reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
//! Geoid height calculation
//!
//! GNSS positions have a height which is usually referenced to a ellipsoid,
//! a smooth surface which very roughly approximates the mean sea level. This
//! ellipsoid can deviate by a large amount for the actual local mean sea level
//! due to the variations in the local gravitational field. A geoid model is
//! built to better approximate these variations in mean sea level, and can be
//! used to give a height relative to mean sea level which can be more helpful
//! to an end user.
use crateLLHRadians;
/// List of potential Geoid models used
///
/// Currently only one model is compiled into the code at a time
/// Get the offset of the geoid from the WGS84 ellipsoid
///
/// Only the latitude and longitude of the given position is taken into
/// account, the height is ignored.
///
/// To get the convert a height above the WGS84 ellipsoid to a height above the
/// geoid subtract the geoid offset from the height above the WGS84 ellipsoid
/// Gets the geoid model compiled into the Swiftnav crate