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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/**
*
* @file FLoc_EllipsoidModel.h
* @brief This is the header file for the _EllipsoidModel class.
*
* This header file contains declaration of the _EllipsoidModel class.
*/
#ifndef _FLOC_INTERNAL_ELLIPSOID_MODEL_H_
#define _FLOC_INTERNAL_ELLIPSOID_MODEL_H_
namespace Tizen { namespace Locations
{
/**
* @class _EllipsoidModel
* @since 2.0
* This class provides fundamental geodetic constants and operations according to the WGS84 datum.
*
* References:
* @li R.E. Deakin and M.N. Hunter, (2009) 'Geodesics on an ellipsoid - Bessel's method'
* @li T.Vincenty, 'Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations'
*/
class _EllipsoidModel
{
public:
static const double SEMI_MAJOR_AXIS;
static const double SEMI_MINOR_AXIS;
static const double FLATTENING;
static const double EARTH_RADIUS;
public:
/**
* Calculates the geodesic distance between the cooridnates P1(lat1, lon1) and P2(lat2, lon2).
*
* @since 2.0
*/
static float GetDistance(double lat1, double lon1, double lat2, double lon2);
/**
* Calculates the forward azimuth of the cooridnates P1(lat1, lon1) and P2(lat2, lon2).
*
* @since 2.0
*/
static float GetAzimuth(double lat1, double lon1, double lat2, double lon2);
private:
enum ResultType
{
RT_DISTANCE,
RT_FORWARD_AZIMUTH
};
_EllipsoidModel(void);
static float SolveInverseProblem(double lat1, double lon1, double lat2, double lon2, ResultType type);
}; // class _EllipsoidModel
} } // Tizen::Locations
#endif // _FLOC_INTERNAL_ELLIPSOID_MODEL_H_
|