Debian Codegraph @

src/atlas/util/Earth.h

raw
1 /*
2 * (C) Copyright 2013 ECMWF.
3 *
4 * This software is licensed under the terms of the Apache Licence Version 2.0
5 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 * In applying this licence, ECMWF does not waive the privileges and immunities
7 * granted to it by virtue of its status as an intergovernmental organisation
8 * nor does it submit to any jurisdiction.
9 */
10
11 #pragma once
12
13 #include "eckit/geometry/SphereT.h"
14 #include "eckit/geometry/UnitSphere.h"
15
16 //------------------------------------------------------------------------------------------------------
17
18 namespace atlas {
19 namespace util {
20
21 //------------------------------------------------------------------------------------------------------
22
23 struct DatumIFS {
24 static constexpr double radius() { return 6371229.; }
25 };
26
27 struct DatumGRIB1 {
28 static constexpr double radius() { return 6367470.; }
29 };
30
31 struct DatumWGS84SemiMajorAxis {
32 static constexpr double radius() { return 6378137.; }
33 };
34
35 //------------------------------------------------------------------------------------------------------
36
37 typedef eckit::geometry::SphereT<DatumIFS> Earth;
38
39 //------------------------------------------------------------------------------------------------------
40
41 } // namespace util
42 } // namespace atlas