Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:46

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
0004 
0005 // This file was modified by Oracle on 2015-2017.
0006 // Modifications copyright (c) 2015-2017 Oracle and/or its affiliates.
0007 
0008 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0009 
0010 // Use, modification and distribution is subject to the Boost Software License,
0011 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0012 // http://www.boost.org/LICENSE_1_0.txt)
0013 
0014 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_THOMAS_HPP
0015 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_THOMAS_HPP
0016 
0017 
0018 #include <boost/geometry/strategies/geographic/distance.hpp>
0019 #include <boost/geometry/strategies/geographic/parameters.hpp>
0020 
0021 
0022 namespace boost { namespace geometry
0023 {
0024 
0025 namespace strategy { namespace distance
0026 {
0027 
0028 /*!
0029 \brief The solution of the inverse problem of geodesics on latlong coordinates,
0030        Forsyth-Andoyer-Lambert type approximation with second order terms.
0031 \ingroup distance
0032 \tparam Spheroid The reference spheroid model
0033 \tparam CalculationType \tparam_calculation
0034 \author See
0035     - Technical Report: PAUL D. THOMAS, MATHEMATICAL MODELS FOR NAVIGATION SYSTEMS, 1965
0036       http://www.dtic.mil/docs/citations/AD0627893
0037     - Technical Report: PAUL D. THOMAS, SPHEROIDAL GEODESICS, REFERENCE SYSTEMS, AND LOCAL GEOMETRY, 1970
0038       http://www.dtic.mil/docs/citations/AD703541
0039 */
0040 template
0041 <
0042     typename Spheroid = srs::spheroid<double>,
0043     typename CalculationType = void
0044 >
0045 class thomas
0046     : public strategy::distance::geographic
0047         <
0048             strategy::thomas, Spheroid, CalculationType
0049         >
0050 {
0051     typedef strategy::distance::geographic
0052         <
0053             strategy::thomas, Spheroid, CalculationType
0054         > base_type;
0055 
0056 public :
0057     inline thomas()
0058         : base_type()
0059     {}
0060 
0061     explicit inline thomas(Spheroid const& spheroid)
0062         : base_type(spheroid)
0063     {}
0064 };
0065 
0066 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
0067 namespace services
0068 {
0069 
0070 template <typename Spheroid, typename CalculationType>
0071 struct tag<thomas<Spheroid, CalculationType> >
0072 {
0073     typedef strategy_tag_distance_point_point type;
0074 };
0075 
0076 
0077 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
0078 struct return_type<thomas<Spheroid, CalculationType>, P1, P2>
0079     : thomas<Spheroid, CalculationType>::template calculation_type<P1, P2>
0080 {};
0081 
0082 
0083 template <typename Spheroid, typename CalculationType>
0084 struct comparable_type<thomas<Spheroid, CalculationType> >
0085 {
0086     typedef thomas<Spheroid, CalculationType> type;
0087 };
0088 
0089 
0090 template <typename Spheroid, typename CalculationType>
0091 struct get_comparable<thomas<Spheroid, CalculationType> >
0092 {
0093     static inline thomas<Spheroid, CalculationType> apply(thomas<Spheroid, CalculationType> const& input)
0094     {
0095         return input;
0096     }
0097 };
0098 
0099 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
0100 struct result_from_distance<thomas<Spheroid, CalculationType>, P1, P2 >
0101 {
0102     template <typename T>
0103     static inline typename return_type<thomas<Spheroid, CalculationType>, P1, P2>::type
0104         apply(thomas<Spheroid, CalculationType> const& , T const& value)
0105     {
0106         return value;
0107     }
0108 };
0109 
0110 
0111 } // namespace services
0112 #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
0113 
0114 
0115 }} // namespace strategy::distance
0116 
0117 
0118 }} // namespace boost::geometry
0119 
0120 
0121 #endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_THOMAS_HPP