olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
EarthConstants.h
1/*
2 * Copyright (C) 2019 HERE Europe B.V.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 * License-Filename: LICENSE
18 */
19
20#pragma once
21
22#include <olp/core/CoreApi.h>
23
24namespace olp {
25namespace geo {
29class CORE_API EarthConstants {
30 public:
39 static double EquatorialRadius();
49 static double PolarRadius();
59 static double EquatorialCircumference();
60
69 static double MinimumElevation();
70
79 static double MaximumElevation();
80};
81
82inline double EarthConstants::EquatorialRadius() { return 6378137.0; }
83
84inline double EarthConstants::PolarRadius() { return 6356752.3142; }
85
87 // 2.0 * equatorialRadius() * math::pi<double>()
88 return 40075016.6855784861531768177614;
89}
90
91inline double EarthConstants::MinimumElevation() { return -418; }
92
93inline double EarthConstants::MaximumElevation() { return 8848; }
94
95} // namespace geo
96} // namespace olp
Represents WGS84 Earth's constants.
Definition EarthConstants.h:29
static double EquatorialCircumference()
Gets the Earth's circumference, which is the distance around the Earth equator.
Definition EarthConstants.h:86
static double EquatorialRadius()
Gets the Earth's equatorial radius, which is the distance from its center to the equator.
Definition EarthConstants.h:82
static double MaximumElevation()
Gets the highest natural dry-land elevation.
Definition EarthConstants.h:93
static double MinimumElevation()
Gets the lowest natural dry-land elevation.
Definition EarthConstants.h:91
static double PolarRadius()
Gets the Earth's polar radius, which is the distance from its center to the North and South Poles.
Definition EarthConstants.h:84
Rules all the other namespaces.
Definition AppleSignInProperties.h:24