// // 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_