diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/boost/libs/geometry/test/formulas | |
parent | Initial commit. (diff) | |
download | ceph-upstream.tar.xz ceph-upstream.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/geometry/test/formulas')
17 files changed, 4000 insertions, 0 deletions
diff --git a/src/boost/libs/geometry/test/formulas/Jamfile.v2 b/src/boost/libs/geometry/test/formulas/Jamfile.v2 new file mode 100644 index 00000000..28ca8719 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/Jamfile.v2 @@ -0,0 +1,21 @@ +# Boost.Geometry +# +# Copyright (c) 2016-2019, Oracle and/or its affiliates. +# +# Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle +# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle +# +# Use, modification and distribution is subject to the Boost Software License, +# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +test-suite boost-geometry-formulas + : + [ run inverse.cpp : : : : formulas_inverse ] + [ run inverse_karney.cpp : : : : formulas_inverse_karney ] + [ run direct.cpp : : : : formulas_direct ] + [ run direct_accuracy.cpp : : : : formulas_direct_accuracy ] + [ run direct_meridian.cpp : : : : formulas_direct_meridian ] + [ run intersection.cpp : : : : formulas_intersection ] + [ run vertex_longitude.cpp : : : : formulas_vertex_longitude ] + ; diff --git a/src/boost/libs/geometry/test/formulas/direct.cpp b/src/boost/libs/geometry/test/formulas/direct.cpp new file mode 100644 index 00000000..97fb170f --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/direct.cpp @@ -0,0 +1,176 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2016-2018 Oracle and/or its affiliates. + +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle +// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "test_formula.hpp" +#include "direct_cases.hpp" +#include "direct_cases_antipodal.hpp" + +#include <boost/geometry/formulas/vincenty_direct.hpp> +#include <boost/geometry/formulas/thomas_direct.hpp> +#include <boost/geometry/formulas/karney_direct.hpp> +//#include <boost/geometry/formulas/series_expansion_direct.hpp> +#include <boost/geometry/formulas/spherical.hpp> + +#include <boost/geometry/srs/srs.hpp> + +#ifdef BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB +#include <GeographicLib/Geodesic.hpp> +#include <GeographicLib/Constants.hpp> +#endif // BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB + +inline void symmetrize_wrt_origin(expected_result & r) +{ + r.lon2 = -r.lon2; + r.lat2 = -r.lat2; + r.reduced_length = -r.reduced_length; +} + +inline expected_results symmetric_wrt_origin(expected_results r) +{ + r.distance = -r.distance; + symmetrize_wrt_origin(r.karney); + symmetrize_wrt_origin(r.series); + symmetrize_wrt_origin(r.spherical); + symmetrize_wrt_origin(r.thomas); + symmetrize_wrt_origin(r.thomas1st); + symmetrize_wrt_origin(r.vincenty); + return r; +} + +template <typename Result> +void check_direct(Result const& result, expected_result const& expected, expected_result const& reference, + double reference_error, bool check_reference_only = false) +{ + check_direct_sph(result, expected, reference, reference_error, check_reference_only); + check_one(result.reduced_length, expected.reduced_length, reference.reduced_length, reference_error); + check_one(result.geodesic_scale, expected.geodesic_scale, reference.geodesic_scale, reference_error); +} + +template <typename Result> +void check_direct_sph(Result const& result, expected_result const& expected, expected_result const& reference, + double reference_error, bool check_reference_only = false) +{ + check_one(result.lon2, expected.lon2, reference.lon2, reference_error, true, check_reference_only); + check_one(result.lat2, expected.lat2, reference.lat2, reference_error, true, check_reference_only); + check_one(result.reverse_azimuth, expected.reverse_azimuth, reference.reverse_azimuth, reference_error, true, check_reference_only); +} + +void test_all(expected_results const& results) +{ + double const d2r = bg::math::d2r<double>(); + double const r2d = bg::math::r2d<double>(); + + double lon1r = results.p1.lon * d2r; + double lat1r = results.p1.lat * d2r; + double distance = results.distance; + double azi12r = results.azimuth12 * d2r; + + double lon1d = results.p1.lon; + double lat1d = results.p1.lat; + double azi12d = results.azimuth12; + + // WGS84 + bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793); + bg::srs::sphere<double> const sphere; + + bg::formula::result_direct<double> result; + + typedef bg::formula::vincenty_direct<double, true, true, true, true> vi_t; + result = vi_t::apply(lon1r, lat1r, distance, azi12r, spheroid); + result.lon2 *= r2d; + result.lat2 *= r2d; + result.reverse_azimuth *= r2d; + check_direct(result, results.vincenty, results.karney, 0.00000001); + + typedef bg::formula::thomas_direct<double, true, true, true, true, true> th_t; + result = th_t::apply(lon1r, lat1r, distance, azi12r, spheroid); + result.lon2 *= r2d; + result.lat2 *= r2d; + result.reverse_azimuth *= r2d; + check_direct(result, results.thomas, results.karney, 0.0000001); + + typedef bg::formula::thomas_direct<double, false, true, true, true, true> th_t1st; + result = th_t1st::apply(lon1r, lat1r, distance, azi12r, spheroid); + result.lon2 *= r2d; + result.lat2 *= r2d; + result.reverse_azimuth *= r2d; + check_direct(result, results.thomas1st, results.karney, 0.0000001); +/* + typedef bg::formula::series_expansion_direct<double, true, true, true, true, 4> series; + result = series::apply(lon1r, lat1r, distance, azi12r, spheroid); + result.lon2 *= r2d; + result.lat2 *= r2d; + result.reverse_azimuth *= r2d; + check_direct(result, results.series, results.karney, 0.0000001); +*/ + result = bg::formula::spherical_direct<true, true>(lon1r, lat1r, distance, + azi12r, sphere); + result.lon2 *= r2d; + result.lat2 *= r2d; + result.reverse_azimuth *= r2d; + check_direct_sph(result, results.spherical, results.karney, 0.1); + + typedef bg::formula::karney_direct<double, true, true, true, true, 2> ka_t; + result = ka_t::apply(lon1d, lat1d, distance, azi12d, spheroid); + check_direct(result, results.karney, results.karney, 0.0000001); + +#ifdef BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB + { + using namespace GeographicLib; + Geodesic geod(Constants::WGS84_a(), Constants::WGS84_f()); + double foo = 0; + geod.Direct(lat1d, lon1d, azi12d, distance, + result.lat2, result.lon2, result.reverse_azimuth, + result.reduced_length, result.geodesic_scale, foo); + boost::ignore_unused(foo); + check_direct(result, results.karney, results.karney, 0.0000001); + } +#endif +} + +void test_karney_antipodal(expected_results_antipodal const& results) +{ + double lon1d = results.p1.lon; + double lat1d = results.p1.lat; + double distance = results.distance; + double azi12d = results.azimuth12; + + // WGS84 + bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793); + + bg::formula::result_direct<double> result; + + typedef bg::formula::karney_direct<double, true, true, true, true, 8> ka_t; + result = ka_t::apply(lon1d, lat1d, distance, azi12d, spheroid); + check_direct(result, results.karney, results.karney, 0.0000001, true); +} + +int test_main(int, char*[]) +{ + for (size_t i = 0; i < expected_size; ++i) + { + test_all(expected[i]); + + if (expected[i].p1.lon == 0 && expected[i].p1.lat == 0) + { + test_all(symmetric_wrt_origin(expected[i])); + } + } + + for (size_t i = 0; i < expected_size_antipodal; ++i) + { + test_karney_antipodal(expected_antipodal[i]); + } + + return 0; +} diff --git a/src/boost/libs/geometry/test/formulas/direct_accuracy.cpp b/src/boost/libs/geometry/test/formulas/direct_accuracy.cpp new file mode 100644 index 00000000..e485caaf --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/direct_accuracy.cpp @@ -0,0 +1,97 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2019 Oracle and/or its affiliates. + +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include <geometry_test_common.hpp> + +#include <boost/geometry/formulas/karney_direct.hpp> +#include <boost/geometry/srs/srs.hpp> + +#ifdef BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB +#include <GeographicLib/Geodesic.hpp> +#include <GeographicLib/Constants.hpp> +#endif // BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB + +int test_main(int, char*[]) +{ + +#ifdef BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB + // accuracy test from https://github.com/boostorg/geometry/issues/560 + using namespace GeographicLib; + + const long double wgs84_a = 6378137.0L; + const long double wgs84_f = 1.0L / 298.257223563L; + const long double one_minus_f = 1.0L - wgs84_f; + const long double wgs84_b = wgs84_a * one_minus_f; + + const boost::geometry::srs::spheroid<long double> BoostWGS84(wgs84_a, wgs84_b); + + // boost karney_direct function class with azimuth output and SeriesOrder = 6 + typedef boost::geometry::formula::karney_direct <double, true, true, false, false, 6u> + BoostKarneyDirect_6; + + // boost karney_direct function class with azimuth output and SeriesOrder = 8 + typedef boost::geometry::formula::karney_direct <double, true, true, false, false, 8u> + BoostKarneyDirect_8; + + // boost test BOOST_CHECK_CLOSE macro takes a percentage accuracy parameter + const double EPSILON = std::numeric_limits<double>::epsilon(); + const double CALCULATION_TOLERANCE = 100 * EPSILON; + + const Geodesic GeographicLibWGS84(Geodesic::WGS84()); + + // Loop around latitudes: 0 to 89 degrees + for (int i=0; i < 90; ++i) + { + // The latitude in degrees. + double latitude(1.0 * i); + + // Loop around longitudes: 1 to 179 degrees + for (int j=1; j < 180; ++j) + { + // The longitude in degrees. + double longitude(1.0 * j); + + // The Geodesic: distance in metres, start azimuth and finish azimuth in degrees. + double distance_m, azimuth, azi2; + GeographicLibWGS84.Inverse(0.0, 0.0, latitude, longitude, distance_m, azimuth, azi2); + + // The GeographicLib position and azimuth at the distance in metres + double lat2k, lon2k, azi2k; + GeographicLibWGS84.Direct(0.0, 0.0, azimuth, distance_m, lat2k, lon2k, azi2k); + BOOST_CHECK_CLOSE(latitude, lat2k, 140 * CALCULATION_TOLERANCE); + BOOST_CHECK_CLOSE(longitude, lon2k, 120 * CALCULATION_TOLERANCE); + + // The boost karney_direct order 6 position at the azimuth and distance in metres. + boost::geometry::formula::result_direct<double> results_6 + = BoostKarneyDirect_6::apply(0.0, 0.0, distance_m, azimuth, BoostWGS84); + BOOST_CHECK_CLOSE(azi2, results_6.reverse_azimuth, 140 * CALCULATION_TOLERANCE); + BOOST_CHECK_CLOSE(latitude, results_6.lat2, 220 * CALCULATION_TOLERANCE); + + /******** Test below only passes with >= 10172000 * CALCULATION_TOLERANCE !! ********/ + BOOST_CHECK_CLOSE(longitude, results_6.lon2, 10171000 * CALCULATION_TOLERANCE); + /*****************************************************************************/ + + // The boost karney_direct order 8 position at the azimuth and distance in metres. + boost::geometry::formula::result_direct<double> results_8 + = BoostKarneyDirect_8::apply(0.0, 0.0, distance_m, azimuth, BoostWGS84); + BOOST_CHECK_CLOSE(azi2, results_8.reverse_azimuth, 140 * CALCULATION_TOLERANCE); + BOOST_CHECK_CLOSE(latitude, results_8.lat2, 220 * CALCULATION_TOLERANCE); + + /******** Test below only passes with >= 10174000 * CALCULATION_TOLERANCE !! ********/ + BOOST_CHECK_CLOSE(longitude, results_8.lon2, 10173000 * CALCULATION_TOLERANCE); + /*****************************************************************************/ + } + } +#endif // BOOST_GEOEMTRY_TEST_WITH_GEOGRAPHICLIB + + return 0; +} + diff --git a/src/boost/libs/geometry/test/formulas/direct_cases.hpp b/src/boost/libs/geometry/test/formulas/direct_cases.hpp new file mode 100644 index 00000000..1ac436e6 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/direct_cases.hpp @@ -0,0 +1,700 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2016-2018 Oracle and/or its affiliates. + +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_DIRECT_CASES_HPP +#define BOOST_GEOMETRY_TEST_DIRECT_CASES_HPP + +struct coordinates +{ + double lon; + double lat; +}; + +struct expected_result +{ + double lon2; + double lat2; + double reverse_azimuth; + double reduced_length; + double geodesic_scale; +}; + +struct expected_results +{ + coordinates p1; + double distance; + double azimuth12; + expected_result karney; + expected_result vincenty; + expected_result thomas; + expected_result thomas1st; + expected_result series; + expected_result spherical; +}; + +expected_results expected[] = +{ + + { + { 0, 0 }, 250000, 0, + { 0.00000000000000000000, 2.26091191238511868278, 0.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { 0.00000000000000000000, 2.26091191236402178077, 0.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { 0.00000000000000000000, 2.26091189386641744363, 0.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { 0.00000000000000000000, 2.26091190837723177154, 0.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { 0.00000000000000000000, 2.26091191238508226746, 0.00000000000000000000, 249935.55905602785060182214, 0.99922674639115527384 }, + { 0.00000000000000000000, 2.24830091939884413321, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 0 }, 250000, 45, + { 1.58842150169031337548, 1.59850419267109766785, 45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 }, + { 1.58842150168977558344, 1.59850419267017707092, 45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 }, + { 1.58842149958854261804, 1.59850419056543535667, 45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 }, + { 1.58842150075770360829, 1.59850419406187715943, 45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 }, + { 1.58842150169031270934, 1.59850419267109744581, 45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 }, + { 1.59019688120571478507, 1.58958477520588337129, 45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 0 }, 250000, 90, + { 2.24578821029880382198, 0.00000000000000000000, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 2.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 2.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 2.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 2.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 2.24830091939884413321, 0.00000000000000013763, 90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 0 }, 250000, 135, + { 1.58842150169031337548, -1.59850419267109766785, 134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 }, + { 1.58842150168977580549, -1.59850419267017707092, 134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 }, + { 1.58842149958854261804, -1.59850419056543602281, 134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 }, + { 1.58842150075770360829, -1.59850419406187760352, 134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 }, + { 1.58842150169033402562, -1.59850419267108945220, 134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 }, + { 1.59019688120571345280, -1.58958477520588448151, 134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 0 }, 250000, 180, + { 0.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { 0.00000000000000027517, -2.26091191236402178077, 180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { 0.00000000000000000000, -2.26091189386641744363, 180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { 0.00000000000000000000, -2.26091190837723177154, 180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { 0.00000000000000000000, -2.26091191238511468597, 180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 }, + { 0.00000000000000000000, -2.24830091939884635366, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 0 }, 250000, -45, + { -1.58842150169031337548, 1.59850419267109766785, -45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 }, + { -1.58842150168977558344, 1.59850419267017707092, -45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 }, + { -1.58842149958854261804, 1.59850419056543535667, -45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 }, + { -1.58842150075770360829, 1.59850419406187715943, -45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 }, + { -1.58842150169031270934, 1.59850419267109744581, -45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 }, + { -1.59019688120571478507, 1.58958477520588337129, -45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 0 }, 250000, -90, + { -2.24578821029880382198, 0.00000000000000000000, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -2.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -2.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -2.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -2.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -2.24830091939884413321, 0.00000000000000013763, -90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 0 }, 250000, -135, + { -1.58842150169031337548, -1.59850419267109766785, -134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 }, + { -1.58842150168977580549, -1.59850419267017707092, -134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 }, + { -1.58842149958854261804, -1.59850419056543602281, -134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 }, + { -1.58842150075770360829, -1.59850419406187760352, -134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 }, + { -1.58842150169033402562, -1.59850419267108945220, -134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 }, + { -1.59019688120571345280, -1.58958477520588448151, -134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 0 }, 250000, -180, + { 0.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { -0.00000000000000027517, -2.26091191236402178077, -180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { 0.00000000000000000000, -2.26091189386641744363, -180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { 0.00000000000000000000, -2.26091190837723177154, -180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { 0.00000000000000000000, -2.26091191238511468597, -180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 }, + { 0.00000000000000000000, -2.24830091939884635366, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, 0, + { -1.00000000000000000000, 2.26091191238511868278, 0.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { -1.00000000000000000000, 2.26091191236402178077, 0.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { -1.00000000000000000000, 2.26091189386641744363, 0.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { -1.00000000000000000000, 2.26091190837723177154, 0.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { -1.00000000000000000000, 2.26091191238508226746, 0.00000000000000000000, 249935.55905602785060182214, 0.99922674639115527384 }, + { -1.00000000000000000000, 2.24830091939884413321, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, 45, + { 0.58842150169031337548, 1.59850419267109766785, 45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 }, + { 0.58842150168977558344, 1.59850419267017707092, 45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 }, + { 0.58842149958854272906, 1.59850419056543535667, 45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 }, + { 0.58842150075770371931, 1.59850419406187715943, 45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 }, + { 0.58842150169031270934, 1.59850419267109744581, 45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 }, + { 0.59019688120571467405, 1.58958477520588337129, 45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, 90, + { 1.24578821029880382198, 0.00000000000000000000, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 1.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 1.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 1.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 1.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 1.24830091939884435526, 0.00000000000000013763, 90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, 135, + { 0.58842150169031337548, -1.59850419267109766785, 134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 }, + { 0.58842150168977569447, -1.59850419267017707092, 134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 }, + { 0.58842149958854272906, -1.59850419056543602281, 134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 }, + { 0.58842150075770371931, -1.59850419406187760352, 134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 }, + { 0.58842150169033402562, -1.59850419267108945220, 134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 }, + { 0.59019688120571345280, -1.58958477520588448151, 134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, 180, + { -1.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { -0.99999999999999977796, -2.26091191236402178077, 180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { -1.00000000000000000000, -2.26091189386641744363, 180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { -1.00000000000000000000, -2.26091190837723177154, 180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { -1.00000000000000000000, -2.26091191238511468597, 180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 }, + { -1.00000000000000000000, -2.24830091939884635366, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, -45, + { -2.58842150169031359752, 1.59850419267109766785, -45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 }, + { -2.58842150168977536140, 1.59850419267017707092, -45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 }, + { -2.58842149958854284009, 1.59850419056543535667, -45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 }, + { -2.58842150075770360829, 1.59850419406187715943, -45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 }, + { -2.58842150169031270934, 1.59850419267109744581, -45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 }, + { -2.59019688120571478507, 1.58958477520588337129, -45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, -90, + { -3.24578821029880382198, 0.00000000000000000000, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -3.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 }, + { -3.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 }, + { -3.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 }, + { -3.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 }, + { -3.24830091939884457730, 0.00000000000000013763, -90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, -135, + { -2.58842150169031359752, -1.59850419267109766785, -134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 }, + { -2.58842150168977580549, -1.59850419267017707092, -134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 }, + { -2.58842149958854284009, -1.59850419056543602281, -134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 }, + { -2.58842150075770360829, -1.59850419406187760352, -134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 }, + { -2.58842150169027718221, -1.59850419267108945220, -134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 }, + { -2.59019688120571345280, -1.58958477520588448151, -134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 0 }, 250000, -180, + { -1.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { -1.00000000000000022204, -2.26091191236402178077, -180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { -1.00000000000000000000, -2.26091189386641744363, -180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { -1.00000000000000000000, -2.26091190837723177154, -180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { -1.00000000000000000000, -2.26091191238511468597, -180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 }, + { -1.00000000000000000000, -2.24830091939884635366, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, 0, + { 1.00000000000000000000, 2.26091191238511868278, 0.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { 1.00000000000000000000, 2.26091191236402178077, 0.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { 1.00000000000000000000, 2.26091189386641744363, 0.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { 1.00000000000000000000, 2.26091190837723177154, 0.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { 1.00000000000000000000, 2.26091191238508226746, 0.00000000000000000000, 249935.55905602785060182214, 0.99922674639115527384 }, + { 1.00000000000000000000, 2.24830091939884413321, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, 45, + { 2.58842150169031359752, 1.59850419267109766785, 45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 }, + { 2.58842150168977536140, 1.59850419267017707092, 45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 }, + { 2.58842149958854284009, 1.59850419056543535667, 45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 }, + { 2.58842150075770360829, 1.59850419406187715943, 45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 }, + { 2.58842150169031270934, 1.59850419267109744581, 45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 }, + { 2.59019688120571478507, 1.58958477520588337129, 45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, 90, + { 3.24578821029880382198, 0.00000000000000000000, 90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { 3.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 }, + { 3.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 }, + { 3.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 }, + { 3.24578821029880382198, 0.00000000000000013841, 90.00000000000000000000, 249935.55865304192411713302, 0.99922674370552955203 }, + { 3.24830091939884457730, 0.00000000000000013763, 90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, 135, + { 2.58842150169031359752, -1.59850419267109766785, 134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 }, + { 2.58842150168977580549, -1.59850419267017707092, 134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 }, + { 2.58842149958854284009, -1.59850419056543602281, 134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 }, + { 2.58842150075770360829, -1.59850419406187760352, 134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 }, + { 2.58842150169027718221, -1.59850419267108945220, 134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 }, + { 2.59019688120571345280, -1.58958477520588448151, 134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, 180, + { 1.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { 1.00000000000000022204, -2.26091191236402178077, 180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { 1.00000000000000000000, -2.26091189386641744363, 180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { 1.00000000000000000000, -2.26091190837723177154, 180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { 1.00000000000000000000, -2.26091191238511468597, 180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 }, + { 1.00000000000000000000, -2.24830091939884635366, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, -45, + { -0.58842150169031337548, 1.59850419267109766785, -45.02216068943542381930, 249935.55885449703782796860, 0.99922674504834751996 }, + { -0.58842150168977558344, 1.59850419267017707092, -45.02216068943540250302, 249935.55886070139240473509, 0.99922674504834840814 }, + { -0.58842149958854272906, 1.59850419056543535667, -45.02216068937701010100, 249935.55853169565671123564, 0.99922674505038500126 }, + { -0.58842150075770371931, 1.59850419406187715943, -45.02216068947401339528, 249935.55908163820276968181, 0.99922674504700181863 }, + { -0.58842150169031270934, 1.59850419267109744581, -45.02216068943543092473, 249935.55885453775408677757, 0.99922674504834751996 }, + { -0.59019688120571467405, 1.58958477520588337129, -45.02206163500609648054, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, -90, + { -1.24578821029880382198, 0.00000000000000000000, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -1.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -1.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -1.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -1.24578821029880382198, 0.00000000000000013841, -90.00000000000000000000, 249935.55865304186590947211, 0.99922674370552955203 }, + { -1.24830091939884435526, 0.00000000000000013763, -90.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, -135, + { -0.58842150169031337548, -1.59850419267109766785, -134.97783931056457618070, 249935.55885449703782796860, 0.99922674504834751996 }, + { -0.58842150168977569447, -1.59850419267017707092, -134.97783931056460460240, 249935.55886070139240473509, 0.99922674504834840814 }, + { -0.58842149958854272906, -1.59850419056543602281, -134.97783931062298279357, 249935.55853169583133421838, 0.99922674505038500126 }, + { -0.58842150075770371931, -1.59850419406187760352, -134.97783931052597949929, 249935.55908163831918500364, 0.99922674504700181863 }, + { -0.58842150169033402562, -1.59850419267108945220, -134.97783931056457618070, 249935.55885453653172589839, 0.99922674504834751996 }, + { -0.59019688120571345280, -1.58958477520588448151, -134.97793836499391773032, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 0 }, 250000, -180, + { 1.00000000000000000000, -2.26091191238511868278, -180.00000000000000000000, 249935.55905595037620514631, 0.99922674639115516282 }, + { 0.99999999999999977796, -2.26091191236402178077, -180.00000000000000000000, 249935.55905951990280300379, 0.99922674639116959572 }, + { 1.00000000000000000000, -2.26091189386641744363, -180.00000000000000000000, 249935.55701571033569052815, 0.99922674640382092015 }, + { 1.00000000000000000000, -2.26091190837723177154, -180.00000000000000000000, 249935.55863258230965584517, 0.99922674639389641449 }, + { 1.00000000000000000000, -2.26091191238511468597, -180.00000000000000000000, 249935.55905603148858062923, 0.99922674639115527384 }, + { 1.00000000000000000000, -2.24830091939884635366, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, 0, + { 0.00000000000000000000, 1.26092062918498104551, 0.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { 0.00000000000000000000, 1.26092062916373448545, 0.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { 0.00000000000000000000, 1.26092061053506587776, 0.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { 0.00000000000000000000, 1.26092062023552875516, 0.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { 0.00000000000000000000, 1.26092062918495995127, 0.00000000000000000000, 249935.55872469596215523779, 0.99922674479230122468 }, + { 0.00000000000000000000, 1.24830091939884435526, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, 45, + { 1.58789352027561725400, 0.59889382252477618707, 44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 }, + { 1.58789352027508279264, 0.59889382252384637528, 44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 }, + { 1.58789351816042789700, 0.59889382039736038799, 44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 }, + { 1.58789351933467837164, 0.59889382227058296504, 44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 }, + { 1.58789352027561680991, 0.59889382252477563195, 44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 }, + { 1.58966906957485254459, 0.58996975014221642031, 44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, 90, + { 2.24612766651409989649, -0.99922666842209439952, 89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 }, + { 2.24612766651347328661, -0.99922666842209439952, 89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 }, + { 2.24612766651409945240, -0.99922666842208529570, 89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 }, + { 2.24612766651409812013, -0.99922666841944873806, 89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 }, + { 2.24612766651407858021, -0.99922666842209184601, 89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 }, + { 2.24864304714222296155, -0.99923012194947846698, 89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, 135, + { 1.58943065821228057821, -2.59810442478829362045, 134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 }, + { 1.58943065821171258811, -2.59810442478739078709, 134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 }, + { 1.58943065613921019619, -2.59810442273856878614, 134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 }, + { 1.58943065729835319999, -2.59810443328209572655, 134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 }, + { 1.58943065821226814371, -2.59810442478831138402, 134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 }, + { 1.59120965314639395416, -2.58919942720575324557, 134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, 180, + { 0.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { 0.00000000000000027540, -3.26088938009322193423, 180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { 0.00000000000000000000, -3.26088936183515265554, 180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { 0.00000000000000000000, -3.26088938879229361945, 180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { 0.00000000000000000000, -3.26088938011400975014, 180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 }, + { 0.00000000000000000000, -3.24830091939884901819, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, -45, + { -1.58789352027561725400, 0.59889382252477618707, -44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 }, + { -1.58789352027508279264, 0.59889382252384637528, -44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 }, + { -1.58789351816042789700, 0.59889382039736038799, -44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 }, + { -1.58789351933467837164, 0.59889382227058296504, -44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 }, + { -1.58789352027561680991, 0.59889382252477563195, -44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 }, + { -1.58966906957485254459, 0.58996975014221642031, -44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, -90, + { -2.24612766651409989649, -0.99922666842209439952, -89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 }, + { -2.24612766651347328661, -0.99922666842209439952, -89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 }, + { -2.24612766651409945240, -0.99922666842208529570, -89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 }, + { -2.24612766651409812013, -0.99922666841944873806, -89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 }, + { -2.24612766651407858021, -0.99922666842209184601, -89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 }, + { -2.24864304714222296155, -0.99923012194947846698, -89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, -135, + { -1.58943065821228057821, -2.59810442478829362045, -134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 }, + { -1.58943065821171258811, -2.59810442478739078709, -134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 }, + { -1.58943065613921019619, -2.59810442273856878614, -134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 }, + { -1.58943065729835319999, -2.59810443328209572655, -134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 }, + { -1.58943065821226814371, -2.59810442478831138402, -134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 }, + { -1.59120965314639395416, -2.58919942720575324557, -134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, -1 }, 250000, -180, + { 0.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { -0.00000000000000027540, -3.26088938009322193423, -180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { 0.00000000000000000000, -3.26088936183515265554, -180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { 0.00000000000000000000, -3.26088938879229361945, -180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { 0.00000000000000000000, -3.26088938011400975014, -180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 }, + { 0.00000000000000000000, -3.24830091939884901819, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, 0, + { 0.00000000000000000000, 3.26088938011404927408, 0.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { 0.00000000000000000000, 3.26088938009322193423, 0.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { 0.00000000000000000000, 3.26088936183515265554, 0.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { 0.00000000000000000000, 3.26088938879229361945, 0.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { 0.00000000000000000000, 3.26088938011400220063, 0.00000000000000000000, 249935.55991249639191664755, 0.99922675429255336521 }, + { 0.00000000000000000000, 3.24830091939884457730, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, 45, + { 1.58943065821228057821, 2.59810442478829362045, 45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 }, + { 1.58943065821171236607, 2.59810442478739123118, 45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 }, + { 1.58943065613921019619, 2.59810442273856923023, 45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 }, + { 1.58943065729835319999, 2.59810443328209572655, 45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 }, + { 1.58943065821227924594, 2.59810442478829228818, 45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 }, + { 1.59120965314638773691, 2.58919942720574303152, 45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, 90, + { 2.24612766651409989649, 0.99922666842209439952, 90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 }, + { 2.24612766651347328661, 0.99922666842209484361, 90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 }, + { 2.24612766651409945240, 0.99922666842208562876, 90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 }, + { 2.24612766651409812013, 0.99922666841944918215, 90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 }, + { 2.24612766651412920638, 0.99922666842209206806, 90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 }, + { 2.24864304714222296155, 0.99923012194947880005, 90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, 135, + { 1.58789352027561725400, -0.59889382252477618707, 135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 }, + { 1.58789352027508301468, -0.59889382252384604222, 135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 }, + { 1.58789351816042789700, -0.59889382039736038799, 135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 }, + { 1.58789351933467837164, -0.59889382227058296504, 135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 }, + { 1.58789352027559971248, -0.59889382252475087398, 135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 }, + { 1.58966906957488163243, -0.58996975014221753053, 135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, 180, + { 0.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { 0.00000000000000027502, -1.26092062916373448545, 180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { 0.00000000000000000000, -1.26092061053506587776, 180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { 0.00000000000000000000, -1.26092062023552875516, 180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { 0.00000000000000000000, -1.26092062918495328994, 180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 }, + { 0.00000000000000000000, -1.24830091939885789998, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, -45, + { -1.58943065821228057821, 2.59810442478829362045, -45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 }, + { -1.58943065821171236607, 2.59810442478739123118, -45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 }, + { -1.58943065613921019619, 2.59810442273856923023, -45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 }, + { -1.58943065729835319999, 2.59810443328209572655, -45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 }, + { -1.58943065821227924594, 2.59810442478829228818, -45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 }, + { -1.59120965314638773691, 2.58919942720574303152, -45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, -90, + { -2.24612766651409989649, 0.99922666842209439952, -90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 }, + { -2.24612766651347328661, 0.99922666842209484361, -90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 }, + { -2.24612766651409945240, 0.99922666842208562876, -90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 }, + { -2.24612766651409812013, 0.99922666841944918215, -90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 }, + { -2.24612766651412920638, 0.99922666842209206806, -90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 }, + { -2.24864304714222296155, 0.99923012194947880005, -90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, -135, + { -1.58789352027561725400, -0.59889382252477618707, -135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 }, + { -1.58789352027508301468, -0.59889382252384604222, -135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 }, + { -1.58789351816042789700, -0.59889382039736038799, -135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 }, + { -1.58789351933467837164, -0.59889382227058296504, -135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 }, + { -1.58789352027559971248, -0.59889382252475087398, -135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 }, + { -1.58966906957488163243, -0.58996975014221753053, -135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 0, 1 }, 250000, -180, + { 0.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { -0.00000000000000027502, -1.26092062916373448545, -180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { 0.00000000000000000000, -1.26092061053506587776, -180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { 0.00000000000000000000, -1.26092062023552875516, -180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { 0.00000000000000000000, -1.26092062918495328994, -180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 }, + { 0.00000000000000000000, -1.24830091939885789998, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, 0, + { -1.00000000000000000000, 1.26092062918498104551, 0.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { -1.00000000000000000000, 1.26092062916373448545, 0.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { -1.00000000000000000000, 1.26092061053506587776, 0.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { -1.00000000000000000000, 1.26092062023552875516, 0.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { -1.00000000000000000000, 1.26092062918495995127, 0.00000000000000000000, 249935.55872469596215523779, 0.99922674479230122468 }, + { -1.00000000000000000000, 1.24830091939884435526, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, 45, + { 0.58789352027561725400, 0.59889382252477618707, 44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 }, + { 0.58789352027508279264, 0.59889382252384637528, 44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 }, + { 0.58789351816042800802, 0.59889382039736038799, 44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 }, + { 0.58789351933467837164, 0.59889382227058296504, 44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 }, + { 0.58789352027561669889, 0.59889382252477563195, 44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 }, + { 0.58966906957485232255, 0.58996975014221642031, 44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, 90, + { 1.24612766651409989649, -0.99922666842209439952, 89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 }, + { 1.24612766651347328661, -0.99922666842209439952, 89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 }, + { 1.24612766651409945240, -0.99922666842208529570, 89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 }, + { 1.24612766651409834218, -0.99922666841944873806, 89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 }, + { 1.24612766651407835816, -0.99922666842209184601, 89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 }, + { 1.24864304714222140724, -0.99923012194947846698, 89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, 135, + { 0.58943065821228057821, -2.59810442478829362045, 134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 }, + { 0.58943065821171258811, -2.59810442478739078709, 134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 }, + { 0.58943065613921030721, -2.59810442273856878614, 134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 }, + { 0.58943065729835331101, -2.59810443328209572655, 134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 }, + { 0.58943065821226814371, -2.59810442478831138402, 134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 }, + { 0.59120965314640527843, -2.58919942720575324557, 134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, 180, + { -1.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { -0.99999999999999977796, -3.26088938009322193423, 180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { -1.00000000000000000000, -3.26088936183515265554, 180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { -1.00000000000000000000, -3.26088938879229361945, 180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { -1.00000000000000000000, -3.26088938011400975014, 180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 }, + { -0.99999999999998867573, -3.24830091939884901819, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, -45, + { -2.58789352027561747605, 0.59889382252477618707, -44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 }, + { -2.58789352027508279264, 0.59889382252384637528, -44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 }, + { -2.58789351816042811905, 0.59889382039736038799, -44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 }, + { -2.58789351933467859368, 0.59889382227058296504, -44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 }, + { -2.58789352027561658787, 0.59889382252477563195, -44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 }, + { -2.58966906957485276664, 0.58996975014221642031, -44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, -90, + { -3.24612766651409989649, -0.99922666842209439952, -89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 }, + { -3.24612766651347328661, -0.99922666842209439952, -89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 }, + { -3.24612766651409989649, -0.99922666842208529570, -89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 }, + { -3.24612766651409812013, -0.99922666841944873806, -89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 }, + { -3.24612766651407813612, -0.99922666842209184601, -89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 }, + { -3.24864304714222429382, -0.99923012194947846698, -89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, -135, + { -2.58943065821228035617, -2.59810442478829362045, -134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 }, + { -2.58943065821171281016, -2.59810442478739078709, -134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 }, + { -2.58943065613921019619, -2.59810442273856878614, -134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 }, + { -2.58943065729835319999, -2.59810443328209572655, -134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 }, + { -2.58943065821226792167, -2.59810442478831138402, -134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 }, + { -2.59120965314638285193, -2.58919942720575324557, -134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, -1 }, 250000, -180, + { -1.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { -1.00000000000000022204, -3.26088938009322193423, -180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { -1.00000000000000000000, -3.26088936183515265554, -180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { -1.00000000000000000000, -3.26088938879229361945, -180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { -1.00000000000000000000, -3.26088938011400975014, -180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 }, + { -0.99999999999998867573, -3.24830091939884901819, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, 0, + { -1.00000000000000000000, 3.26088938011404927408, 0.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { -1.00000000000000000000, 3.26088938009322193423, 0.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { -1.00000000000000000000, 3.26088936183515265554, 0.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { -1.00000000000000000000, 3.26088938879229361945, 0.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { -1.00000000000000000000, 3.26088938011400220063, 0.00000000000000000000, 249935.55991249639191664755, 0.99922675429255336521 }, + { -1.00000000000000000000, 3.24830091939884457730, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, 45, + { 0.58943065821228057821, 2.59810442478829362045, 45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 }, + { 0.58943065821171236607, 2.59810442478739123118, 45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 }, + { 0.58943065613921030721, 2.59810442273856923023, 45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 }, + { 0.58943065729835331101, 2.59810443328209572655, 45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 }, + { 0.58943065821227913492, 2.59810442478829228818, 45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 }, + { 0.59120965314638784793, 2.58919942720574303152, 45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, 90, + { 1.24612766651409989649, 0.99922666842209439952, 90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 }, + { 1.24612766651347328661, 0.99922666842209484361, 90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 }, + { 1.24612766651409945240, 0.99922666842208562876, 90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 }, + { 1.24612766651409834218, 0.99922666841944918215, 90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 }, + { 1.24612766651412942842, 0.99922666842209206806, 90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 }, + { 1.24864304714222140724, 0.99923012194947880005, 90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, 135, + { 0.58789352027561725400, -0.59889382252477618707, 135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 }, + { 0.58789352027508301468, -0.59889382252384604222, 135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 }, + { 0.58789351816042800802, -0.59889382039736038799, 135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 }, + { 0.58789351933467837164, -0.59889382227058296504, 135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 }, + { 0.58789352027559971248, -0.59889382252475087398, 135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 }, + { 0.58966906957488163243, -0.58996975014221753053, 135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, 180, + { -1.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { -0.99999999999999977796, -1.26092062916373448545, 180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { -1.00000000000000000000, -1.26092061053506587776, 180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { -1.00000000000000000000, -1.26092062023552875516, 180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { -1.00000000000000000000, -1.26092062918495328994, 180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 }, + { -1.00000000000000000000, -1.24830091939885789998, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, -45, + { -2.58943065821228035617, 2.59810442478829362045, -45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 }, + { -2.58943065821171236607, 2.59810442478739123118, -45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 }, + { -2.58943065613921019619, 2.59810442273856923023, -45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 }, + { -2.58943065729835319999, 2.59810443328209572655, -45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 }, + { -2.58943065821227902390, 2.59810442478829228818, -45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 }, + { -2.59120965314638818100, 2.58919942720574303152, -45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, -90, + { -3.24612766651409989649, 0.99922666842209439952, -90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 }, + { -3.24612766651347328661, 0.99922666842209484361, -90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 }, + { -3.24612766651409989649, 0.99922666842208562876, -90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 }, + { -3.24612766651409812013, 0.99922666841944918215, -90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 }, + { -3.24612766651412920638, 0.99922666842209206806, -90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 }, + { -3.24864304714222429382, 0.99923012194947880005, -90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, -135, + { -2.58789352027561747605, -0.59889382252477618707, -135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 }, + { -2.58789352027508279264, -0.59889382252384604222, -135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 }, + { -2.58789351816042811905, -0.59889382039736038799, -135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 }, + { -2.58789351933467859368, -0.59889382227058296504, -135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 }, + { -2.58789352027559971248, -0.59889382252475087398, -135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 }, + { -2.58966906957482478902, -0.58996975014221753053, -135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { -1, 1 }, 250000, -180, + { -1.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { -1.00000000000000022204, -1.26092062916373448545, -180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { -1.00000000000000000000, -1.26092061053506587776, -180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { -1.00000000000000000000, -1.26092062023552875516, -180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { -1.00000000000000000000, -1.26092062918495328994, -180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 }, + { -1.00000000000000000000, -1.24830091939885789998, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, 0, + { 1.00000000000000000000, 3.26088938011404927408, 0.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { 1.00000000000000000000, 3.26088938009322193423, 0.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { 1.00000000000000000000, 3.26088936183515265554, 0.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { 1.00000000000000000000, 3.26088938879229361945, 0.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { 1.00000000000000000000, 3.26088938011400220063, 0.00000000000000000000, 249935.55991249639191664755, 0.99922675429255336521 }, + { 1.00000000000000000000, 3.24830091939884457730, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, 45, + { 2.58943065821228035617, 2.59810442478829362045, 45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 }, + { 2.58943065821171236607, 2.59810442478739123118, 45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 }, + { 2.58943065613921019619, 2.59810442273856923023, 45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 }, + { 2.58943065729835319999, 2.59810443328209572655, 45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 }, + { 2.58943065821227902390, 2.59810442478829228818, 45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 }, + { 2.59120965314638818100, 2.58919942720574303152, 45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, 90, + { 3.24612766651409989649, 0.99922666842209439952, 90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 }, + { 3.24612766651347328661, 0.99922666842209484361, 90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 }, + { 3.24612766651409989649, 0.99922666842208562876, 90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 }, + { 3.24612766651409812013, 0.99922666841944918215, 90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 }, + { 3.24612766651412920638, 0.99922666842209206806, 90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 }, + { 3.24864304714222429382, 0.99923012194947880005, 90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, 135, + { 2.58789352027561747605, -0.59889382252477618707, 135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 }, + { 2.58789352027508279264, -0.59889382252384604222, 135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 }, + { 2.58789351816042811905, -0.59889382039736038799, 135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 }, + { 2.58789351933467859368, -0.59889382227058296504, 135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 }, + { 2.58789352027559971248, -0.59889382252475087398, 135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 }, + { 2.58966906957482478902, -0.58996975014221753053, 135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, 180, + { 1.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { 1.00000000000000022204, -1.26092062916373448545, 180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { 1.00000000000000000000, -1.26092061053506587776, 180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { 1.00000000000000000000, -1.26092062023552875516, 180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { 1.00000000000000000000, -1.26092062918495328994, 180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 }, + { 1.00000000000000000000, -1.24830091939885789998, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, -45, + { -0.58943065821228057821, 2.59810442478829362045, -45.04990703751319358616, 249935.55953696221695281565, 0.99922675155892082266 }, + { -0.58943065821171236607, 2.59810442478739123118, -45.04990703751315805903, 249935.55953448649961501360, 0.99922675162094765078 }, + { -0.58943065613921030721, 2.59810442273856923023, -45.04990703742064539483, 249935.55921406255220063031, 0.99922675162293117523 }, + { -0.58943065729835331101, 2.59810443328209572655, -45.04990703789670902779, 249935.56090466640307568014, 0.99922675155085038945 }, + { -0.58943065821227913492, 2.59810442478829228818, -45.04990703751319358616, 249935.55953712644986808300, 0.99922675155892171084 }, + { -0.59120965314638784793, 2.58919942720574303152, -45.04983919357213295598, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, -90, + { -1.24612766651409989649, 0.99922666842209439952, -90.03919022849945008602, 249935.55891569345840252936, 0.99922674685767398639 }, + { -1.24612766651347328661, 0.99922666842209484361, -90.03919022849945008602, 249935.55891513981623575091, 0.99922674686822765544 }, + { -1.24612766651409945240, 0.99922666842208562876, -90.03919022849967745969, 249935.55891660030465573072, 0.99922674686821866263 }, + { -1.24612766651409834218, 0.99922666841944918215, -90.03919022856645426600, 249935.55934300230001099408, 0.99922674685495815883 }, + { -1.24612766651412942842, 0.99922666842209206806, -90.03919022849945008602, 249935.55891566010541282594, 0.99922674685767398639 }, + { -1.24864304714222140724, 0.99923012194947880005, -90.03923416180586514201, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, -135, + { -0.58789352027561725400, -0.59889382252477618707, -135.00555901266011460393, 249935.55869720416376367211, 0.99922674484119022864 }, + { -0.58789352027508301468, -0.59889382252384604222, -135.00555901266014302564, 249935.55869934437214396894, 0.99922674484277662632 }, + { -0.58789351816042800802, -0.59889382039736038799, -135.00555901268222669387, 249935.55836710284347645938, 0.99922674484483320345 }, + { -0.58789351933467837164, -0.59889382227058296504, -135.00555901266275782291, 249935.55866038758540526032, 0.99922674484142481877 }, + { -0.58789352027559971248, -0.59889382252475087398, -135.00555901266014302564, 249935.55869721240014769137, 0.99922674484119011762 }, + { -0.58966906957488163243, -0.58996975014221753053, -135.00568903667726772255, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, 1 }, 250000, -180, + { 1.00000000000000000000, -1.26092062918498104551, -180.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { 0.99999999999999977796, -1.26092062916373448545, -180.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { 1.00000000000000000000, -1.26092061053506587776, -180.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { 1.00000000000000000000, -1.26092062023552875516, -180.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { 1.00000000000000000000, -1.26092062918495328994, -180.00000000000000000000, 249935.55872469520545564592, 0.99922674479230122468 }, + { 1.00000000000000000000, -1.24830091939885789998, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, 0, + { 1.00000000000000000000, 1.26092062918498104551, 0.00000000000000000000, 249935.55872467698645778000, 0.99922674479230122468 }, + { 1.00000000000000000000, 1.26092062916373448545, 0.00000000000000000000, 249935.55872643628390505910, 0.99922674479075712650 }, + { 1.00000000000000000000, 1.26092061053506587776, 0.00000000000000000000, 249935.55666816755547188222, 0.99922674480349771287 }, + { 1.00000000000000000000, 1.26092062023552875516, 0.00000000000000000000, 249935.55774092715000733733, 0.99922674479840822848 }, + { 1.00000000000000000000, 1.26092062918495995127, 0.00000000000000000000, 249935.55872469596215523779, 0.99922674479230122468 }, + { 1.00000000000000000000, 1.24830091939884435526, 0.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, 45, + { 2.58789352027561747605, 0.59889382252477618707, 44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 }, + { 2.58789352027508279264, 0.59889382252384637528, 44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 }, + { 2.58789351816042811905, 0.59889382039736038799, 44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 }, + { 2.58789351933467859368, 0.59889382227058296504, 44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 }, + { 2.58789352027561658787, 0.59889382252477563195, 44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 }, + { 2.58966906957485276664, 0.58996975014221642031, 44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, 90, + { 3.24612766651409989649, -0.99922666842209439952, 89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 }, + { 3.24612766651347328661, -0.99922666842209439952, 89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 }, + { 3.24612766651409989649, -0.99922666842208529570, 89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 }, + { 3.24612766651409812013, -0.99922666841944873806, 89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 }, + { 3.24612766651407813612, -0.99922666842209184601, 89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 }, + { 3.24864304714222429382, -0.99923012194947846698, 89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, 135, + { 2.58943065821228035617, -2.59810442478829362045, 134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 }, + { 2.58943065821171281016, -2.59810442478739078709, 134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 }, + { 2.58943065613921019619, -2.59810442273856878614, 134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 }, + { 2.58943065729835319999, -2.59810443328209572655, 134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 }, + { 2.58943065821226792167, -2.59810442478831138402, 134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 }, + { 2.59120965314638285193, -2.58919942720575324557, 134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, 180, + { 1.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { 1.00000000000000022204, -3.26088938009322193423, 180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { 1.00000000000000000000, -3.26088936183515265554, 180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { 1.00000000000000000000, -3.26088938879229361945, 180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { 1.00000000000000000000, -3.26088938011400975014, 180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 }, + { 0.99999999999998867573, -3.24830091939884901819, 180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, -45, + { -0.58789352027561725400, 0.59889382252477618707, -44.99444098733987829064, 249935.55869720416376367211, 0.99922674484119022864 }, + { -0.58789352027508279264, 0.59889382252384637528, -44.99444098733987118521, 249935.55869934445945546031, 0.99922674484277662632 }, + { -0.58789351816042800802, 0.59889382039736038799, -44.99444098731778751699, 249935.55836710281437262893, 0.99922674484483320345 }, + { -0.58789351933467837164, 0.59889382227058296504, -44.99444098733723507166, 249935.55866038752719759941, 0.99922674484142481877 }, + { -0.58789352027561669889, 0.59889382252477563195, -44.99444098733987829064, 249935.55869721624185331166, 0.99922674484119011762 }, + { -0.58966906957485232255, 0.58996975014221642031, -44.99431096332273227745, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, -90, + { -1.24612766651409989649, -0.99922666842209439952, -89.96080977150054991398, 249935.55891569345840252936, 0.99922674685767398639 }, + { -1.24612766651347328661, -0.99922666842209439952, -89.96080977150054991398, 249935.55891513984533958137, 0.99922674686822765544 }, + { -1.24612766651409945240, -0.99922666842208529570, -89.96080977150032254031, 249935.55891660030465573072, 0.99922674686821844059 }, + { -1.24612766651409834218, -0.99922666841944873806, -89.96080977143354573400, 249935.55934300241642631590, 0.99922674685495815883 }, + { -1.24612766651407835816, -0.99922666842209184601, -89.96080977150054991398, 249935.55891566007630899549, 0.99922674685767387537 }, + { -1.24864304714222140724, -0.99923012194947846698, -89.96076583819413485799, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, -135, + { -0.58943065821228057821, -2.59810442478829362045, -134.95009296248679220298, 249935.55953696221695281565, 0.99922675155892082266 }, + { -0.58943065821171258811, -2.59810442478739078709, -134.95009296248684904640, 249935.55953448649961501360, 0.99922675162094776180 }, + { -0.58943065613921030721, -2.59810442273856878614, -134.95009296257936171060, 249935.55921406237757764757, 0.99922675162293117523 }, + { -0.58943065729835331101, -2.59810443328209572655, -134.95009296210329807764, 249935.56090466637397184968, 0.99922675155085038945 }, + { -0.58943065821226814371, -2.59810442478831138402, -134.95009296248679220298, 249935.55953712956397794187, 0.99922675155892148879 }, + { -0.59120965314640527843, -2.58919942720575324557, -134.95016080642784572774, 0.00000000000000000000, 1.00000000000000000000 } + },{ + { 1, -1 }, 250000, -180, + { 1.00000000000000000000, -3.26088938011404927408, -180.00000000000000000000, 249935.55991226507467217743, 0.99922675429255258805 }, + { 0.99999999999999977796, -3.26088938009322193423, -180.00000000000000000000, 249935.55988221566076390445, 0.99922675435769237051 }, + { 1.00000000000000000000, -3.26088936183515265554, -180.00000000000000000000, 249935.55786483851261436939, 0.99922675437017982603 }, + { 1.00000000000000000000, -3.26088938879229361945, -180.00000000000000000000, 249935.56092769638053141534, 0.99922675428677187881 }, + { 1.00000000000000000000, -3.26088938011400975014, -180.00000000000000000000, 249935.55991249711951240897, 0.99922675429255336521 }, + { 0.99999999999998867573, -3.24830091939884901819, -180.00000000000000000000, 0.00000000000000000000, 1.00000000000000000000 } + } + +}; + +size_t const expected_size = sizeof(expected) / sizeof(expected_results); +#endif // BOOST_GEOMETRY_TEST_DIRECT_CASES_HPP diff --git a/src/boost/libs/geometry/test/formulas/direct_cases_antipodal.hpp b/src/boost/libs/geometry/test/formulas/direct_cases_antipodal.hpp new file mode 100644 index 00000000..c6ba8524 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/direct_cases_antipodal.hpp @@ -0,0 +1,343 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan. + +// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_DIRECT_CASES_ANTIPODAL_HPP +#define BOOST_GEOMETRY_TEST_DIRECT_CASES_ANTIPODAL_HPP + +#include "direct_cases.hpp" + +struct expected_results_antipodal +{ + coordinates p1; + double distance; + double azimuth12; + expected_result karney; +}; + +/* + These values are collected from GeodTest which is associated with GeographicLib: + https://zenodo.org/record/32156 + + The conversion to C++ array format is done using this Python script: + https://github.com/adl1995/boost-geometry-extra/blob/master/geographicLib-dataset-parse.py + + Geodesic scale (M12) is absent from the GeodTest dataset, so it is manually generated + using GeographicLib through this C++ script: + https://github.com/adl1995/boost-geometry-extra/blob/master/geographicLib-direct-antipodal.cpp +*/ +expected_results_antipodal expected_antipodal[] = +{ + { + { 0, 31.394417440639 }, 19980218.4055399, 34.266322930672, + { 179.615601631202912322, -31.275540610835465807, 145.782701113414306756, 49490.8807994496209, -0.996116451012525883079717914370121434 } + },{ + { 0, 29.788792273749 }, 19887224.5407334, 74.302205994192, + { 178.569451327813675741, -29.558013672069422725, 106.156240654579267308, 97043.7545600593058, -0.998624031147844926081802441331092268 } + },{ + { 0, 46.471843094141 }, 19944337.8863917, 63.693680310665, + { 179.083144618009561276, -46.284166405924629853, 116.699978859005570535, 53139.140576552365, -0.997597309645591900917338534782174975 } + },{ + { 0, 63.016506345929 }, 20000925.7533636, 153.393656073038, + { 179.862869954071637855, -63.02943882703369735, 26.619056019474552953, 12713.9284725111772, -1.00381317792143387457315384381217882 } + },{ + { 0, 19.796231412719 }, 19956338.1330537, 28.272934411318, + { 179.546498474461283862, -19.470586923091672503, 151.789094611690988249, 87191.1749625132931, -0.997015409027664833985227232915349305 } + },{ + { 0, 6.373459459035 }, 19946581.6983394, 56.859050230583, + { 179.240009269347556917, -6.204887833274217382, 123.169200847008284851, 53958.8698005263939, -0.999349049081101004077254401636309922 } + },{ + { 0, 66.380766469414 }, 19986277.7696849, 38.646950203356, + { 179.632633596894388233, -66.27177494016956425, 141.550919825824399405, 22198.215635049214, -0.996949176054954366854587988200364634 } + },{ + { 0, 16.483421185231 }, 19962737.9842573, 163.431254767325, + { 179.731567273052604726, -16.818424446748042212, 16.598399455529231288, 95318.4104529881431, -1.00272210232979741562076014815829694 } + },{ + { 0, 4.215702155486 }, 19932517.393764, 65.543168480886, + { 179.093771177769992874, -4.051917290690976764, 114.482669479963380006, 55205.4553703842317, -0.999655858425056553784315838129259646 } + },{ + { 0, 40.71372085907 }, 19951133.3595356, 143.672151631634, + { 179.404612926861498984, -41.047052242159400671, 36.54002600969304553, 70931.1530155553621, -1.00414169574077272173440178448799998 } + },{ + { 0, 15.465481491654 }, 19877383.8879911, 36.289185640976, + { 179.020726605204181801, -14.622355549425900341, 143.875673907461159912, 156419.0806764376957, -0.997639074397169589580869342171354219 } + },{ + { 0, 17.586197343531 }, 19982280.4639115, 157.929615091529, + { 179.722490735835379144, -17.731394230364437075, 22.089021105298661023, 69727.5357849255557, -1.00280451698301242835498214844847098 } + },{ + { 0, 5.7442768247 }, 19902873.7431814, 116.146983678305, + { 178.85894724576868462, -6.039853564481335581, 63.91482549951374061, 87149.6188944111673, -1.00039332893096744037109147029696032 } + },{ + { 0, 32.002904282111 }, 19967670.3104795, 163.052160078191, + { 179.744925422107715439, -32.297934520693132807, 17.004175883388454943, 78311.3164829640582, -1.00449903445302446414189034840092063 } + },{ + { 0, 55.902716926362 }, 19970525.337607, 98.927641063414, + { 179.300685189522463007, -55.934320218634018206, 81.374264168520557301, 23554.0093185709067, -1.00072788779083454713259015989024192 } + },{ + { 0, 22.69939784398 }, 19959286.1903172, 74.253870776761, + { 179.294173474584020749, -22.654875407651067149, 105.811588890213155275, 22369.7179951557679, -0.998972181419003457669703038845909759 } + },{ + { 0, 41.312328471121 }, 19962690.5721867, 11.277616109847, + { 179.817186837717804928, -40.954523601529804886, 168.784288786443902199, 77252.6121237260201, -0.994825151471527391322524636052548885 } + },{ + { 0, 27.927415327453 }, 19961296.8828333, 23.166421459647, + { 179.636508875679110143, -27.607314264234172721, 156.905194492817275222, 83096.5801709291101, -0.995959692767656723511038308060960844 } + },{ + { 0, 41.567228741451 }, 19944253.4454809, 176.66609526064, + { 179.931812964300204608, -42.103039532074194347, 3.361859685835349219, 96859.08180779197, -1.00513607140487626345759508694754913 } + },{ + { 0, 37.384208978567 }, 19928705.5911445, 39.072534864532, + { 179.225180174670992261, -36.916085670712060029, 141.212743814390850106, 92667.7834060578402, -0.995955516859159284415170532156480476 } + },{ + { 0, 59.011868682852 }, 19970442.3788306, 44.970301291063, + { 179.424923485514312807, -58.82705468054708336, 135.333817989802309531, 38071.1136293083857, -0.996658942892707400140750451100757346 } + },{ + { 0, 35.515406087737 }, 19948918.9139751, 28.528972431952, + { 179.50369572149476218, -35.119747127350258822, 151.622257906284404073, 84564.0387217601751, -0.995562861799169418475230486365035176 } + },{ + { 0, 58.170252463184 }, 19961407.0813807, 128.021116291844, + { 179.254737571455023977, -58.372261836268550805, 52.399129705193347143, 43715.3070711393309, -1.00285273713280753682397516968194395 } + },{ + { 0, 34.012183807959 }, 19970955.843065, 168.944519134772, + { 179.83713352180447672, -34.29640782899529639, 11.093048811826875835, 76493.5814538538151, -1.0047652354558671561335359001532197 } + },{ + { 0, 45.510762948553 }, 19940248.3450143, 99.886784003837, + { 178.981682578823726535, -45.582753595227824235, 80.542330522982505877, 48555.1946627894972, -1.00083807750906350619857221317943186 } + },{ + { 0, 4.19841765451 }, 19970496.5132933, 89.561550657928, + { 179.398024428225540172, -4.198416896099783242, 90.438456568689151881, 14.8790480103109, -0.999994104810285944218151144013972953 } + },{ + { 0, 40.890119148103 }, 19926563.5817492, 165.437641169967, + { 179.6557148951668192, -41.553556264538302258, 14.713597527941311478, 111805.7305227545923, -1.00492294933406567380984597548376769 } + },{ + { 0, 28.096672787686 }, 19883901.8482359, 115.174366374632, + { 178.606868012231657724, -28.472055035513955205, 65.257367020445564176, 107880.4353518862363, -1.00170803073331593502359737613005564 } + },{ + { 0, 6.50572154271 }, 19917276.4101551, 79.069492719523, + { 178.926013840891647541, -6.411745140559297675, 100.985091481519557845, 57073.3242952680707, -0.999736666933808471036115861352300271 } + },{ + { 0, .468835109567 }, 19849380.7342734, 80.234636214474, + { 178.325942223692180692, -.281751687044281805, 99.77243368342786593, 123845.4568822078908, -0.999801437209140719808431185811059549 } + },{ + { 0, 1.682746325049 }, 19890026.0274781, 10.076182752451, + { 179.717131561406935483, -.677647430701204515, 169.927471515299313238, 177917.2104306563981, -0.999538055691262194990542866435134783 } + },{ + { 0, 10.711305126218 }, 19962987.2134077, 7.528253696796, + { 179.874050163405229937, -10.349315378531556046, 172.480576051850009046, 104175.1095378254456, -0.998071853755238880268052525934763253 } + },{ + { 0, 53.374321544652 }, 19980478.1457438, 23.324715976877, + { 179.729445806011012057, -53.196257519024042184, 156.777734080146664812, 41907.8869272231053, -0.995333596277707566279957518418086693 } + },{ + { 0, 39.680221664519 }, 19956191.7841809, 7.075406493429, + { 179.87506206720154785, -39.256187213040660911, 172.967624741991546131, 86943.8110669895148, -0.994801087909667924868983845954062417 } + },{ + { 0, 1.377666714083 }, 19925401.4931301, 95.29199069739, + { 178.994542525209058878, -1.415358715570225495, 84.7178724483824156, 45800.9140624827059, -0.99999803170512457928253979844157584 } + },{ + { 0, 48.751426624188 }, 19988599.1160495, 40.252328570137, + { 179.661697715070846977, -48.688146707479475147, 139.808452951157199824, 26322.3790862461568, -0.995999245724129789181233718409202993 } + },{ + { 0, 59.443039048494 }, 19969935.9534732, 93.052184108221, + { 179.247605418616998285, -59.454371825393424121, 87.331416513795326158, 25342.4691896499534, -1.00020727848897084122370415570912883 } + },{ + { 0, 4.122408476235 }, 19938291.6332293, 167.73479753304, + { 179.749430572914989772, -4.689124208743755363, 12.274635577599782826, 127855.6475863583497, -1.00068600902837667732114823593292385 } + },{ + { 0, 46.422470082432 }, 19931980.7029341, 86.67365350297, + { 178.857408435141563774, -46.390934261324541952, 93.852683224054943377, 56114.680046867064, -0.999607096116300386512421027873642743 } + },{ + { 0, 32.614423729024 }, 19926887.3785175, 24.943814520557, + { 179.460593512880455451, -32.01874745886238612, 155.229917137448282531, 112355.3319340873104, -0.995562150676871926435751447570510209 } + },{ + { 0, 3.242895277973 }, 19964490.4789049, 30.247458779683, + { 179.556428318080663113, -3.001106476068264917, 149.760178923092147784, 80929.0418317066044, -0.999474184270344845337774586369050667 } + },{ + { 0, 6.29069210113 }, 19877160.8505733, 94.34299459284, + { 178.556859259685624933, -6.354208910915346725, 85.750059038253282986, 94127.1566760840083, -0.999976397350904933070125935046235099 } + },{ + { 0, 18.232086569498 }, 19927978.7462175, 164.41905055334, + { 179.658073278238477245, -18.87394850776853555, 15.640779355822506503, 129771.1882449660559, -1.00293460439063886191490837518358603 } + },{ + { 0, 12.049849333181 }, 19908004.4552909, 9.418096768309, + { 179.761046682699610657, -11.201990279782499264, 170.610608272305604585, 157761.5040571466343, -0.997761474497510958414636661473196 } + },{ + { 0, 40.289465276136 }, 19985674.936106, 143.092606818963, + { 179.644208494155329095, -40.370034926441385999, 36.958610382613096419, 36200.8933724688593, -1.00414965876091266672176516294712201 } + },{ + { 0, 2.197784650379 }, 19910509.7517973, 1.542117609437, + { 179.961199531084784854, -1.353440827124394777, 178.458582198505846426, 160403.6285079348996, -0.999488724639301051588802238256903365 } + },{ + { 0, 1.966575272177 }, 19875595.6267266, 170.112968791865, + { 179.699817324905962184, -3.101125282483752618, 9.89572776349855838, 192355.7206665719908, -1.00015463589804554089823795948177576 } + },{ + { 0, 25.078832492684 }, 19887997.7953866, 77.264585323781, + { 178.600804840925824646, -24.897833702325682511, 103.101167809583406892, 92442.9124509225839, -0.998981189838600847075156252685701475 } + },{ + { 0, 31.740361941314 }, 19972325.3556069, 143.930820896999, + { 179.553485210731879874, -31.909206787477701871, 36.145242998351638503, 54883.4113710054145, -1.00379461628115951299378139083273709 } + },{ + { 0, .05479250563 }, 19858049.4780499, 41.349430623518, + { 178.822647462220726609, .836079031223269324, 138.645259065012502544, 169078.442370111714, -0.9997793696948588104689292777038645 } + },{ + { 0, 36.685139871608 }, 19968965.6773632, 89.167975517493, + { 179.366667224014334712, -36.6833040833258687, 90.921025521408327068, 13327.2156799476918, -0.999916537946348604748436628142371774 } + },{ + { 0, 3.451199399671 }, 19938203.3838544, 91.541212417048, + { 179.107509334399258305, -3.459003521120242021, 88.476282464773035164, 32316.1747698810781, -1.00000397484395819880376166111091152 } + },{ + { 0, 27.692898794247 }, 19883493.6699045, 88.406440883665, + { 178.512356615673144314, -27.666009301228316555, 92.036345087713397961, 94128.7880896190836, -0.999736458322951659916100197733612731 } + },{ + { 0, 17.363238291869 }, 19980749.7638027, 39.697196316589, + { 179.567921315455829491, -17.288872648596950413, 140.321938237586060826, 46975.9359427664379, -0.997687691981715030209443284547887743 } + },{ + { 0, 37.006775102539 }, 19949309.9180043, 116.455543532607, + { 179.191103068859169842, -37.156365616364686838, 63.771817992036617793, 45856.1961421018701, -1.00221962858918423044940482213860378 } + },{ + { 0, 45.572883540957 }, 19940027.8586414, 137.627256708444, + { 179.224707765088686272, -45.94675931323086696, 42.723991162977357301, 74208.4359612889496, -1.00380887786447159371050474874209613 } + },{ + { 0, 43.63393981955 }, 19931045.2914508, 91.203625101465, + { 178.878236417027994157, -43.642335115130514773, 89.268780774643462256, 55253.5406349861764, -1.00002974153150514524668324156664312 } + },{ + { 0, 38.4995307019 }, 19918391.2222193, 141.232864609445, + { 179.143856004445269342, -39.042223438550921467, 39.117947060740562295, 102217.2563106863077, -1.00388164115732947401227193040540442 } + },{ + { 0, 27.55015339382 }, 19986004.7358853, 137.025135713548, + { 179.596220103573824099, -27.587412128122249651, 42.992898351962011956, 33938.7346646670654, -1.00316044390281167153489150223322213 } + },{ + { 0, 1.54507498314 }, 19978593.3191777, 36.816106412092, + { 179.567115633151308577, -1.448861185025252004, 143.185763012309022403, 56320.5800276739168, -0.999770499462467210349814195069484413 } + },{ + { 0, 45.217063644222 }, 19987042.0782465, 18.114645812265, + { 179.807382581661125, -45.086424050571516283, 161.928120141429818658, 45544.2915061261936, -0.994974179414854997816064496873877943 } + },{ + { 0, 13.473522450751 }, 19987364.078382, 156.839609002403, + { 179.726941062277208626, -13.570372758027936877, 23.170293747820406391, 65329.9068132034472, -1.00219093189506569530067281448282301 } + },{ + { 0, 6.287741997374 }, 19912159.8245954, 132.954797451112, + { 179.071252372259552052, -6.743450924917895817, 47.100789519677419746, 104772.4027498097375, -1.00071252411103017720961361192166805 } + },{ + { 0, 7.639709001531 }, 19976374.3699535, 29.731916588299, + { 179.616156296978583335, -7.48702643786017917, 150.279582966919438164, 69224.6591757209539, -0.998789792086741234911073661351110786 } + },{ + { 0, 5.893688050348 }, 19886907.2520668, 14.653438882877, + { 179.586212000450856399, -4.888408917114795625, 165.371181401863458848, 177183.5330818593022, -0.998794647031120752522781458537792787 } + },{ + { 0, 61.997076235476 }, 19976288.2901729, 149.562797049254, + { 179.605779116829636081, -62.19593758437129915, 30.65850204223272625, 36696.2853801462176, -1.00373071432437144245852778112748638 } + },{ + { 0, 50.507637741656 }, 19979542.5263293, 171.564028344478, + { 179.893569206021038536, -50.721890799900161112, 8.4746613464253591, 50644.5234828162697, -1.00508881632281776852266830246662721 } + },{ + { 0, 7.484475238477 }, 19867425.2906303, 57.020570370985, + { 178.638400003000590878, -6.926155588124333461, 123.087267812322270238, 132929.2775641349633, -0.999097042677338120775232255255104974 } + },{ + { 0, 56.851165323215 }, 19988235.9960515, 112.345749045605, + { 179.587046628550073045, -56.875248360744638525, 67.744017057185404441, 9971.0934553515518, -1.00182859249871403228837607457535341 } + },{ + { 0, 10.692273150738 }, 19893210.3050033, 102.824601316946, + { 178.709520715733071393, -10.851727623036704339, 77.308514969817191459, 83032.7122948051111, -1.00034345584508432835946223349310458 } + },{ + { 0, 46.694739303788 }, 19975447.9283188, 174.663684259477, + { 179.926838145841924189, -46.948618153686522669, 5.361568174833475454, 59614.5876209460645, -1.00520484875201732144489596976200119 } + },{ + { 0, 15.804386137005 }, 19855850.8800526, 74.932089158884, + { 178.367587635209819128, -15.522042847777054984, 105.357235560913450667, 123350.4326645237628, -0.999091578546475345135036150168161839 } + },{ + { 0, 4.371450175299 }, 19979071.1035552, 164.163592252794, + { 179.780887420199549421, -4.566109732313098407, 15.840695025950408814, 84137.2115482558728, -1.00076323969894742660358133434783667 } + },{ + { 0, 30.894388279688 }, 19968681.8321577, 77.35154610481, + { 179.375426183521944524, -30.871308884744172663, 102.709506078439532936, 14048.0277985734058, -0.998975176336422854284080585784977302 } + },{ + { 0, 9.541166838639 }, 19848553.7844137, 118.441353539081, + { 178.432934555386452839, -10.09982228112793472, 61.736686215549403663, 144831.1911566651614, -1.00060548620110489892454097571317106 } + },{ + { 0, 8.489292700054 }, 19995477.1669578, 171.963952699866, + { 179.906698338023119097, -8.559237750032113623, 8.037517851139094467, 72192.60793572974, -1.00152068486306466965629624610301107 } + },{ + { 0, 19.562401114224 }, 19893208.1788508, 126.362762598128, + { 178.838724116996037606, -20.05038360490599475, 53.875560227496658204, 112181.7524188837615, -1.00185202668802775249901060306001455 } + },{ + { 0, 42.260350252749 }, 19942715.0054774, 170.703419847646, + { 179.807860448877064601, -42.79985897702184353, 9.377654670896439828, 96336.3477142010769, -1.00508642406443549077721399953588843 } + },{ + { 0, 24.511403144656 }, 19924809.5184876, 102.913211410163, + { 178.957598444862223515, -24.616808725039883945, 77.297538210434837096, 55403.453072179318, -1.0008408309188838725134473861544393 } + },{ + { 0, 20.844284170708 }, 19909084.6340808, 44.172784008084, + { 179.069258863637226633, -20.321320573298341477, 136.01627115731728436, 111009.0987238994608, -0.997389183621778974142557672166731209 } + },{ + { 0, 2.426010809098 }, 19840940.6924189, 94.315194952561, + { 178.236397468862000784, -2.513715200833756776, 85.734896842737189557, 130002.6104886615638, -0.999825249844991659209370027383556589 } + },{ + { 0, 6.600682554664 }, 19878412.28273, 168.167678684515, + { 179.646475458013797028, -7.699164822656561787, 11.861035812918738552, 187426.3958525886692, -1.00098284856064978498579876031726599 } + },{ + { 0, 23.372339802326 }, 19899498.4582543, 161.197647943542, + { 179.499422665106094027, -24.239465200482591299, 18.932355367478826536, 151863.2545535951091, -1.00347666868431395492677893344080076 } + },{ + { 0, 16.194668264095 }, 19874825.6683239, 148.942349959054, + { 179.115193814080201851, -17.129419031459576897, 31.225656401221968078, 166033.3161394594622, -1.00222032222233647935638600756647065 } + },{ + { 0, 1.528726471528 }, 19897803.9939987, 69.212891442493, + { 178.791047180477802091, -1.282203000582034597, 110.802928803578167132, 85252.8333849204133, -0.999827144228156883265512533398577943 } + },{ + { 0, 6.297249676078 }, 19864042.0495193, 56.274639904925, + { 178.623258703845895437, -5.709470001196540278, 123.817184177744186806, 137475.1283083659258, -0.999190450178399580671850799262756482 } + },{ + { 0, 17.393540327984 }, 19962624.6302607, 107.855062015266, + { 179.330156510680163326, -17.431100690958209424, 72.181322855288535245, 19320.5501845044839, -1.00091841779689127989172447996679693 } + },{ + { 0, 46.284685151236 }, 19990422.3478916, 14.758013867151, + { 179.852534804091121255, -46.176234945675219984, 165.271681964991897184, 42614.1796365710104, -0.994894592261839960656288894824683666 } + },{ + { 0, 14.924320176299 }, 19891861.8615337, 31.446544793174, + { 179.195663739713760883, -14.125476432252858442, 148.678916887199611191, 149419.6596309045804, -0.997620142585332936313591289945179597 } + },{ + { 0, 23.668824656069 }, 19938736.4442268, 148.091483667618, + { 179.409875478773990359, -24.107855233601412399, 32.02919257641173958, 97771.7687385830819, -1.00323262872000595891108787327539176 } + },{ + { 0, 46.986276695896 }, 19968596.0414782, 174.796708941456, + { 179.92040916864362177, -47.301644191214905832, 5.234240076649939638, 66113.7417494369769, -1.00519095452608087093437916337279603 } + },{ + { 0, 65.946144289524 }, 19993734.5109736, 25.375428509648, + { 179.808282612725835525, -65.871840130833632868, 154.703163938350061652, 18355.2254271672769, -0.996436935914610577569305860379245132 } + },{ + { 0, 10.950298933293 }, 19975919.5586889, 28.779018914489, + { 179.624609619829763098, -10.787771536605316781, 151.238005588662201946, 70291.1998404303581, -0.998272071834115148902810688014142215 } + },{ + { 0, 13.609869340778 }, 19913213.8514358, 129.616021271129, + { 179.035623147420893383, -14.023624108675206222, 50.506400999466711623, 97596.7664002074776, -1.00146664642314031645753402699483559 } + },{ + { 0, 48.701427557433 }, 19972955.2699173, 102.875149183407, + { 179.385565054218238481, -48.735316652259656533, 77.294384444682547869, 18461.7742226227697, -1.00114676855429074464609584538266063 } + },{ + { 0, 31.519172055785 }, 19952318.3772514, 26.247105619999, + { 179.555251675378549409, -31.140142027808697534, 153.865822276646938125, 86354.7117605101002, -0.995739948399825047786748655198607594 } + },{ + { 0, 31.863784754278 }, 19993324.8682601, 29.572313410211, + { 179.722489476483407524, -31.826935359797657785, 150.440607907359037187, 41427.6181613499234, -0.995888009001147267440501309465616941 } + },{ + { 0, 76.434608546092 }, 19997750.023578, 167.428385412814, + { 179.918287057674124459, -76.48787937532808951, 12.621032110142724567, 9619.5267710862108, -1.00233963893091582164629471662919968 } + },{ + { 0, 73.114273316483 }, 19992866.6147806, 78.154765899661, + { 179.576736605988553624, -73.098788070892914568, 102.085693546950923465, 8580.6475692800946, -0.999384143308475469957841141876997426 } + },{ + { 0, 1.125639056292 }, 19852573.5442848, 67.184842289382, + { 178.426819580880619395, -.694775021853292564, 112.831314850896246589, 132932.8743502563937, -0.999732957962833457266071945923613384 } + } +}; + +size_t const expected_size_antipodal = sizeof(expected_antipodal) / sizeof(expected_results_antipodal); + +#endif // BOOST_GEOMETRY_TEST_DIRECT_CASES_ANTIPODAL_HPP diff --git a/src/boost/libs/geometry/test/formulas/direct_meridian.cpp b/src/boost/libs/geometry/test/formulas/direct_meridian.cpp new file mode 100644 index 00000000..aa94413b --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/direct_meridian.cpp @@ -0,0 +1,115 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2018 Oracle and/or its affiliates. + +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_GEOMETRY_NORMALIZE_LATITUDE + +#include <sstream> + +#include "test_formula.hpp" +#include "direct_meridian_cases.hpp" + +#include <boost/geometry/srs/srs.hpp> +#include <boost/geometry/formulas/vincenty_direct.hpp> +#include <boost/geometry/formulas/meridian_direct.hpp> + +template <typename Result, typename Expected, typename Reference> +void check_meridian_direct(Result& result, + Expected const& expected, + Reference& reference, + double reference_error) +{ + boost::geometry::math::normalize_spheroidal_coordinates + < + boost::geometry::radian, + double + >(result.lon2, result.lat2); + + boost::geometry::math::normalize_spheroidal_coordinates + < + boost::geometry::radian, + double + >(reference.lon2, reference.lat2); + + std::stringstream ss; + ss << "(" << result.lon2 * bg::math::r2d<double>() + << " " << result.lat2 * bg::math::r2d<double>() << ")"; + + check_one("lon:" + ss.str(), result.lon2, expected.lon, reference.lon2, + reference_error); + check_one("lat:" + ss.str(), result.lat2, expected.lat, reference.lat2, + reference_error); + check_one("rev_az:" + ss.str(), result.reverse_azimuth, + result.reverse_azimuth, reference.reverse_azimuth, reference_error); + check_one("red len:" + ss.str(), result.reduced_length, result.reduced_length, + reference.reduced_length, 0.01); + check_one("geo scale:" + ss.str(), result.geodesic_scale, result.geodesic_scale, + reference.geodesic_scale, 0.01); + +} + +void test_all(expected_results const& results) +{ + double const d2r = bg::math::d2r<double>(); + + double lon1_rad = results.p1.lon * d2r; + double lat1_rad = results.p1.lat * d2r; + coordinates expected_point; + expected_point.lon = results.p2.lon * d2r; + expected_point.lat = results.p2.lat * d2r; + double distance = results.distance; + bool direction = results.direction; + + // WGS84 + bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793); + + bg::formula::result_direct<double> vincenty_result; + bg::formula::result_direct<double> meridian_result; + + typedef bg::formula::vincenty_direct<double, true, true, true, true> vi_t; + double vincenty_azimuth = direction ? 0.0 : bg::math::pi<double>(); + vincenty_result = vi_t::apply(lon1_rad, lat1_rad, distance, vincenty_azimuth, spheroid); + + { + typedef bg::formula::meridian_direct<double, true, true, true, true, 1> eli; + meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid); + check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.001); + } + { + typedef bg::formula::meridian_direct<double, true, true, true, true, 2> eli; + meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid); + check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.00001); + } + { + typedef bg::formula::meridian_direct<double, true, true, true, true, 3> eli; + meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid); + check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.00000001); + } + { + typedef bg::formula::meridian_direct<double, true, true, true, true, 4> eli; + meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid); + check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.00000001); + } + { + typedef bg::formula::meridian_direct<double, true, true, true, true, 5> eli; + meridian_result = eli::apply(lon1_rad, lat1_rad, distance, direction, spheroid); + check_meridian_direct(meridian_result, expected_point, vincenty_result, 0.00000000001); + } +} + +int test_main(int, char*[]) +{ + for (size_t i = 0; i < expected_size; ++i) + { + test_all(expected[i]); + } + + return 0; +} diff --git a/src/boost/libs/geometry/test/formulas/direct_meridian_cases.hpp b/src/boost/libs/geometry/test/formulas/direct_meridian_cases.hpp new file mode 100644 index 00000000..b02c42b2 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/direct_meridian_cases.hpp @@ -0,0 +1,57 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2018 Oracle and/or its affiliates. + +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP +#define BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP + +struct coordinates +{ + double lon; + double lat; +}; + +struct expected_results +{ + coordinates p1; + double distance; + bool direction;//north=true, south=false + coordinates p2; +}; + +expected_results expected[] = +{ + { {0, 0}, 100000, true, {0, 0.90435537782} }, + { {0, 0}, 200000, true, {0, 1.8087062846} }, + { {0, 0}, 300000, true, {0, 2.7130880778385226826} }, + { {0, 0}, 400000, true, {0, 3.6174296804714929365} }, + { {0, 0}, 500000, true, {0, 4.521753233678117212} }, + { {0, 0}, 600000, true, {0, 5.4260542596891729872} }, + { {0, 0}, 700000, true, {0, 6.3303283037366426811} }, + { {0, 0}, 800000, true, {0, 7.234570938597034484} }, + { {0, 0}, 900000, true, {0, 8.1386639105161684427} }, + { {0, 0}, 1000000, true, {0, 9.0428195432854963087} }, + { {0, 0}, 10000000, true, {0, 89.982400761362015373} }, + { {0, 0}, 10001965, true, {0, 90} }, + { {0, 0}, 11000000, true, {180, 81.063836359} }, + { {10, 0}, 11000000, true, {-170, 81.063836359} }, + { {0, 1}, 100000, true, {0, 1.9043634563000368942} }, + { {0, 10}, 100000, true, {0, 10.904070448} }, + { {0, 80}, 100000, true, {0, 80.895552833} }, + { {0, 0}, 40010000, true, {0, 0.01932683869} },//wrap the spheroid once + { {0, 10}, 100000, false, {0, 9.0956502718} }, + { {0, 10}, 2000000, false, {0, -8.0858305929} }, + { {0, 0}, 11000000, false, {180, -81.063836359} }, + { {0, 0}, 40010000, false, {0, -0.01932683869} } //wrap the spheroid once +}; + +size_t const expected_size = sizeof(expected) / sizeof(expected_results); + +#endif // BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP diff --git a/src/boost/libs/geometry/test/formulas/intersection.cpp b/src/boost/libs/geometry/test/formulas/intersection.cpp new file mode 100644 index 00000000..4ab53aa2 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/intersection.cpp @@ -0,0 +1,198 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2016-2019 Oracle and/or its affiliates. + +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "test_formula.hpp" +#include "intersection_cases.hpp" + +#include <boost/geometry/formulas/andoyer_inverse.hpp> +#include <boost/geometry/formulas/geographic.hpp> +#include <boost/geometry/formulas/gnomonic_intersection.hpp> +#include <boost/geometry/formulas/sjoberg_intersection.hpp> +#include <boost/geometry/formulas/thomas_direct.hpp> +#include <boost/geometry/formulas/thomas_inverse.hpp> +#include <boost/geometry/formulas/vincenty_direct.hpp> +#include <boost/geometry/formulas/vincenty_inverse.hpp> + +#include <boost/geometry/strategies/geographic/parameters.hpp> + +#include <boost/geometry/srs/spheroid.hpp> + +void check_result(expected_result const& result, expected_result const& expected, + expected_result const& reference, double reference_error, + bool check_reference_only) +{ + //BOOST_CHECK_MESSAGE((false), "(" << result.lon << " " << result.lat << ") vs (" << expected.lon << " " << expected.lat << ")"); + check_one(result.lon, expected.lon, reference.lon, reference_error, false, check_reference_only); + check_one(result.lat, expected.lat, reference.lat, reference_error, false, check_reference_only); +} + +void test_formulas(expected_results const& results, bool check_reference_only) +{ + // reference result + if (results.sjoberg_vincenty.lon == ND) + { + return; + } + + double const d2r = bg::math::d2r<double>(); + double const r2d = bg::math::r2d<double>(); + + double lona1r = results.p1.lon * d2r; + double lata1r = results.p1.lat * d2r; + double lona2r = results.p2.lon * d2r; + double lata2r = results.p2.lat * d2r; + double lonb1r = results.q1.lon * d2r; + double latb1r = results.q1.lat * d2r; + double lonb2r = results.q2.lon * d2r; + double latb2r = results.q2.lat * d2r; + + expected_result result; + + // WGS84 + bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793); + + if (results.gnomonic_vincenty.lon != ND) + { + bg::formula::gnomonic_intersection<double, bg::formula::vincenty_inverse, bg::formula::vincenty_direct> + ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid); + result.lon *= r2d; + result.lat *= r2d; + check_result(result, results.gnomonic_vincenty, results.sjoberg_vincenty, 0.00000001, check_reference_only); + } + + if (results.gnomonic_thomas.lon != ND) + { + bg::formula::gnomonic_intersection<double, bg::strategy::thomas::inverse, bg::strategy::thomas::direct> + ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid); + result.lon *= r2d; + result.lat *= r2d; + check_result(result, results.gnomonic_thomas, results.sjoberg_vincenty, 0.0000001, check_reference_only); + } + + if (results.sjoberg_vincenty.lon != ND) + { + bg::formula::sjoberg_intersection<double, bg::formula::vincenty_inverse, 4> + ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid); + result.lon *= r2d; + result.lat *= r2d; + check_result(result, results.sjoberg_vincenty, results.sjoberg_vincenty, 0.00000001, check_reference_only); + } + + if (results.sjoberg_thomas.lon != ND) + { + bg::formula::sjoberg_intersection<double, bg::formula::thomas_inverse, 2> + ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid); + result.lon *= r2d; + result.lat *= r2d; + check_result(result, results.sjoberg_thomas, results.sjoberg_vincenty, 0.0000001, check_reference_only); + } + + if (results.sjoberg_andoyer.lon != ND) + { + bg::formula::sjoberg_intersection<double, bg::formula::andoyer_inverse, 1> + ::apply(lona1r, lata1r, lona2r, lata2r, lonb1r, latb1r, lonb2r, latb2r, result.lon, result.lat, spheroid); + result.lon *= r2d; + result.lat *= r2d; + check_result(result, results.sjoberg_andoyer, results.sjoberg_vincenty, 0.0001, check_reference_only); + } + + if (results.great_elliptic.lon != ND) + { + typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree> > point_geo; + typedef bg::model::point<double, 3, bg::cs::cartesian> point_3d; + point_geo a1(results.p1.lon, results.p1.lat); + point_geo a2(results.p2.lon, results.p2.lat); + point_geo b1(results.q1.lon, results.q1.lat); + point_geo b2(results.q2.lon, results.q2.lat); + point_3d a1v = bg::formula::geo_to_cart3d<point_3d>(a1, spheroid); + point_3d a2v = bg::formula::geo_to_cart3d<point_3d>(a2, spheroid); + point_3d b1v = bg::formula::geo_to_cart3d<point_3d>(b1, spheroid); + point_3d b2v = bg::formula::geo_to_cart3d<point_3d>(b2, spheroid); + point_3d resv(0, 0, 0); + point_geo res(0, 0); + bg::formula::great_elliptic_intersection(a1v, a2v, b1v, b2v, resv, spheroid); + res = bg::formula::cart3d_to_geo<point_geo>(resv, spheroid); + result.lon = bg::get<0>(res); + result.lat = bg::get<1>(res); + check_result(result, results.great_elliptic, results.sjoberg_vincenty, 0.01, check_reference_only); + } +} + +void test_4_input_combinations(expected_results const& results, bool check_reference_only) +{ + test_formulas(results, check_reference_only); + +#ifdef BOOST_GEOMETRY_TEST_GEO_INTERSECTION_TEST_SIMILAR + { + expected_results results_alt = results; + std::swap(results_alt.p1, results_alt.p2); + test_formulas(results_alt, true); + } + { + expected_results results_alt = results; + std::swap(results_alt.q1, results_alt.q2); + test_formulas(results_alt, true); + } + { + expected_results results_alt = results; + std::swap(results_alt.p1, results_alt.p2); + std::swap(results_alt.q1, results_alt.q2); + test_formulas(results_alt, true); + } +#endif +} + +void test_all(expected_results const& results) +{ + test_4_input_combinations(results, false); + +#ifdef BOOST_GEOMETRY_TEST_GEO_INTERSECTION_TEST_SIMILAR + expected_results results_alt = results; + results_alt.p1.lat *= -1; + results_alt.p2.lat *= -1; + results_alt.q1.lat *= -1; + results_alt.q2.lat *= -1; + results_alt.gnomonic_vincenty.lat *= -1; + results_alt.gnomonic_thomas.lat *= -1; + results_alt.sjoberg_vincenty.lat *= -1; + results_alt.sjoberg_thomas.lat *= -1; + results_alt.sjoberg_andoyer.lat *= -1; + results_alt.great_elliptic.lat *= -1; + test_4_input_combinations(results_alt, true); +#endif +} + +void test_bugs() +{ + // https://github.com/boostorg/geometry/issues/612 + { + double lon, lat; + bg::formula::sjoberg_intersection<double, bg::formula::andoyer_inverse, 1> + ::apply(-0.0872665, -0.0872665, -0.0872665, 0.0872665, + 0.0, 1.57e-07, -0.392699, 1.57e-07, + lon, lat, bg::srs::spheroid<double>()); + check_one("issue 612", lon, -0.087266500535674751); + check_one("issue 612", lat, 1.5892499139622920e-07); + } +} + +int test_main(int, char*[]) +{ + for (size_t i = 0; i < expected_size; ++i) + { + test_all(expected[i]); + } + + test_bugs(); + + return 0; +} diff --git a/src/boost/libs/geometry/test/formulas/intersection_cases.hpp b/src/boost/libs/geometry/test/formulas/intersection_cases.hpp new file mode 100644 index 00000000..8fdcdb52 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/intersection_cases.hpp @@ -0,0 +1,335 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2016 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP +#define BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP + +struct coordinates +{ + double lon; + double lat; +}; + +struct expected_result +{ + double lon; + double lat; +}; + +struct expected_results +{ + coordinates p1; + coordinates p2; + coordinates q1; + coordinates q2; + expected_result gnomonic_vincenty; + expected_result gnomonic_thomas; + expected_result sjoberg_vincenty; + expected_result sjoberg_thomas; + expected_result sjoberg_andoyer; + expected_result great_elliptic; +}; + +#define ND 1000 + +expected_results expected[] = +{ + { + { -1, -1 },{ 1, 1 }, + { -1, 1 },{ 1, -1 }, + { 0.0000000000000000, 0.0000000000000000 }, + { 0.0000000000000000, 0.0000000000000000 }, + { 0.0000000000626537, -0.0000000000000000 }, + { -0.0000000187861002, -0.0000000000000000 }, + { -0.0000055778585615, -0.0000000000000000 }, + { -0.0000000000000000, -0.0000000000000000 } + },{ + // TODO: Newton method in Sjoberg formula is not used in this case + // due to f1 - f2 == 0. The other method is used instead. + // Hence different results. Look into this. + { 1, 1 },{ -1, -1 }, + { -1, 1 },{ 1, -1 }, + { 0.0000000000000000, 0.0000000000000000 }, + { 0.0000000000000000, 0.0000000000000000 }, + { 0.0000000000000000, 0.0000000000626632 }, + { -0.0000000000000006, -0.0000000187889745 }, + { -0.0000000000000001, -0.0000055787431353 }, + { -0.0000000000000000, 0.0000000000000000 } + },{ + // TODO: Newton method in Sjoberg formula is not used in this case + // due to f1 - f2 == 0. The other method is used instead. + // Hence different results. Look into this. + { -1, -1 },{ 1, 1 }, + { 1, -1 },{ -1, 1 }, + { 0.0000000000000000, 0.0000000000000000 }, + { 0.0000000000000000, 0.0000000000000000 }, + { -0.0000000000000000, -0.0000000000626632 }, + { -0.0000000000000004, 0.0000000187889746 }, + { 0.0000000000000001, 0.0000055787431353 }, + { 0.0000000000000000, 0.0000000000000000 } + },{ + { 1, 1 },{ -1, -1 }, + { 1, -1 },{ -1, 1 }, + { 0.0000000000000000, 0.0000000000000000 }, + { 0.0000000000000000, 0.0000000000000000 }, + { -0.0000000000626537, -0.0000000000000000 }, + { 0.0000000187860994, 0.0000000000000001 }, + { 0.0000055778585615, -0.0000000000000000 }, + { -0.0000000000000000, 0.0000000000000000 } + },{ + { 0, 0 },{ 1, 1 }, + { 0, 1 },{ 1, 0 }, + { 0.5000000000000000, 0.5000573755188470 }, + { 0.5000000000000000, 0.5000573755109839 }, + { 0.5000000000313266, 0.5000573755188389 }, + { 0.4999999906069524, 0.5000573755152582 }, + { 0.4999972102164753, 0.5000573755151276 }, + { 0.4999999999999999, 0.5000571197534014 } + },{ + { 1, 1 },{ 0, 0 }, + { 0, 1 },{ 1, 0 }, + { 0.5000000000000000, 0.5000573755188470 }, + { 0.5000000000000000, 0.5000573755109839 }, + { 0.5000000000000000, 0.5000573755501669 }, + { 0.4999999999999996, 0.5000573661218464 }, + { 0.4999999999999999, 0.5000545856093679 }, + { 0.4999999999999999, 0.5000571197534014 } + },{ + { 0, 0 },{ 1, 1 }, + { 1, 0 },{ 0, 1 }, + { 0.5000000000000000, 0.5000573755188470 }, + { 0.5000000000000000, 0.5000573755109839 }, + { 0.4999999999999999, 0.5000573754875109 }, + { 0.4999999999999999, 0.5000573849086647 }, + { 0.5000000000000000, 0.5000601654208935 }, + { 0.4999999999999999, 0.5000571197534014 } + },{ + { 1, 1 },{ 0, 0 }, + { 1, 0 },{ 0, 1 }, + { 0.5000000000000000, 0.5000573755188470 }, + { 0.5000000000000000, 0.5000573755109839 }, + { 0.4999999999686731, 0.5000573755188389 }, + { 0.5000000093930521, 0.5000573755152582 }, + { 0.5000027897835244, 0.5000573755151276 }, + { 0.4999999999999999, 0.5000571197534014 } + },{ + { 1, 1 }, {2, 2}, + {-2, -1}, {-1, -1}, + { ND, ND }, + { ND, ND }, + { -0.9981650042162076, -0.999999718164758 }, + { ND, ND }, + { ND, ND }, + { -0.9981731758085121, -0.9999997213000095 } + },{ + {-25, -31}, {3, 44}, + {-66, -14}, {-1, -1}, + { ND, ND }, + { ND, ND }, + { -15.83269406235058, -4.87746450262433 }, + { ND, ND }, + { ND, ND }, + { -15.82846301029918, -4.869650527718342 } + },{ + {-47, -8}, {-1, -4}, + {-40, -5}, {-5, -5}, + { ND, ND }, + { ND, ND }, + { -10.28209064194141, -5.124101297536392 }, + { ND, ND }, + { ND, ND }, + { -10.29663941896089, -5.123527178300465 } + }, { + {-43, -8}, {3, -4}, + {-43, -5}, {3, -7}, + { ND, ND }, + { ND, ND }, + { -19.95519754153282, -6.521540589691206 }, + { ND, ND }, + { ND, ND }, + { -19.95535387979888, -6.517861579906892 } + }, { + {-1, -17}, {-5, 3}, + {-40, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -3.424525475838061, -5.070550173747042 }, + { ND, ND }, + { ND, ND }, + { -3.424493504575876, -5.070060631936228 } + }, { + {-29, -4}, {-1, -5}, + {-40, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -0.9999999978280006, -5.00000000000684 }, + { ND, ND }, + { ND, ND }, + { -0.9999999999999919, -5 } + }, { + {-4, -6}, {-40, -5}, + {-40, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -40.00000000470697, -4.999999999854269 }, + { ND, ND }, + { ND, ND }, + { -40.00000000000003, -4.999999999999998 } + }, { + {5, -4}, {-25, -5}, + {-40, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -40.04870859732954, -4.998490166905039 }, + { ND, ND }, + { ND, ND }, + { -39.87674154148858, -5.003778171392734 } + }, { + {-44, -1}, {38, -7}, + {-54, -10}, {27, 3}, + { ND, ND }, + { ND, ND }, + { -12.49994722584679, -4.492062263169279 }, + { ND, ND }, + { ND, ND }, + { -12.49786552878283, -4.48224349980724 } + }, { + {-29, -5}, {10, -5}, + {-40, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -14.99999999880286, -5.280237387890117 }, + { ND, ND }, + { ND, ND }, + { -14.99999999999999, -5.278284829442087 } + }, { + {-29, -5}, {7, -5}, + {-40, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -12.68814198534678, -5.255404335144863 }, + { ND, ND }, + { ND, ND }, + { -12.68883814704657, -5.253634733357015 } + }, { + {-29, -5}, {2, -5}, + {-40, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -6.793546728871506, -5.153444544719724 }, + { ND, ND }, + { ND, ND }, + { -6.794933162619669, -5.152409434095275 } + }, { + {-29, -5}, {2, -5}, + {-30, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -22.13104411461423, -5.130155316882458 }, + { ND, ND }, + { ND, ND }, + { -22.13016591567375, -5.129277412801533 } + }, { + {-29, -5}, {2, -5}, + {-32, -5}, {-1, -5}, + { ND, ND }, + { ND, ND }, + { -14.99999999908104, -5.187213913248173 }, + { ND, ND }, + { ND, ND }, + { -15.00000000000009, -5.185931965560752 } + }, { + {-92, -24}, {44, 19}, + {-78, -5}, {50, -5}, + { ND, ND }, + { ND, ND }, + { -31.65127861442256, -10.84411293410938 }, + { ND, ND }, + { ND, ND }, + { -31.65294079308247, -10.76785432928444 } + }, { + {-93, -15}, {22, 3}, + {-78, -5}, {50, -5}, + { ND, ND }, + { ND, ND }, + { -32.33383382062637, -10.80295061031259 }, + { ND, ND }, + { ND, ND }, + { -32.26069578187354, -10.73176059393484 } + }, { + {-93, -15}, {28, 3}, + {-78, -5}, {50, -5}, + { ND, ND }, + { ND, ND }, + { -25.71257598566304, -11.13752154787724 }, + { ND, ND }, + { ND, ND }, + { -25.67761999514295, -11.05881610957402 } + }, { + {-54, -21}, {20, 17}, + {-59, -5}, {13, -5}, + { ND, ND }, + { ND, ND }, + { -22.96397490169162, -6.181426780426698 }, + { ND, ND }, + { ND, ND }, + { -22.95999443662035, -6.172089364736989 } + }, { + {-31, -10}, {-31, -2}, + {-37, -10}, {-25, -2}, + { ND, ND }, + { ND, ND }, + { -31.00000000000001, -6.062729839503469 }, + { ND, ND }, + { ND, ND }, + { -31, -6.062411484514648 } + }, { + {-26, -10}, {-26, 13}, + {-37, -4}, {-18, -4}, + { ND, ND }, + { ND, ND }, + { -25.99999999999969, -4.05441766735837 }, + { ND, ND }, + { ND, ND }, + { -26, -4.05405101510235 } + }, { + {-26, -10}, {154, 78}, + {-46, 41}, {-13, 36}, + { ND, ND }, + { ND, ND }, + { -26, 39.19492836828103 }, + { ND, ND }, + { ND, ND }, + { -26, 39.19004133747198 } + }, { + {-26, -10}, {154, 68}, + {-85, 79}, {22, 80}, + { ND, ND }, + { ND, ND }, + { -26.00000000000013, 83.7164889918963 }, + { ND, ND }, + { ND, ND }, + { -26.00000000000002, 83.71603758698208 } + }, { + {-25, 55}, {155, 68}, + {178, 79}, {124, 80}, + { ND, ND }, + { ND, ND }, + { 155, 80.55982670305147 }, + { ND, ND }, + { ND, ND }, + { 155, 80.55961176607357 } + } +}; + +size_t const expected_size = sizeof(expected) / sizeof(expected_results); + +#endif // BOOST_GEOMETRY_TEST_INTERSECTION_CASES_HPP diff --git a/src/boost/libs/geometry/test/formulas/inverse.cpp b/src/boost/libs/geometry/test/formulas/inverse.cpp new file mode 100644 index 00000000..cab67820 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/inverse.cpp @@ -0,0 +1,93 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2016-2019 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan. + +// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + + +#include <sstream> + +#include "test_formula.hpp" +#include "inverse_cases.hpp" + +#include <boost/geometry/formulas/vincenty_inverse.hpp> +#include <boost/geometry/formulas/thomas_inverse.hpp> +#include <boost/geometry/formulas/andoyer_inverse.hpp> + +#include <boost/geometry/srs/spheroid.hpp> + +template <typename Result> +void check_inverse(std::string const& name, + Result const& results, + bg::formula::result_inverse<double> const& result, + expected_result const& expected, + expected_result const& reference, + double reference_error) +{ + std::stringstream ss; + ss << "(" << results.p1.lon << " " << results.p1.lat << ")->(" << results.p2.lon << " " << results.p2.lat << ")"; + + check_one(name + "_d " + ss.str(), + result.distance, expected.distance, reference.distance, reference_error); + check_one(name + "_a " + ss.str(), + result.azimuth, expected.azimuth, reference.azimuth, reference_error, true); + check_one(name + "_ra " + ss.str(), + result.reverse_azimuth, expected.reverse_azimuth, reference.reverse_azimuth, reference_error, true); + check_one(name + "_rl " + ss.str(), + result.reduced_length, expected.reduced_length, reference.reduced_length, reference_error); + check_one(name + "_gs " + ss.str(), + result.geodesic_scale, expected.geodesic_scale, reference.geodesic_scale, reference_error); +} + +void test_all(expected_results const& results) +{ + double const d2r = bg::math::d2r<double>(); + double const r2d = bg::math::r2d<double>(); + + double lon1r = results.p1.lon * d2r; + double lat1r = results.p1.lat * d2r; + double lon2r = results.p2.lon * d2r; + double lat2r = results.p2.lat * d2r; + + // WGS84 + bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793); + + bg::formula::result_inverse<double> result_v, result_t, result_a; + + typedef bg::formula::vincenty_inverse<double, true, true, true, true, true> vi_t; + result_v = vi_t::apply(lon1r, lat1r, lon2r, lat2r, spheroid); + result_v.azimuth *= r2d; + result_v.reverse_azimuth *= r2d; + check_inverse("vincenty", results, result_v, results.vincenty, results.reference, 0.0000001); + + typedef bg::formula::thomas_inverse<double, true, true, true, true, true> th_t; + result_t = th_t::apply(lon1r, lat1r, lon2r, lat2r, spheroid); + result_t.azimuth *= r2d; + result_t.reverse_azimuth *= r2d; + check_inverse("thomas", results, result_t, results.thomas, results.reference, 0.00001); + + typedef bg::formula::andoyer_inverse<double, true, true, true, true, true> an_t; + result_a = an_t::apply(lon1r, lat1r, lon2r, lat2r, spheroid); + result_a.azimuth *= r2d; + result_a.reverse_azimuth *= r2d; + check_inverse("andoyer", results, result_a, results.andoyer, results.reference, 0.001); +} + +int test_main(int, char*[]) +{ + for (size_t i = 0; i < expected_size; ++i) + { + test_all(expected[i]); + } + + return 0; +} diff --git a/src/boost/libs/geometry/test/formulas/inverse_cases.hpp b/src/boost/libs/geometry/test/formulas/inverse_cases.hpp new file mode 100644 index 00000000..b3b868d5 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/inverse_cases.hpp @@ -0,0 +1,605 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2016-2017 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_INVERSE_CASES_HPP +#define BOOST_GEOMETRY_TEST_INVERSE_CASES_HPP + +struct coordinates +{ + double lon; + double lat; +}; + +struct expected_result +{ + double distance; + double azimuth; + double reverse_azimuth; + double reduced_length; + double geodesic_scale; +}; + +struct expected_results +{ + coordinates p1; + coordinates p2; + expected_result reference; // karney or vincenty + expected_result vincenty; + expected_result thomas; + expected_result andoyer; + +}; + +expected_results expected[] = +{ + { + { 0, 0 },{ 2, 0 }, + { 222638.98158654713188298047, 90.00000000000000000000, 90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 }, + { 222638.98158645280636847019, 90.00000000000000000000, 90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 }, + { 222638.98158654122380539775, 90.00000000000000000000, 90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 }, + { 222638.98158654125290922821, 90.00000000000000000000, 90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 } + },{ + { 0, 0 },{ 2, 2 }, + { 313775.70942918420769274235, 45.17488858648466987233, 45.20980230803674970730, 313648.30600607168162241578, 0.99878199603375228399 }, + { 313775.70929574419278651476, 45.17488858646600391467, 45.20980230801805532792, 313648.30601466231746599078, 0.99878199603375328319 }, + { 313775.70869052573107182980, 45.17488750916628958976, 45.20980122940459722258, 313648.30008120078127831221, 0.99878199607986462016 }, + { 313772.17715740547282621264, 45.17456700769592004008, 45.20948072916769433505, 313646.54128309490624815226, 0.99878200978130526888 } + },{ + { 0, 0 },{ 0, 2 }, + { 221149.45337213488528504968, 0.00000000000000000000, 0.00000000000000000000, 221104.84592454897938296199, 0.99939490135383823866 }, + { 221149.45318342180689796805, 0.00000000000000000000, 0.00000000000000000000, 221104.84593068063259124756, 0.99939490135383812763 }, + { 221149.45337045041378587484, 0.00000000000000000000, 0.00000000000000000000, 221104.84593068063259124756, 0.99939490135383812763 }, + { 221146.95820782837108708918, 0.00000000000000002350, 0.00000000000000002350, 221104.84893554644077084959, 0.99939490135383812763 } + },{ + { 0, 0 },{ -2, 2 }, + { 313775.70942918420769274235, -45.17488858648466987233, -45.20980230803674970730, 313648.30600607168162241578, 0.99878199603375228399 }, + { 313775.70929574419278651476, -45.17488858646600391467, -45.20980230801805532792, 313648.30601466231746599078, 0.99878199603375328319 }, + { 313775.70869052573107182980, -45.17488750916629669518, -45.20980122940459722258, 313648.30008120078127831221, 0.99878199607986462016 }, + { 313772.17715740547282621264, -45.17456700769592004008, -45.20948072916767301876, 313646.54128309484804049134, 0.99878200978130526888 } + },{ + { 0, 0 },{ -2, 0 }, + { 222638.98158654713188298047, -90.00000000000000000000, -90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 }, + { 222638.98158645280636847019, -90.00000000000000000000, -90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 }, + { 222638.98158654122380539775, -90.00000000000000000000, -90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 }, + { 222638.98158654125290922821, -90.00000000000000000000, -90.00000000000000000000, 222593.46652303214068524539, 0.99938672191946420487 } + },{ + { 0, 0 },{ -2, -2 }, + { 313775.70942918420769274235, -134.82511141351534433852, -134.79019769196324318727, 313648.30600607168162241578, 0.99878199603375228399 }, + { 313775.70929574419278651476, -134.82511141353401740162, -134.79019769198197309379, 313648.30601466225925832987, 0.99878199603375317217 }, + { 313775.70869052573107182980, -134.82511249083370330482, -134.79019877059539567199, 313648.30008120083948597312, 0.99878199607986462016 }, + { 313772.17715740547282621264, -134.82543299230408706535, -134.79051927083230566495, 313646.54128309502266347408, 0.99878200978130537990 } + },{ + { 0, 0 },{ 0, -2 }, + { 221149.45337213488528504968, -180.00000000000000000000, -180.00000000000000000000, 221104.84592454897938296199, 0.99939490135383823866 }, + { 221149.45318342180689796805, 180.00000000000000000000, 180.00000000000000000000, 221104.84593068063259124756, 0.99939490135383812763 }, + { 221149.45337045041378587484, 180.00000000000000000000, 180.00000000000000000000, 221104.84593068063259124756, 0.99939490135383812763 }, + { 221146.95820782837108708918, 180.00000000000000000000, 180.00000000000000000000, 221104.84893554644077084959, 0.99939490135383812763 } + },{ + { 0, 0 },{ 2, -2 }, + { 313775.70942918420769274235, 134.82511141351534433852, 134.79019769196324318727, 313648.30600607168162241578, 0.99878199603375228399 }, + { 313775.70929574419278651476, 134.82511141353401740162, 134.79019769198197309379, 313648.30601466225925832987, 0.99878199603375317217 }, + { 313775.70869052573107182980, 134.82511249083370330482, 134.79019877059539567199, 313648.30008120083948597312, 0.99878199607986462016 }, + { 313772.17715740547282621264, 134.82543299230408706535, 134.79051927083230566495, 313646.54128309502266347408, 0.99878200978130537990 } + },{ + { -1, 0 },{ 2, 0 }, + { 333958.47237982071237638593, 90.00000000000000000000, 90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 }, + { 333958.47237967920955270529, 90.00000000000000000000, 90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 }, + { 333958.47237982566002756357, 90.00000000000000000000, 90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 }, + { 333958.47237982566002756357, 90.00000000000000000000, 90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 } + },{ + { -1, 0 },{ 2, 2 }, + { 400487.62166116386651992798, 56.46443555420994186989, 56.51681282834063324572, 400222.73679570353124290705, 0.99801604059094650712 }, + { 400487.62155657896073535085, 56.46443555419775606197, 56.51681282832842612152, 400222.73680666065774857998, 0.99801604059094761734 }, + { 400487.62116943788714706898, 56.46443456250134573793, 56.51681183466060787168, 400222.72635490150423720479, 0.99801604069467231284 }, + { 400484.31980028707766905427, 56.46436757836366382435, 56.51674485214859089410, 400222.02724612434394657612, 0.99801604768666130063 } + },{ + { -1, 0 },{ 0, 2 }, + { 247576.47264764847932383418, 26.70874628270370010341, 26.72620180544743817563, 247513.88750887679634615779, 0.99924166327570262958 }, + { 247576.47247877591871656477, 26.70874628267113948255, 26.72620180541484202763, 247513.88751566910650581121, 0.99924166327570307367 }, + { 247576.47204536388744600117, 26.70874541733553186873, 26.72620093942252594843, 247513.88563483985490165651, 0.99924166328723251773 }, + { 247573.34468778557493351400, 26.70817834948789482041, 26.72563387223648589952, 247512.65741612159763462842, 0.99924167083675718981 } + },{ + { -1, 0 },{ -2, 2 }, + { 247576.47264764847932383418, -26.70874628270370010341, -26.72620180544743817563, 247513.88750887679634615779, 0.99924166327570262958 }, + { 247576.47247877591871656477, -26.70874628267113948255, -26.72620180541484202763, 247513.88751566910650581121, 0.99924166327570307367 }, + { 247576.47204536388744600117, -26.70874541733554607958, -26.72620093942252594843, 247513.88563483985490165651, 0.99924166328723251773 }, + { 247573.34468778557493351400, -26.70817834948789482041, -26.72563387223651432123, 247512.65741612159763462842, 0.99924167083675718981 } + },{ + { -1, 0 },{ -2, 0 }, + { 111319.49079327356594149023, -90.00000000000000000000, -90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 }, + { 111319.49079322640318423510, -90.00000000000000000000, -90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 }, + { 111319.49079326246283017099, -90.00000000000000000000, -90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 }, + { 111319.49079326246283017099, -90.00000000000000000000, -90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 } + },{ + { -1, 0 },{ -2, -2 }, + { 247576.47264764847932383418, -153.29125371729628568573, -153.27379819455256892979, 247513.88750887679634615779, 0.99924166327570262958 }, + { 247576.47247877591871656477, -153.29125371732885696474, -153.27379819458516863051, 247513.88751566907740198076, 0.99924166327570307367 }, + { 247576.47204536388744600117, -153.29125458266443615685, -153.27379906057745984072, 247513.88563483985490165651, 0.99924166328723251773 }, + { 247573.34468778557493351400, -153.29182165051210517959, -153.27436612776349988962, 247512.65741612162673845887, 0.99924167083675718981 } + },{ + { -1, 0 },{ 0, -2 }, + { 247576.47264764847932383418, 153.29125371729628568573, 153.27379819455256892979, 247513.88750887679634615779, 0.99924166327570262958 }, + { 247576.47247877591871656477, 153.29125371732885696474, 153.27379819458516863051, 247513.88751566907740198076, 0.99924166327570307367 }, + { 247576.47204536388744600117, 153.29125458266446457856, 153.27379906057745984072, 247513.88563483985490165651, 0.99924166328723251773 }, + { 247573.34468778557493351400, 153.29182165051210517959, 153.27436612776349988962, 247512.65741612162673845887, 0.99924167083675718981 } + },{ + { -1, 0 },{ 2, -2 }, + { 400487.62166116386651992798, 123.53556444579005813011, 123.48318717165936675428, 400222.73679570353124290705, 0.99801604059094650712 }, + { 400487.62155657896073535085, 123.53556444580226525431, 123.48318717167158808934, 400222.73680666059954091907, 0.99801604059094761734 }, + { 400487.62116943788714706898, 123.53556543749867557835, 123.48318816533939923374, 400222.72635490150423720479, 0.99801604069467231284 }, + { 400484.31980028707766905427, 123.53563242163632196480, 123.48325514785142331675, 400222.02724612434394657612, 0.99801604768666130063 } + },{ + { 1, 0 },{ 2, 0 }, + { 111319.49079327356594149023, 90.00000000000000000000, 90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 }, + { 111319.49079322640318423510, 90.00000000000000000000, 90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 }, + { 111319.49079326246283017099, 90.00000000000000000000, 90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 }, + { 111319.49079326246283017099, 90.00000000000000000000, 90.00000000000000000000, 111313.80114861292531713843, 0.99984666872462601983 } + },{ + { 1, 0 },{ 2, 2 }, + { 247576.47264764847932383418, 26.70874628270370010341, 26.72620180544743817563, 247513.88750887679634615779, 0.99924166327570262958 }, + { 247576.47247877591871656477, 26.70874628267113948255, 26.72620180541484202763, 247513.88751566910650581121, 0.99924166327570307367 }, + { 247576.47204536388744600117, 26.70874541733553186873, 26.72620093942252594843, 247513.88563483985490165651, 0.99924166328723251773 }, + { 247573.34468778557493351400, 26.70817834948789482041, 26.72563387223648589952, 247512.65741612159763462842, 0.99924167083675718981 } + },{ + { 1, 0 },{ 0, 2 }, + { 247576.47264764847932383418, -26.70874628270370010341, -26.72620180544743817563, 247513.88750887679634615779, 0.99924166327570262958 }, + { 247576.47247877591871656477, -26.70874628267113948255, -26.72620180541484202763, 247513.88751566910650581121, 0.99924166327570307367 }, + { 247576.47204536388744600117, -26.70874541733554607958, -26.72620093942252594843, 247513.88563483985490165651, 0.99924166328723251773 }, + { 247573.34468778557493351400, -26.70817834948789482041, -26.72563387223651432123, 247512.65741612159763462842, 0.99924167083675718981 } + },{ + { 1, 0 },{ -2, 2 }, + { 400487.62166116386651992798, -56.46443555420994186989, -56.51681282834063324572, 400222.73679570353124290705, 0.99801604059094650712 }, + { 400487.62155657896073535085, -56.46443555419775606197, -56.51681282832842612152, 400222.73680666065774857998, 0.99801604059094761734 }, + { 400487.62116943788714706898, -56.46443456250133863250, -56.51681183466062918797, 400222.72635490167886018753, 0.99801604069467231284 }, + { 400484.31980028707766905427, -56.46436757836366382435, -56.51674485214855536697, 400222.02724612399470061064, 0.99801604768666130063 } + },{ + { 1, 0 },{ -2, 0 }, + { 333958.47237982071237638593, -90.00000000000000000000, -90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 }, + { 333958.47237967920955270529, -90.00000000000000000000, -90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 }, + { 333958.47237982566002756357, -90.00000000000000000000, -90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 }, + { 333958.47237982566002756357, -90.00000000000000000000, -90.00000000000000000000, 333804.87081722758011892438, 0.99862030063297502203 } + },{ + { 1, 0 },{ -2, -2 }, + { 400487.62166116386651992798, -123.53556444579005813011, -123.48318717165936675428, 400222.73679570353124290705, 0.99801604059094650712 }, + { 400487.62155657896073535085, -123.53556444580226525431, -123.48318717167158808934, 400222.73680666059954091907, 0.99801604059094761734 }, + { 400487.62116943788714706898, -123.53556543749867557835, -123.48318816533941344460, 400222.72635490121319890022, 0.99801604069467231284 }, + { 400484.31980028707766905427, -123.53563242163632196480, -123.48325514785139489504, 400222.02724612463498488069, 0.99801604768666130063 } + },{ + { 1, 0 },{ 0, -2 }, + { 247576.47264764847932383418, -153.29125371729628568573, -153.27379819455256892979, 247513.88750887679634615779, 0.99924166327570262958 }, + { 247576.47247877591871656477, -153.29125371732885696474, -153.27379819458516863051, 247513.88751566907740198076, 0.99924166327570307367 }, + { 247576.47204536388744600117, -153.29125458266443615685, -153.27379906057745984072, 247513.88563483985490165651, 0.99924166328723251773 }, + { 247573.34468778557493351400, -153.29182165051210517959, -153.27436612776349988962, 247512.65741612162673845887, 0.99924167083675718981 } + },{ + { 1, 0 },{ 2, -2 }, + { 247576.47264764847932383418, 153.29125371729628568573, 153.27379819455256892979, 247513.88750887679634615779, 0.99924166327570262958 }, + { 247576.47247877591871656477, 153.29125371732885696474, 153.27379819458516863051, 247513.88751566907740198076, 0.99924166327570307367 }, + { 247576.47204536388744600117, 153.29125458266446457856, 153.27379906057745984072, 247513.88563483985490165651, 0.99924166328723251773 }, + { 247573.34468778557493351400, 153.29182165051210517959, 153.27436612776349988962, 247512.65741612162673845887, 0.99924167083675718981 } + },{ + { 0, -1 },{ 2, 0 }, + { 248575.56516798117081634700, 63.59904041930798257454, 63.58158489649751743400, 248512.21908866314333863556, 0.99923553066716652715 }, + { 248575.56515735003631561995, 63.59904041929794260568, 63.58158489648748457057, 248512.21909045605571009219, 0.99923553066715220528 }, + { 248575.56501938513247296214, 63.59903955892717419829, 63.58158403677443004653, 248512.21158473053947091103, 0.99923553071334769715 }, + { 248574.11260137573117390275, 63.59909262487922632090, 63.58163710212382113696, 248512.67536870032199658453, 0.99923552785888392069 } + },{ + { 0, -1 },{ 2, 2 }, + { 399491.95531813317211344838, 33.86382331638844789268, 33.88128418166377286980, 399229.04036820423789322376, 0.99802588852441009859 }, + { 399491.95525925338733941317, 33.86382331636024645150, 33.88128418163555721776, 399229.04037646017968654633, 0.99802588850630413742 }, + { 399491.95420239900704473257, 33.86382231856556046523, 33.88128318318352683036, 399229.03571708954405039549, 0.99802588855242924115 }, + { 399486.91562757542124018073, 33.86329689027443379246, 33.88075775553439683563, 399226.58732164395041763783, 0.99802591281687313973 } + },{ + { 0, -1 },{ 0, 2 }, + { 331723.84192993369651958346, 0.00000000000000000000, 0.00000000000000000000, 331573.30333569750655442476, 0.99863870153788791839 }, + { 331723.84185956208966672421, 0.00000000000000000000, 0.00000000000000000000, 331573.30334328504977747798, 0.99863870152539924163 }, + { 331723.84192803525365889072, 0.00000000000000000000, 0.00000000000000000000, 331573.30334328504977747798, 0.99863870152539924163 }, + { 331720.09633564797695726156, 0.00000000000000002351, 0.00000000000000002350, 331573.30672345001948997378, 0.99863870151614875237 } + },{ + { 0, -1 },{ -2, 2 }, + { 399491.95531813317211344838, -33.86382331638844789268, -33.88128418166377286980, 399229.04036820423789322376, 0.99802588852441009859 }, + { 399491.95525925338733941317, -33.86382331636024645150, -33.88128418163555721776, 399229.04037646017968654633, 0.99802588850630413742 }, + { 399491.95420239900704473257, -33.86382231856555335980, -33.88128318318355525207, 399229.03571708960225805640, 0.99802588855242924115 }, + { 399486.91562757542124018073, -33.86329689027443379246, -33.88075775553439683563, 399226.58732164395041763783, 0.99802591281687313973 } + },{ + { 0, -1 },{ -2, 0 }, + { 248575.56516798117081634700, -63.59904041930798257454, -63.58158489649751743400, 248512.21908866314333863556, 0.99923553066716652715 }, + { 248575.56515735003631561995, -63.59904041929794260568, -63.58158489648748457057, 248512.21909045605571009219, 0.99923553066715220528 }, + { 248575.56501938513247296214, -63.59903955892717419829, -63.58158403677445846824, 248512.21158473053947091103, 0.99923553071334769715 }, + { 248574.11260137573117390275, -63.59909262487922632090, -63.58163710212379271525, 248512.67536870032199658453, 0.99923552785888392069 } + },{ + { 0, -1 },{ -2, -2 }, + { 248515.52773222429095767438, -116.44291541236518128244, -116.39055416434335654685, 248452.22805491264443844557, 0.99923590400821504787 }, + { 248515.52763759149820543826, -116.44291541237451781399, -116.39055416435273571096, 248452.22805559608968906105, 0.99923590407101092747 }, + { 248515.52758369332877919078, -116.44291626924928095832, -116.39055502319511958831, 248452.22057304141344502568, 0.99923590411705243142 }, + { 248514.07922688819235190749, -116.44286383106521043374, -116.39050258320843056481, 248452.68231273870333097875, 0.99923590134832673826 } + },{ + { 0, -1 },{ 0, -2 }, + { 110575.06481433614681009203, -180.00000000000000000000, -180.00000000000000000000, 110569.48860416181560140103, 0.99984871368918792900 }, + { 110575.06460189135395921767, 180.00000000000000000000, 180.00000000000000000000, 110569.48860883565794210881, 0.99984871370166705784 }, + { 110575.06481286860071122646, 180.00000000000000000000, 180.00000000000000000000, 110569.48860883565794210881, 0.99984871370166705784 }, + { 110573.82008000080531928688, 180.00000000000000000000, 180.00000000000000000000, 110569.49123749321734067053, 0.99984871370886085895 } + },{ + { 0, -1 },{ 2, -2 }, + { 248515.52773222429095767438, 116.44291541236518128244, 116.39055416434335654685, 248452.22805491264443844557, 0.99923590400821504787 }, + { 248515.52763759149820543826, 116.44291541237451781399, 116.39055416435273571096, 248452.22805559608968906105, 0.99923590407101092747 }, + { 248515.52758369332877919078, 116.44291626924930938003, 116.39055502319511958831, 248452.22057304164627566934, 0.99923590411705243142 }, + { 248514.07922688819235190749, 116.44286383106521043374, 116.39050258320843056481, 248452.68231273870333097875, 0.99923590134832673826 } + },{ + { 0, 1 },{ 2, 0 }, + { 248575.56516798117081634700, 116.40095958069201742546, 116.41841510350248256600, 248512.21908866314333863556, 0.99923553066716652715 }, + { 248575.56515735003631561995, 116.40095958070207871060, 116.41841510351252964028, 248512.21909045602660626173, 0.99923553066715220528 }, + { 248575.56501938513247296214, 116.40096044107282580171, 116.41841596322554153176, 248512.21158473062678240240, 0.99923553071334780817 }, + { 248574.11260137573117390275, 116.40090737512078078453, 116.41836289787615044133, 248512.67536870026378892362, 0.99923552785888392069 } + },{ + { 0, 1 },{ 2, 2 }, + { 248515.52773222429095767438, 63.55708458763482582299, 63.60944583565664345315, 248452.22805491264443844557, 0.99923590400821504787 }, + { 248515.52763759149820543826, 63.55708458762548218601, 63.60944583564726428904, 248452.22805559608968906105, 0.99923590407101092747 }, + { 248515.52758369332877919078, 63.55708373075069061997, 63.60944497680485909541, 248452.22057304115151055157, 0.99923590411705243142 }, + { 248514.07922688819235190749, 63.55713616893478246084, 63.60949741679156232976, 248452.68231273847050033510, 0.99923590134832684928 } + },{ + { 0, 1 },{ 0, 2 }, + { 110575.06481433614681009203, 0.00000000000000000000, 0.00000000000000000000, 110569.48860416181560140103, 0.99984871368918792900 }, + { 110575.06460189135395921767, 0.00000000000000000000, 0.00000000000000000000, 110569.48860883565794210881, 0.99984871370166705784 }, + { 110575.06481286860071122646, 0.00000000000000000000, 0.00000000000000000000, 110569.48860883565794210881, 0.99984871370166705784 }, + { 110573.82008000080531928688, 0.00000000000000002350, 0.00000000000000002350, 110569.49123749321734067053, 0.99984871370886085895 } + },{ + { 0, 1 },{ -2, 2 }, + { 248515.52773222429095767438, -63.55708458763482582299, -63.60944583565664345315, 248452.22805491264443844557, 0.99923590400821504787 }, + { 248515.52763759149820543826, -63.55708458762548218601, -63.60944583564726428904, 248452.22805559608968906105, 0.99923590407101092747 }, + { 248515.52758369332877919078, -63.55708373075070483083, -63.60944497680488041169, 248452.22057304150075651705, 0.99923590411705254244 }, + { 248514.07922688819235190749, -63.55713616893478246084, -63.60949741679156943519, 248452.68231273873243480921, 0.99923590134832684928 } + },{ + { 0, 1 },{ -2, 0 }, + { 248575.56516798117081634700, -116.40095958069201742546, -116.41841510350248256600, 248512.21908866314333863556, 0.99923553066716652715 }, + { 248575.56515735003631561995, -116.40095958070207871060, -116.41841510351252964028, 248512.21909045602660626173, 0.99923553066715220528 }, + { 248575.56501938513247296214, -116.40096044107282580171, -116.41841596322554153176, 248512.21158473062678240240, 0.99923553071334780817 }, + { 248574.11260137573117390275, -116.40090737512078078453, -116.41836289787615044133, 248512.67536870026378892362, 0.99923552785888392069 } + },{ + { 0, 1 },{ -2, -2 }, + { 399491.95531813317211344838, -146.13617668361155210732, -146.11871581833622713020, 399229.04036820423789322376, 0.99802588852441009859 }, + { 399491.95525925338733941317, -146.13617668363974644308, -146.11871581836444988767, 399229.04037646006327122450, 0.99802588850630413742 }, + { 399491.95420239900704473257, -146.13617768143444664020, -146.11871681681645895878, 399229.03571708971867337823, 0.99802588855242924115 }, + { 399486.91562757542124018073, -146.13670310972554489126, -146.11924224446559605894, 399226.58732164406683295965, 0.99802591281687325075 } + },{ + { 0, 1 },{ 0, -2 }, + { 331723.84192993369651958346, -180.00000000000000000000, -180.00000000000000000000, 331573.30333569750655442476, 0.99863870153788791839 }, + { 331723.84185956208966672421, 180.00000000000000000000, 180.00000000000000000000, 331573.30334328504977747798, 0.99863870152539924163 }, + { 331723.84192803525365889072, 180.00000000000000000000, 180.00000000000000000000, 331573.30334328504977747798, 0.99863870152539924163 }, + { 331720.09633564797695726156, 180.00000000000000000000, 180.00000000000000000000, 331573.30672345001948997378, 0.99863870151614875237 } + },{ + { 0, 1 },{ 2, -2 }, + { 399491.95531813317211344838, 146.13617668361155210732, 146.11871581833622713020, 399229.04036820423789322376, 0.99802588852441009859 }, + { 399491.95525925338733941317, 146.13617668363974644308, 146.11871581836444988767, 399229.04037646006327122450, 0.99802588850630413742 }, + { 399491.95420239900704473257, 146.13617768143444664020, 146.11871681681645895878, 399229.03571708971867337823, 0.99802588855242924115 }, + { 399486.91562757542124018073, 146.13670310972554489126, 146.11924224446559605894, 399226.58732164406683295965, 0.99802591281687325075 } + }, + { + { -1, -1 },{ 2, 0 }, + { 351772.23553088010521605611, 71.69677339271241578444, 71.67058676207953737958, 351592.72256732499226927757, 0.99846922689201267342 }, + { 351772.23552330053644254804, 71.69677339270522509196, 71.67058676207236089795, 351592.72256738768192008138, 0.99846922689200567902 }, + { 351772.23547190619865432382, 71.69677274795321864076, 71.67058611830732672843, 351592.71064292185474187136, 0.99846922699591911243 }, + { 351771.13000385620398446918, 71.69688960494077889507, 71.67070297450321447741, 351594.87308142206165939569, 0.99846920815167106156 } + }, { + { -1, -1 },{ 2, 2 }, + { 470675.27496387914288789034, 45.18799532476352709409, 45.21418997011227247640, 470245.32092262554215267301, 0.99726004843767979136 }, + { 470675.27491378918057307601, 45.18799532474472613330, 45.21418997009345730476, 470245.32093124865787103772, 0.99726004841255500022 }, + { 470675.27385581465205177665, 45.18799424651773222195, 45.21418889088008796762, 470245.31203990190988406539, 0.99726004851631100401 }, + { 470669.97387331607751548290, 45.18767381182056652733, 45.21386845703356982540, 470242.67608062457293272018, 0.99726007931332938394 } + }, { + { -1, -1 },{ 0, 2 }, + { 349898.53698544885264709592, 18.54804530050607525027, 18.55677506382081531910, 349721.87727315956726670265, 0.99848548653821667109 }, + { 349898.53691851865733042359, 18.54804530047409016902, 18.55677506378881247429, 349721.87728093314217403531, 0.99848548652432367323 }, + { 349898.53644461580552160740, 18.54804465014367664821, 18.55677441312981201804, 349721.87595040485030040145, 0.99848548653585678103 }, + { 349894.27001174906035885215, 18.54754137243966738424, 18.55627113576925424354, 349720.85020991315832361579, 0.99848549544738174344 } + }, { + { -1, -1 },{ -2, 2 }, + { 349898.53698544885264709592, -18.54804530050607525027, -18.55677506382081531910, 349721.87727315956726670265, 0.99848548653821667109 }, + { 349898.53691851865733042359, -18.54804530047409016902, -18.55677506378881247429, 349721.87728093314217403531, 0.99848548652432367323 }, + { 349898.53644461580552160740, -18.54804465014367664821, -18.55677441312981201804, 349721.87595040485030040145, 0.99848548653585678103 }, + { 349894.27001174906035885215, -18.54754137243966738424, -18.55627113576928266525, 349720.85020991315832361579, 0.99848549544738174344 } + }, { + { -1, -1 },{ -2, 0 }, + { 156899.56829134028521366417, -45.19676732164486310239, -45.18804022935886877121, 156883.63778222308610565960, 0.99969540695122460772 }, + { 156899.56827460310887545347, -45.19676732162573529195, -45.18804022933975517162, 156883.63778401838499121368, 0.99969540695121617002 }, + { 156899.56792193598812445998, -45.19676624219880523015, -45.18803915024161454994, 156883.63480984271154738963, 0.99969540696276681935 }, + { 156897.79947260793414898217, -45.19644594033049145310, -45.18771884804953486992, 156882.75281389255542308092, 0.99969541038810816325 } + }, { + { -1, -1 },{ -2, -2 }, + { 156876.14940188667969778180, -134.82952991582811819171, -134.80335129773999369718, 156860.22615479407249949872, 0.99969549952259184611 }, + { 156876.14925185780157335103, -134.82952991584656388113, -134.80335129775846780831, 156860.22615983051946386695, 0.99969549954768643918 }, + { 156876.14903264911845326424, -134.82953099167991695140, -134.80335237457535413341, 156860.22319510785746388137, 0.99969549955919845274 }, + { 156874.38594904550700448453, -134.82985169207830722371, -134.80367307400518939176, 156859.34477911840076558292, 0.99969550299904519353 } + }, { + { -1, -1 },{ 0, -2 }, + { 156876.14940188667969778180, 134.82952991582811819171, 134.80335129773999369718, 156860.22615479407249949872, 0.99969549952259184611 }, + { 156876.14925185780157335103, 134.82952991584656388113, 134.80335129775846780831, 156860.22615983051946386695, 0.99969549954768643918 }, + { 156876.14903264911845326424, 134.82953099167994537311, 134.80335237457538255512, 156860.22319510785746388137, 0.99969549955919856377 }, + { 156874.38594904550700448453, 134.82985169207830722371, 134.80367307400518939176, 156859.34477911840076558292, 0.99969550299904519353 } + }, { + { -1, -1 },{ 2, -2 }, + { 351676.50043935602298006415, 108.36087395536006283692, 108.28232205125480902552, 351497.13544799503870308399, 0.99847006808788085763 }, + { 351676.50037266127765178680, 108.36087395536665667350, 108.28232205126143128382, 351497.13543194788508117199, 0.99847006821303718738 }, + { 351676.50038040406070649624, 108.36087459655153963922, 108.28232269539883247944, 351497.12354394816793501377, 0.99847006831660412018 }, + { 351675.39839278126601129770, 108.36075825022818719390, 108.28220634670809374711, 351499.26940269087208434939, 0.99847004976658149111 } + }, { + { -1, 1 },{ 2, 0 }, + { 351772.23553088010521605611, 108.30322660728758421556, 108.32941323792046262042, 351592.72256732499226927757, 0.99846922689201267342 }, + { 351772.23552330053644254804, 108.30322660729477490804, 108.32941323792763910205, 351592.72256738756550475955, 0.99846922689200567902 }, + { 351772.23547190619865432382, 108.30322725204678135924, 108.32941388169267327157, 351592.71064292197115719318, 0.99846922699591911243 }, + { 351771.13000385620398446918, 108.30311039505922110493, 108.32929702549677131174, 351594.87308142217807471752, 0.99846920815167106156 } + }, { + { -1, 1 },{ 2, 2 }, + { 351676.50043935602298006415, 71.63912604463993716308, 71.71767794874519097448, 351497.13544799503870308399, 0.99847006808788085763 }, + { 351676.50037266127765178680, 71.63912604463332911564, 71.71767794873858292704, 351497.13543194829253479838, 0.99847006821303718738 }, + { 351676.50038040406070649624, 71.63912540344847457163, 71.71767730460115330970, 351497.12354394729482010007, 0.99847006831660423121 }, + { 351675.39839278126601129770, 71.63924174977181280610, 71.71779365329189204203, 351499.26940269029000774026, 0.99847004976658149111 } + }, { + { -1, 1 },{ 0, 2 }, + { 156876.14940188667969778180, 45.17047008417186759743, 45.19664870225999919739, 156860.22615479407249949872, 0.99969549952259184611 }, + { 156876.14925185780157335103, 45.17047008415342190801, 45.19664870224154640255, 156860.22615983063587918878, 0.99969549954768632816 }, + { 156876.14903264911845326424, 45.17046900832006883775, 45.19664762542461744488, 156860.22319510774104855955, 0.99969549955919845274 }, + { 156874.38594904550700448453, 45.17014830792169988172, 45.19632692599481060824, 156859.34477911831345409155, 0.99969550299904519353 } + }, { + { -1, 1 },{ -2, 2 }, + { 156876.14940188667969778180, -45.17047008417186759743, -45.19664870225999919739, 156860.22615479407249949872, 0.99969549952259184611 }, + { 156876.14925185780157335103, -45.17047008415342190801, -45.19664870224154640255, 156860.22615983063587918878, 0.99969549954768632816 }, + { 156876.14903264911845326424, -45.17046900832009015403, -45.19664762542463876116, 156860.22319510785746388137, 0.99969549955919856377 }, + { 156874.38594904550700448453, -45.17014830792169988172, -45.19632692599484613538, 156859.34477911848807707429, 0.99969550299904519353 } + }, { + { -1, 1 },{ -2, 0 }, + { 156899.56829134028521366417, -134.80323267835512979218, -134.81195977064112412336, 156883.63778222308610565960, 0.99969540695122460772 }, + { 156899.56827460310887545347, -134.80323267837425760263, -134.81195977066025193380, 156883.63778401838499121368, 0.99969540695121617002 }, + { 156899.56792193598812445998, -134.80323375780119476985, -134.81196084975837834463, 156883.63480984274065122008, 0.99969540696276681935 }, + { 156897.79947260793414898217, -134.80355405966952275776, -134.81228115195048644637, 156882.75281389255542308092, 0.99969541038810816325 } + }, { + { -1, 1 },{ -2, -2 }, + { 349898.53698544885264709592, -161.45195469949391053888, -161.44322493617917757547, 349721.87727315956726670265, 0.99848548653821667109 }, + { 349898.53691851865733042359, -161.45195469952594180540, -161.44322493621118042029, 349721.87728093314217403531, 0.99848548652432367323 }, + { 349898.53644461580552160740, -161.45195534985634822078, -161.44322558687019864010, 349721.87595040485030040145, 0.99848548653585678103 }, + { 349894.27001174906035885215, -161.45245862756033261576, -161.44372886423073509832, 349720.85020991315832361579, 0.99848549544738174344 } + }, { + { -1, 1 },{ 0, -2 }, + { 349898.53698544885264709592, 161.45195469949391053888, 161.44322493617917757547, 349721.87727315956726670265, 0.99848548653821667109 }, + { 349898.53691851865733042359, 161.45195469952594180540, 161.44322493621118042029, 349721.87728093314217403531, 0.99848548652432367323 }, + { 349898.53644461580552160740, 161.45195534985634822078, 161.44322558687019864010, 349721.87595040485030040145, 0.99848548653585678103 }, + { 349894.27001174906035885215, 161.45245862756033261576, 161.44372886423073509832, 349720.85020991315832361579, 0.99848549544738174344 } + }, { + { -1, 1 },{ 2, -2 }, + { 470675.27496387914288789034, 134.81200467523646580048, 134.78581002988772752360, 470245.32092262554215267301, 0.99726004843767979136 }, + { 470675.27491378918057307601, 134.81200467525528097212, 134.78581002990657111695, 470245.32093124854145571589, 0.99726004841255500022 }, + { 470675.27385581465205177665, 134.81200575348228198891, 134.78581110911991913781, 470245.31203990190988406539, 0.99726004851631100401 }, + { 470669.97387331607751548290, 134.81232618817941215639, 134.78613154296644438546, 470242.67608062474755570292, 0.99726007931332960599 } + }, { + { 1, 1 },{ 2, 0 }, + { 156899.56829134028521366417, 134.80323267835512979218, 134.81195977064112412336, 156883.63778222308610565960, 0.99969540695122460772 }, + { 156899.56827460310887545347, 134.80323267837425760263, 134.81195977066025193380, 156883.63778401838499121368, 0.99969540695121617002 }, + { 156899.56792193598812445998, 134.80323375780122319156, 134.81196084975840676634, 156883.63480984268244355917, 0.99969540696276681935 }, + { 156897.79947260793414898217, 134.80355405966952275776, 134.81228115195048644637, 156882.75281389255542308092, 0.99969541038810816325 } + }, { + { 1, 1 },{ 2, 2 }, + { 156876.14940188667969778180, 45.17047008417186759743, 45.19664870225999919739, 156860.22615479407249949872, 0.99969549952259184611 }, + { 156876.14925185780157335103, 45.17047008415342190801, 45.19664870224154640255, 156860.22615983063587918878, 0.99969549954768632816 }, + { 156876.14903264911845326424, 45.17046900832006883775, 45.19664762542461744488, 156860.22319510774104855955, 0.99969549955919845274 }, + { 156874.38594904550700448453, 45.17014830792169988172, 45.19632692599481060824, 156859.34477911831345409155, 0.99969550299904519353 } + }, { + { 1, 1 },{ 0, 2 }, + { 156876.14940188667969778180, -45.17047008417186759743, -45.19664870225999919739, 156860.22615479407249949872, 0.99969549952259184611 }, + { 156876.14925185780157335103, -45.17047008415342190801, -45.19664870224154640255, 156860.22615983063587918878, 0.99969549954768632816 }, + { 156876.14903264911845326424, -45.17046900832009015403, -45.19664762542463876116, 156860.22319510785746388137, 0.99969549955919856377 }, + { 156874.38594904550700448453, -45.17014830792169988172, -45.19632692599484613538, 156859.34477911848807707429, 0.99969550299904519353 } + }, { + { 1, 1 },{ -2, 2 }, + { 351676.50043935602298006415, -71.63912604463993716308, -71.71767794874519097448, 351497.13544799503870308399, 0.99847006808788085763 }, + { 351676.50037266127765178680, -71.63912604463332911564, -71.71767794873858292704, 351497.13543194829253479838, 0.99847006821303718738 }, + { 351676.50038040406070649624, -71.63912540344847457163, -71.71767730460118173141, 351497.12354394828435033560, 0.99847006831660412018 }, + { 351675.39839278126601129770, -71.63924174977181280610, -71.71779365329184940947, 351499.26940268895123153925, 0.99847004976658171316 } + }, { + { 1, 1 },{ -2, 0 }, + { 351772.23553088010521605611, -108.30322660728758421556, -108.32941323792046262042, 351592.72256732499226927757, 0.99846922689201267342 }, + { 351772.23552330053644254804, -108.30322660729477490804, -108.32941323792763910205, 351592.72256738756550475955, 0.99846922689200567902 }, + { 351772.23547190619865432382, -108.30322725204673872668, -108.32941388169263063901, 351592.71064292272785678506, 0.99846922699591933448 }, + { 351771.13000385620398446918, -108.30311039505922110493, -108.32929702549677131174, 351594.87308142217807471752, 0.99846920815167106156 } + }, { + { 1, 1 },{ -2, -2 }, + { 470675.27496387914288789034, -134.81200467523646580048, -134.78581002988772752360, 470245.32092262554215267301, 0.99726004843767979136 }, + { 470675.27491378918057307601, -134.81200467525528097212, -134.78581002990657111695, 470245.32093124854145571589, 0.99726004841255500022 }, + { 470675.27385581465205177665, -134.81200575348222514549, -134.78581110911991913781, 470245.31203990196809172630, 0.99726004851631100401 }, + { 470669.97387331607751548290, -134.81232618817941215639, -134.78613154296644438546, 470242.67608062474755570292, 0.99726007931332960599 } + }, { + { 1, 1 },{ 0, -2 }, + { 349898.53698544885264709592, -161.45195469949391053888, -161.44322493617917757547, 349721.87727315956726670265, 0.99848548653821667109 }, + { 349898.53691851865733042359, -161.45195469952594180540, -161.44322493621118042029, 349721.87728093314217403531, 0.99848548652432367323 }, + { 349898.53644461580552160740, -161.45195534985634822078, -161.44322558687019864010, 349721.87595040485030040145, 0.99848548653585678103 }, + { 349894.27001174906035885215, -161.45245862756033261576, -161.44372886423073509832, 349720.85020991315832361579, 0.99848549544738174344 } + }, { + { 1, 1 },{ 2, -2 }, + { 349898.53698544885264709592, 161.45195469949391053888, 161.44322493617917757547, 349721.87727315956726670265, 0.99848548653821667109 }, + { 349898.53691851865733042359, 161.45195469952594180540, 161.44322493621118042029, 349721.87728093314217403531, 0.99848548652432367323 }, + { 349898.53644461580552160740, 161.45195534985634822078, 161.44322558687019864010, 349721.87595040485030040145, 0.99848548653585678103 }, + { 349894.27001174906035885215, 161.45245862756033261576, 161.44372886423073509832, 349720.85020991315832361579, 0.99848549544738174344 } + }, { + { 1, -1 },{ 2, 0 }, + { 156899.56829134028521366417, 45.19676732164486310239, 45.18804022935886877121, 156883.63778222308610565960, 0.99969540695122460772 }, + { 156899.56827460310887545347, 45.19676732162573529195, 45.18804022933975517162, 156883.63778401838499121368, 0.99969540695121617002 }, + { 156899.56792193598812445998, 45.19676624219878391386, 45.18803915024158612823, 156883.63480984268244355917, 0.99969540696276681935 }, + { 156897.79947260793414898217, 45.19644594033049145310, 45.18771884804951355363, 156882.75281389255542308092, 0.99969541038810816325 } + }, { + { 1, -1 },{ 2, 2 }, + { 349898.53698544885264709592, 18.54804530050607525027, 18.55677506382081531910, 349721.87727315956726670265, 0.99848548653821667109 }, + { 349898.53691851865733042359, 18.54804530047409016902, 18.55677506378881247429, 349721.87728093314217403531, 0.99848548652432367323 }, + { 349898.53644461580552160740, 18.54804465014367664821, 18.55677441312981201804, 349721.87595040485030040145, 0.99848548653585678103 }, + { 349894.27001174906035885215, 18.54754137243966738424, 18.55627113576925424354, 349720.85020991315832361579, 0.99848549544738174344 } + }, { + { 1, -1 },{ 0, 2 }, + { 349898.53698544885264709592, -18.54804530050607525027, -18.55677506382081531910, 349721.87727315956726670265, 0.99848548653821667109 }, + { 349898.53691851865733042359, -18.54804530047409016902, -18.55677506378881247429, 349721.87728093314217403531, 0.99848548652432367323 }, + { 349898.53644461580552160740, -18.54804465014367664821, -18.55677441312981201804, 349721.87595040485030040145, 0.99848548653585678103 }, + { 349894.27001174906035885215, -18.54754137243966738424, -18.55627113576928266525, 349720.85020991315832361579, 0.99848549544738174344 } + }, { + { 1, -1 },{ -2, 2 }, + { 470675.27496387914288789034, -45.18799532476352709409, -45.21418997011227247640, 470245.32092262554215267301, 0.99726004843767979136 }, + { 470675.27491378918057307601, -45.18799532474472613330, -45.21418997009345730476, 470245.32093124865787103772, 0.99726004841255500022 }, + { 470675.27385581465205177665, -45.18799424651773932737, -45.21418889088011638933, 470245.31203990196809172630, 0.99726004851631100401 }, + { 470669.97387331607751548290, -45.18767381182056652733, -45.21386845703356271997, 470242.67608062445651739836, 0.99726007931332938394 } + }, { + { 1, -1 },{ -2, 0 }, + { 351772.23553088010521605611, -71.69677339271241578444, -71.67058676207953737958, 351592.72256732499226927757, 0.99846922689201267342 }, + { 351772.23552330053644254804, -71.69677339270522509196, -71.67058676207236089795, 351592.72256738768192008138, 0.99846922689200567902 }, + { 351772.23547190619865432382, -71.69677274795323285161, -71.67058611830736936099, 351592.71064292214578017592, 0.99846922699591911243 }, + { 351771.13000385620398446918, -71.69688960494077889507, -71.67070297450322868826, 351594.87308142206165939569, 0.99846920815167106156 } + }, { + { 1, -1 },{ -2, -2 }, + { 351676.50043935602298006415, -108.36087395536006283692, -108.28232205125480902552, 351497.13544799503870308399, 0.99847006808788085763 }, + { 351676.50037266127765178680, -108.36087395536665667350, -108.28232205126143128382, 351497.13543194788508117199, 0.99847006821303718738 }, + { 351676.50038040406070649624, -108.36087459655152542837, -108.28232269539881826859, 351497.12354394845897331834, 0.99847006831660412018 }, + { 351675.39839278126601129770, -108.36075825022818719390, -108.28220634670809374711, 351499.26940269087208434939, 0.99847004976658149111 } + }, { + { 1, -1 },{ 0, -2 }, + { 156876.14940188667969778180, -134.82952991582811819171, -134.80335129773999369718, 156860.22615479407249949872, 0.99969549952259184611 }, + { 156876.14925185780157335103, -134.82952991584656388113, -134.80335129775846780831, 156860.22615983051946386695, 0.99969549954768643918 }, + { 156876.14903264911845326424, -134.82953099167991695140, -134.80335237457535413341, 156860.22319510785746388137, 0.99969549955919845274 }, + { 156874.38594904550700448453, -134.82985169207830722371, -134.80367307400518939176, 156859.34477911840076558292, 0.99969550299904519353 } + }, { + { 1, -1 },{ 2, -2 }, + { 156876.14940188667969778180, 134.82952991582811819171, 134.80335129773999369718, 156860.22615479407249949872, 0.99969549952259184611 }, + { 156876.14925185780157335103, 134.82952991584656388113, 134.80335129775846780831, 156860.22615983051946386695, 0.99969549954768643918 }, + { 156876.14903264911845326424, 134.82953099167994537311, 134.80335237457538255512, 156860.22319510785746388137, 0.99969549955919856377 }, + { 156874.38594904550700448453, 134.82985169207830722371, 134.80367307400518939176, 156859.34477911840076558292, 0.99969550299904519353 } + }, { + // near pole + {90, -45}, {90, -80}, + {3900195.49395913071930408478, -180.00000000000000000000, -180.00000000000000000000, 3662502.04478993499651551247, 0.81922976250863166481}, + {3900195.49395686946809291840, 180.00000000000000000000, 180.00000000000000000000, 3662502.06126507185399532318, 0.81922976508736944368}, + {3900195.49053949490189552307, 180.00000000000000000000, 180.00000000000000000000, 3662502.06126507185399532318, 0.81922976508736944368}, + {3900203.61653685756027698517, 180.00000000000000000000, 180.00000000000000000000, 3662507.91531699104234576225, 0.81923068138101373670} + }, { + // pole, same lon + {90, -45}, {90, -90}, + {5017021.35133497882634401321, -180.00000000000000000000, -180.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017021.35133314039558172226, 180.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017021.34791153203696012497, 180.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017017.85355509258806705475, 180.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172} + }, { + // pole + {90, -45}, {0, -90}, + {5017021.35133497882634401321, -180.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017021.35133314039558172226, 180.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017021.34791153203696012497, 180.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017017.85355509258806705475, 180.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172} + }, { + // near pole + {90, 45}, {90, 80}, + {3900195.49395913071930408478, 0.00000000000000000000, 0.00000000000000000000, 3662502.04478993499651551247, 0.81922976250863166481}, + {3900195.49395686946809291840, 0.00000000000000000000, 0.00000000000000000000, 3662502.06126507185399532318, 0.81922976508736944368}, + {3900195.49053949490189552307, 0.00000000000000000000, 0.00000000000000000000, 3662502.06126507185399532318, 0.81922976508736944368}, + {3900203.61653685756027698517, 0.00000000000000000076, 0.00000000000000000071, 3662507.91531699104234576225, 0.81923068138101373670} + }, { + // pole, same lon + {90, 45}, {90, 90}, + {5017021.35133497882634401321, 0.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017021.35133314039558172226, 0.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017021.34791153203696012497, 0.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017017.85355509258806705475, 0.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172} + }, { + // pole + {90, 45}, {0, 90}, + {5017021.35133497882634401321, -0.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017021.35133314039558172226, -0.00000000000000496992, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017021.34791153203696012497, 0.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172}, + {5017017.85355509258806705475, 0.00000000000000000000, -90.00000000000000000000, 4517590.87884893082082271576, 0.70710678118654746172} + }, { + // pole + {0, -90}, {90, -45}, + {5017021.35133497882634401321, 90.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70778496454077310940}, + {5017021.35133314039558172226, 90.00000000000000000000, 0.00000000000000496992, 4517590.87884893082082271576, 0.70778494508412304054}, + {5017021.34791153203696012497, 90.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70778494508412304054}, + {5017017.85355509258806705475, 90.00000000000000000000, 0.00000000000000000000, 4517590.87884893082082271576, 0.70777827352623101653} + }, { + // pole + {0, 90}, {90, 45}, + {5017021.35133497882634401321, 90.00000000000000000000, -180.00000000000000000000, 4517590.87884893082082271576, 0.70778496454077310940}, + {5017021.35133314039558172226, 90.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70778494508412304054}, + {5017021.34791153203696012497, 90.00000000000001421085, 180.00000000000000000000, 4517590.87884893082082271576, 0.70778494508412304054}, + {5017017.85355509258806705475, 90.00000000000000000000, 180.00000000000000000000, 4517590.87884893082082271576, 0.70777827352623101653} + }, { + {90, -45}, {90, 45}, + {9969888.75595548748970031738, 0.00000000000000000000, 0.00000000000000000000, 6361290.27546359039843082428, 0.00431189731318673553}, + {9969888.75595730356872081757, 0.00000000000000000000, 0.00000000000000000000, 6361290.36011654324829578400, 0.00431188406305459994}, + {9969888.73915978334844112396, 0.00000000000000000000, 0.00000000000000000000, 6361290.36011654324829578400, 0.00431188406305459994}, + {9969881.64984572120010852814, 0.00000000000000001848, 0.00000000000000001176, 6361314.54906367603689432144, 0.00430809793699618842} + }, { + {90, 45}, {90, -45}, + {9969888.75595548748970031738, -180.00000000000000000000, -180.00000000000000000000, 6361290.27546359039843082428, 0.00431189731318673553}, + {9969888.75595730356872081757, 180.00000000000000000000, 180.00000000000000000000, 6361290.36011654324829578400, 0.00431188406305459994}, + {9969888.73915978334844112396, 180.00000000000000000000, 180.00000000000000000000, 6361290.36011654324829578400, 0.00431188406305459994}, + {9969881.64984572120010852814, 180.00000000000000000000, 180.00000000000000000000, 6361314.54906367603689432144, 0.00430809793699618842} + }, { + // pole, same lon + {90, 0}, {90, 90}, + {10001965.72931272350251674652, 0.00000000000000000000, 0.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.72931179217994213104, 0.00000000000000000000, 0.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.71749142371118068695, 0.00000000000000000000, 0.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001958.67847795411944389343, 0.00000000000000000000, 0.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000} + }, { + // pole + {90, 0}, {0, 90}, + {10001965.72931272350251674652, -0.00000000000000000000, -90.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.72931179217994213104, -0.00000000000000352016, -90.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.71749142371118068695, 0.00000000000000000000, -90.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001958.67847795411944389343, 0.00000000000000000000, -90.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000} + }, { + // pole, different lon + {0, 0}, {1, 90}, + {10001965.72931272350251674652, 0.00000000000000000000, 1.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.72931179217994213104, 0.00000000000000006144, 1.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.71749142371118068695, 0.00000000000000000000, 0.99999999999998867573, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001958.67847795411944389343, 0.00000000000000000000, 0.99999999999998867573, 6378136.99999999906867742538, 0.00000000000000000000} + }, { + // pole, different lon + {0, 0}, {-1, 90}, + {10001965.72931272350251674652, -0.00000000000000000000, -1.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.72931179217994213104, -0.00000000000000006144, -1.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.71749142371118068695, 0.00000000000000000000, -1.00000000000001421085, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001958.67847795411944389343, 0.00000000000000000000, -0.99999999999998867573, 6378136.99999999906867742538, 0.00000000000000000000} + }, { + // pole, different lon + {0, 0}, {1, -90}, + {10001965.72931272350251674652, -180.00000000000000000000, 179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.72931179217994213104, 180.00000000000000000000, 179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.71749142371118068695, 180.00000000000000000000, 179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001958.67847795411944389343, 180.00000000000000000000, 179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000} + }, { + // pole, different lon + {0, 0}, {-1, -90}, + {10001965.72931272350251674652, -180.00000000000000000000, -179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.72931179217994213104, -180.00000000000000000000, -179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001965.71749142371118068695, 180.00000000000000000000, -179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000}, + {10001958.67847795411944389343, 180.00000000000000000000, -179.00000000000000000000, 6378136.99999999906867742538, 0.00000000000000000000} + }/*, { + // antipodal + {-90, -45}, {90, 45}, + {20003931.45862544700503349304, -180.00000000000000000000, 0.00000000000000000000, 33675.52452803074265830219, -0.99472900658949181540}, + {19987083.06974205747246742249, 90.00000000000000000000, 90.00000000000000000000, 00000.00000000078240703623, -1.00000000000000000000}, + {00000000.00000000000000000000, 0.00000000000000000000, 0.00000000000000000000, 000000.00000000000000000000, 1.00000000000000000000}, + {20020712.84987257421016693115, 0.00000000000000000000, 0.00000000000000000000, 6361314.54906367603689432144, 0.00430809793699618842} + },{ + // antipodal + {-90, 45}, {90, -45}, + {20003931.45862544700503349304, 0.00000000000000000000, -180.00000000000000000000, 33675.52452803074265830219, -0.99472900658949181540}, + {19987083.06974205747246742249, 90.00000000000000000000, 90.00000000000000000000, -000000.00000000078240703623, -1.00000000000000000000}, + {00000000.00000000000000000000, 0.00000000000000000000, 0.00000000000000000000, 000000.00000000000000000000, 1.00000000000000000000}, + {20020712.84987257421016693115, 180.00000000000000000000, 0.00000000000000000000, 33590.79639541531651047990, -1.00525773151080621837} + }*/ +}; + +size_t const expected_size = sizeof(expected) / sizeof(expected_results); + +#endif // BOOST_GEOMETRY_TEST_INVERSE_CASES_HPP diff --git a/src/boost/libs/geometry/test/formulas/inverse_cases_antipodal.hpp b/src/boost/libs/geometry/test/formulas/inverse_cases_antipodal.hpp new file mode 100644 index 00000000..e66046dd --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/inverse_cases_antipodal.hpp @@ -0,0 +1,342 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan. + +// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_INVERSE_CASES_ANTIPODAL_HPP +#define BOOST_GEOMETRY_TEST_INVERSE_CASES_ANTIPODAL_HPP + +#include "inverse_cases.hpp" + +struct expected_results_antipodal +{ + coordinates p1; + coordinates p2; + expected_result karney; +}; + +/* + These values are collected from GeodTest which is associated with GeographicLib: + https://zenodo.org/record/32156 + + The conversion to C++ array format is done using this Python script: + https://github.com/adl1995/boost-geometry-extra/blob/master/geographiclib-dataset-parse-inverse.py + + Geodesic scale (M12) is absent from the GeodTest dataset, so it is manually generated + using GeographicLib using this C++ script: + https://github.com/adl1995/boost-geometry-extra/blob/master/geographicLib-direct-antipodal.cpp +*/ +expected_results_antipodal expected_antipodal[] = +{ + { + { 0, 31.394417440639 }, { 179.615601631202912322, -31.275540610835465807 }, + { 19980218.4055399, 34.266322930672, 145.782701113414306756, 49490.8807994496209, -0.996116451012525883079717914370121434 } + },{ + { 0, 29.788792273749 }, { 178.569451327813675741, -29.558013672069422725 }, + { 19887224.5407334, 74.302205994192, 106.156240654579267308, 97043.7545600593058, -0.998624031147844926081802441331092268 } + },{ + { 0, 46.471843094141 }, { 179.083144618009561276, -46.284166405924629853 }, + { 19944337.8863917, 63.693680310665, 116.699978859005570535, 53139.140576552365, -0.997597309645591900917338534782174975 } + },{ + { 0, 63.016506345929 }, { 179.862869954071637855, -63.02943882703369735 }, + { 20000925.7533636, 153.393656073038, 26.619056019474552953, 12713.9284725111772, -1.00381317792143387457315384381217882 } + },{ + { 0, 19.796231412719 }, { 179.546498474461283862, -19.470586923091672503 }, + { 19956338.1330537, 28.272934411318, 151.789094611690988249, 87191.1749625132931, -0.997015409027664833985227232915349305 } + },{ + { 0, 6.373459459035 }, { 179.240009269347556917, -6.204887833274217382 }, + { 19946581.6983394, 56.859050230583, 123.169200847008284851, 53958.8698005263939, -0.999349049081101004077254401636309922 } + },{ + { 0, 66.380766469414 }, { 179.632633596894388233, -66.27177494016956425 }, + { 19986277.7696849, 38.646950203356, 141.550919825824399405, 22198.215635049214, -0.996949176054954366854587988200364634 } + },{ + { 0, 16.483421185231 }, { 179.731567273052604726, -16.818424446748042212 }, + { 19962737.9842573, 163.431254767325, 16.598399455529231288, 95318.4104529881431, -1.00272210232979741562076014815829694 } + },{ + { 0, 4.215702155486 }, { 179.093771177769992874, -4.051917290690976764 }, + { 19932517.393764, 65.543168480886, 114.482669479963380006, 55205.4553703842317, -0.999655858425056553784315838129259646 } + },{ + { 0, 40.71372085907 }, { 179.404612926861498984, -41.047052242159400671 }, + { 19951133.3595356, 143.672151631634, 36.54002600969304553, 70931.1530155553621, -1.00414169574077272173440178448799998 } + },{ + { 0, 15.465481491654 }, { 179.020726605204181801, -14.622355549425900341 }, + { 19877383.8879911, 36.289185640976, 143.875673907461159912, 156419.0806764376957, -0.997639074397169589580869342171354219 } + },{ + { 0, 17.586197343531 }, { 179.722490735835379144, -17.731394230364437075 }, + { 19982280.4639115, 157.929615091529, 22.089021105298661023, 69727.5357849255557, -1.00280451698301242835498214844847098 } + },{ + { 0, 5.7442768247 }, { 178.85894724576868462, -6.039853564481335581 }, + { 19902873.7431814, 116.146983678305, 63.91482549951374061, 87149.6188944111673, -1.00039332893096744037109147029696032 } + },{ + { 0, 32.002904282111 }, { 179.744925422107715439, -32.297934520693132807 }, + { 19967670.3104795, 163.052160078191, 17.004175883388454943, 78311.3164829640582, -1.00449903445302446414189034840092063 } + },{ + { 0, 55.902716926362 }, { 179.300685189522463007, -55.934320218634018206 }, + { 19970525.337607, 98.927641063414, 81.374264168520557301, 23554.0093185709067, -1.00072788779083454713259015989024192 } + },{ + { 0, 22.69939784398 }, { 179.294173474584020749, -22.654875407651067149 }, + { 19959286.1903172, 74.253870776761, 105.811588890213155275, 22369.7179951557679, -0.998972181419003457669703038845909759 } + },{ + { 0, 41.312328471121 }, { 179.817186837717804928, -40.954523601529804886 }, + { 19962690.5721867, 11.277616109847, 168.784288786443902199, 77252.6121237260201, -0.994825151471527391322524636052548885 } + },{ + { 0, 27.927415327453 }, { 179.636508875679110143, -27.607314264234172721 }, + { 19961296.8828333, 23.166421459647, 156.905194492817275222, 83096.5801709291101, -0.995959692767656723511038308060960844 } + },{ + { 0, 41.567228741451 }, { 179.931812964300204608, -42.103039532074194347 }, + { 19944253.4454809, 176.66609526064, 3.361859685835349219, 96859.08180779197, -1.00513607140487626345759508694754913 } + },{ + { 0, 37.384208978567 }, { 179.225180174670992261, -36.916085670712060029 }, + { 19928705.5911445, 39.072534864532, 141.212743814390850106, 92667.7834060578402, -0.995955516859159284415170532156480476 } + },{ + { 0, 59.011868682852 }, { 179.424923485514312807, -58.82705468054708336 }, + { 19970442.3788306, 44.970301291063, 135.333817989802309531, 38071.1136293083857, -0.996658942892707400140750451100757346 } + },{ + { 0, 35.515406087737 }, { 179.50369572149476218, -35.119747127350258822 }, + { 19948918.9139751, 28.528972431952, 151.622257906284404073, 84564.0387217601751, -0.995562861799169418475230486365035176 } + },{ + { 0, 58.170252463184 }, { 179.254737571455023977, -58.372261836268550805 }, + { 19961407.0813807, 128.021116291844, 52.399129705193347143, 43715.3070711393309, -1.00285273713280753682397516968194395 } + },{ + { 0, 34.012183807959 }, { 179.83713352180447672, -34.29640782899529639 }, + { 19970955.843065, 168.944519134772, 11.093048811826875835, 76493.5814538538151, -1.0047652354558671561335359001532197 } + },{ + { 0, 45.510762948553 }, { 178.981682578823726535, -45.582753595227824235 }, + { 19940248.3450143, 99.886784003837, 80.542330522982505877, 48555.1946627894972, -1.00083807750906350619857221317943186 } + },{ + { 0, 4.19841765451 }, { 179.398024428225540172, -4.198416896099783242 }, + { 19970496.5132933, 89.561550657928, 90.438456568689151881, 14.8790480103109, -0.999994104810285944218151144013972953 } + },{ + { 0, 40.890119148103 }, { 179.6557148951668192, -41.553556264538302258 }, + { 19926563.5817492, 165.437641169967, 14.713597527941311478, 111805.7305227545923, -1.00492294933406567380984597548376769 } + },{ + { 0, 28.096672787686 }, { 178.606868012231657724, -28.472055035513955205 }, + { 19883901.8482359, 115.174366374632, 65.257367020445564176, 107880.4353518862363, -1.00170803073331593502359737613005564 } + },{ + { 0, 6.50572154271 }, { 178.926013840891647541, -6.411745140559297675 }, + { 19917276.4101551, 79.069492719523, 100.985091481519557845, 57073.3242952680707, -0.999736666933808471036115861352300271 } + },{ + { 0, .468835109567 }, { 178.325942223692180692, -.281751687044281805 }, + { 19849380.7342734, 80.234636214474, 99.77243368342786593, 123845.4568822078908, -0.999801437209140719808431185811059549 } + },{ + { 0, 1.682746325049 }, { 179.717131561406935483, -.677647430701204515 }, + { 19890026.0274781, 10.076182752451, 169.927471515299313238, 177917.2104306563981, -0.999538055691262194990542866435134783 } + },{ + { 0, 10.711305126218 }, { 179.874050163405229937, -10.349315378531556046 }, + { 19962987.2134077, 7.528253696796, 172.480576051850009046, 104175.1095378254456, -0.998071853755238880268052525934763253 } + },{ + { 0, 53.374321544652 }, { 179.729445806011012057, -53.196257519024042184 }, + { 19980478.1457438, 23.324715976877, 156.777734080146664812, 41907.8869272231053, -0.995333596277707566279957518418086693 } + },{ + { 0, 39.680221664519 }, { 179.87506206720154785, -39.256187213040660911 }, + { 19956191.7841809, 7.075406493429, 172.967624741991546131, 86943.8110669895148, -0.994801087909667924868983845954062417 } + },{ + { 0, 1.377666714083 }, { 178.994542525209058878, -1.415358715570225495 }, + { 19925401.4931301, 95.29199069739, 84.7178724483824156, 45800.9140624827059, -0.99999803170512457928253979844157584 } + },{ + { 0, 48.751426624188 }, { 179.661697715070846977, -48.688146707479475147 }, + { 19988599.1160495, 40.252328570137, 139.808452951157199824, 26322.3790862461568, -0.995999245724129789181233718409202993 } + },{ + { 0, 59.443039048494 }, { 179.247605418616998285, -59.454371825393424121 }, + { 19969935.9534732, 93.052184108221, 87.331416513795326158, 25342.4691896499534, -1.00020727848897084122370415570912883 } + },{ + { 0, 4.122408476235 }, { 179.749430572914989772, -4.689124208743755363 }, + { 19938291.6332293, 167.73479753304, 12.274635577599782826, 127855.6475863583497, -1.00068600902837667732114823593292385 } + },{ + { 0, 46.422470082432 }, { 178.857408435141563774, -46.390934261324541952 }, + { 19931980.7029341, 86.67365350297, 93.852683224054943377, 56114.680046867064, -0.999607096116300386512421027873642743 } + },{ + { 0, 32.614423729024 }, { 179.460593512880455451, -32.01874745886238612 }, + { 19926887.3785175, 24.943814520557, 155.229917137448282531, 112355.3319340873104, -0.995562150676871926435751447570510209 } + },{ + { 0, 3.242895277973 }, { 179.556428318080663113, -3.001106476068264917 }, + { 19964490.4789049, 30.247458779683, 149.760178923092147784, 80929.0418317066044, -0.999474184270344845337774586369050667 } + },{ + { 0, 6.29069210113 }, { 178.556859259685624933, -6.354208910915346725 }, + { 19877160.8505733, 94.34299459284, 85.750059038253282986, 94127.1566760840083, -0.999976397350904933070125935046235099 } + },{ + { 0, 18.232086569498 }, { 179.658073278238477245, -18.87394850776853555 }, + { 19927978.7462175, 164.41905055334, 15.640779355822506503, 129771.1882449660559, -1.00293460439063886191490837518358603 } + },{ + { 0, 12.049849333181 }, { 179.761046682699610657, -11.201990279782499264 }, + { 19908004.4552909, 9.418096768309, 170.610608272305604585, 157761.5040571466343, -0.997761474497510958414636661473196 } + },{ + { 0, 40.289465276136 }, { 179.644208494155329095, -40.370034926441385999 }, + { 19985674.936106, 143.092606818963, 36.958610382613096419, 36200.8933724688593, -1.00414965876091266672176516294712201 } + },{ + { 0, 2.197784650379 }, { 179.961199531084784854, -1.353440827124394777 }, + { 19910509.7517973, 1.542117609437, 178.458582198505846426, 160403.6285079348996, -0.999488724639301051588802238256903365 } + },{ + { 0, 1.966575272177 }, { 179.699817324905962184, -3.101125282483752618 }, + { 19875595.6267266, 170.112968791865, 9.89572776349855838, 192355.7206665719908, -1.00015463589804554089823795948177576 } + },{ + { 0, 25.078832492684 }, { 178.600804840925824646, -24.897833702325682511 }, + { 19887997.7953866, 77.264585323781, 103.101167809583406892, 92442.9124509225839, -0.998981189838600847075156252685701475 } + },{ + { 0, 31.740361941314 }, { 179.553485210731879874, -31.909206787477701871 }, + { 19972325.3556069, 143.930820896999, 36.145242998351638503, 54883.4113710054145, -1.00379461628115951299378139083273709 } + },{ + { 0, .05479250563 }, { 178.822647462220726609, .836079031223269324 }, + { 19858049.4780499, 41.349430623518, 138.645259065012502544, 169078.442370111714, -0.9997793696948588104689292777038645 } + },{ + { 0, 36.685139871608 }, { 179.366667224014334712, -36.6833040833258687 }, + { 19968965.6773632, 89.167975517493, 90.921025521408327068, 13327.2156799476918, -0.999916537946348604748436628142371774 } + },{ + { 0, 3.451199399671 }, { 179.107509334399258305, -3.459003521120242021 }, + { 19938203.3838544, 91.541212417048, 88.476282464773035164, 32316.1747698810781, -1.00000397484395819880376166111091152 } + },{ + { 0, 27.692898794247 }, { 178.512356615673144314, -27.666009301228316555 }, + { 19883493.6699045, 88.406440883665, 92.036345087713397961, 94128.7880896190836, -0.999736458322951659916100197733612731 } + },{ + { 0, 17.363238291869 }, { 179.567921315455829491, -17.288872648596950413 }, + { 19980749.7638027, 39.697196316589, 140.321938237586060826, 46975.9359427664379, -0.997687691981715030209443284547887743 } + },{ + { 0, 37.006775102539 }, { 179.191103068859169842, -37.156365616364686838 }, + { 19949309.9180043, 116.455543532607, 63.771817992036617793, 45856.1961421018701, -1.00221962858918423044940482213860378 } + },{ + { 0, 45.572883540957 }, { 179.224707765088686272, -45.94675931323086696 }, + { 19940027.8586414, 137.627256708444, 42.723991162977357301, 74208.4359612889496, -1.00380887786447159371050474874209613 } + },{ + { 0, 43.63393981955 }, { 178.878236417027994157, -43.642335115130514773 }, + { 19931045.2914508, 91.203625101465, 89.268780774643462256, 55253.5406349861764, -1.00002974153150514524668324156664312 } + },{ + { 0, 38.4995307019 }, { 179.143856004445269342, -39.042223438550921467 }, + { 19918391.2222193, 141.232864609445, 39.117947060740562295, 102217.2563106863077, -1.00388164115732947401227193040540442 } + },{ + { 0, 27.55015339382 }, { 179.596220103573824099, -27.587412128122249651 }, + { 19986004.7358853, 137.025135713548, 42.992898351962011956, 33938.7346646670654, -1.00316044390281167153489150223322213 } + },{ + { 0, 1.54507498314 }, { 179.567115633151308577, -1.448861185025252004 }, + { 19978593.3191777, 36.816106412092, 143.185763012309022403, 56320.5800276739168, -0.999770499462467210349814195069484413 } + },{ + { 0, 45.217063644222 }, { 179.807382581661125, -45.086424050571516283 }, + { 19987042.0782465, 18.114645812265, 161.928120141429818658, 45544.2915061261936, -0.994974179414854997816064496873877943 } + },{ + { 0, 13.473522450751 }, { 179.726941062277208626, -13.570372758027936877 }, + { 19987364.078382, 156.839609002403, 23.170293747820406391, 65329.9068132034472, -1.00219093189506569530067281448282301 } + },{ + { 0, 6.287741997374 }, { 179.071252372259552052, -6.743450924917895817 }, + { 19912159.8245954, 132.954797451112, 47.100789519677419746, 104772.4027498097375, -1.00071252411103017720961361192166805 } + },{ + { 0, 7.639709001531 }, { 179.616156296978583335, -7.48702643786017917 }, + { 19976374.3699535, 29.731916588299, 150.279582966919438164, 69224.6591757209539, -0.998789792086741234911073661351110786 } + },{ + { 0, 5.893688050348 }, { 179.586212000450856399, -4.888408917114795625 }, + { 19886907.2520668, 14.653438882877, 165.371181401863458848, 177183.5330818593022, -0.998794647031120752522781458537792787 } + },{ + { 0, 61.997076235476 }, { 179.605779116829636081, -62.19593758437129915 }, + { 19976288.2901729, 149.562797049254, 30.65850204223272625, 36696.2853801462176, -1.00373071432437144245852778112748638 } + },{ + { 0, 50.507637741656 }, { 179.893569206021038536, -50.721890799900161112 }, + { 19979542.5263293, 171.564028344478, 8.4746613464253591, 50644.5234828162697, -1.00508881632281776852266830246662721 } + },{ + { 0, 7.484475238477 }, { 178.638400003000590878, -6.926155588124333461 }, + { 19867425.2906303, 57.020570370985, 123.087267812322270238, 132929.2775641349633, -0.999097042677338120775232255255104974 } + },{ + { 0, 56.851165323215 }, { 179.587046628550073045, -56.875248360744638525 }, + { 19988235.9960515, 112.345749045605, 67.744017057185404441, 9971.0934553515518, -1.00182859249871403228837607457535341 } + },{ + { 0, 10.692273150738 }, { 178.709520715733071393, -10.851727623036704339 }, + { 19893210.3050033, 102.824601316946, 77.308514969817191459, 83032.7122948051111, -1.00034345584508432835946223349310458 } + },{ + { 0, 46.694739303788 }, { 179.926838145841924189, -46.948618153686522669 }, + { 19975447.9283188, 174.663684259477, 5.361568174833475454, 59614.5876209460645, -1.00520484875201732144489596976200119 } + },{ + { 0, 15.804386137005 }, { 178.367587635209819128, -15.522042847777054984 }, + { 19855850.8800526, 74.932089158884, 105.357235560913450667, 123350.4326645237628, -0.999091578546475345135036150168161839 } + },{ + { 0, 4.371450175299 }, { 179.780887420199549421, -4.566109732313098407 }, + { 19979071.1035552, 164.163592252794, 15.840695025950408814, 84137.2115482558728, -1.00076323969894742660358133434783667 } + },{ + { 0, 30.894388279688 }, { 179.375426183521944524, -30.871308884744172663 }, + { 19968681.8321577, 77.35154610481, 102.709506078439532936, 14048.0277985734058, -0.998975176336422854284080585784977302 } + },{ + { 0, 9.541166838639 }, { 178.432934555386452839, -10.09982228112793472 }, + { 19848553.7844137, 118.441353539081, 61.736686215549403663, 144831.1911566651614, -1.00060548620110489892454097571317106 } + },{ + { 0, 8.489292700054 }, { 179.906698338023119097, -8.559237750032113623 }, + { 19995477.1669578, 171.963952699866, 8.037517851139094467, 72192.60793572974, -1.00152068486306466965629624610301107 } + },{ + { 0, 19.562401114224 }, { 178.838724116996037606, -20.05038360490599475 }, + { 19893208.1788508, 126.362762598128, 53.875560227496658204, 112181.7524188837615, -1.00185202668802775249901060306001455 } + },{ + { 0, 42.260350252749 }, { 179.807860448877064601, -42.79985897702184353 }, + { 19942715.0054774, 170.703419847646, 9.377654670896439828, 96336.3477142010769, -1.00508642406443549077721399953588843 } + },{ + { 0, 24.511403144656 }, { 178.957598444862223515, -24.616808725039883945 }, + { 19924809.5184876, 102.913211410163, 77.297538210434837096, 55403.453072179318, -1.0008408309188838725134473861544393 } + },{ + { 0, 20.844284170708 }, { 179.069258863637226633, -20.321320573298341477 }, + { 19909084.6340808, 44.172784008084, 136.01627115731728436, 111009.0987238994608, -0.997389183621778974142557672166731209 } + },{ + { 0, 2.426010809098 }, { 178.236397468862000784, -2.513715200833756776 }, + { 19840940.6924189, 94.315194952561, 85.734896842737189557, 130002.6104886615638, -0.999825249844991659209370027383556589 } + },{ + { 0, 6.600682554664 }, { 179.646475458013797028, -7.699164822656561787 }, + { 19878412.28273, 168.167678684515, 11.861035812918738552, 187426.3958525886692, -1.00098284856064978498579876031726599 } + },{ + { 0, 23.372339802326 }, { 179.499422665106094027, -24.239465200482591299 }, + { 19899498.4582543, 161.197647943542, 18.932355367478826536, 151863.2545535951091, -1.00347666868431395492677893344080076 } + },{ + { 0, 16.194668264095 }, { 179.115193814080201851, -17.129419031459576897 }, + { 19874825.6683239, 148.942349959054, 31.225656401221968078, 166033.3161394594622, -1.00222032222233647935638600756647065 } + },{ + { 0, 1.528726471528 }, { 178.791047180477802091, -1.282203000582034597 }, + { 19897803.9939987, 69.212891442493, 110.802928803578167132, 85252.8333849204133, -0.999827144228156883265512533398577943 } + },{ + { 0, 6.297249676078 }, { 178.623258703845895437, -5.709470001196540278 }, + { 19864042.0495193, 56.274639904925, 123.817184177744186806, 137475.1283083659258, -0.999190450178399580671850799262756482 } + },{ + { 0, 17.393540327984 }, { 179.330156510680163326, -17.431100690958209424 }, + { 19962624.6302607, 107.855062015266, 72.181322855288535245, 19320.5501845044839, -1.00091841779689127989172447996679693 } + },{ + { 0, 46.284685151236 }, { 179.852534804091121255, -46.176234945675219984 }, + { 19990422.3478916, 14.758013867151, 165.271681964991897184, 42614.1796365710104, -0.994894592261839960656288894824683666 } + },{ + { 0, 14.924320176299 }, { 179.195663739713760883, -14.125476432252858442 }, + { 19891861.8615337, 31.446544793174, 148.678916887199611191, 149419.6596309045804, -0.997620142585332936313591289945179597 } + },{ + { 0, 23.668824656069 }, { 179.409875478773990359, -24.107855233601412399 }, + { 19938736.4442268, 148.091483667618, 32.02919257641173958, 97771.7687385830819, -1.00323262872000595891108787327539176 } + },{ + { 0, 46.986276695896 }, { 179.92040916864362177, -47.301644191214905832 }, + { 19968596.0414782, 174.796708941456, 5.234240076649939638, 66113.7417494369769, -1.00519095452608087093437916337279603 } + },{ + { 0, 65.946144289524 }, { 179.808282612725835525, -65.871840130833632868 }, + { 19993734.5109736, 25.375428509648, 154.703163938350061652, 18355.2254271672769, -0.996436935914610577569305860379245132 } + },{ + { 0, 10.950298933293 }, { 179.624609619829763098, -10.787771536605316781 }, + { 19975919.5586889, 28.779018914489, 151.238005588662201946, 70291.1998404303581, -0.998272071834115148902810688014142215 } + },{ + { 0, 13.609869340778 }, { 179.035623147420893383, -14.023624108675206222 }, + { 19913213.8514358, 129.616021271129, 50.506400999466711623, 97596.7664002074776, -1.00146664642314031645753402699483559 } + },{ + { 0, 48.701427557433 }, { 179.385565054218238481, -48.735316652259656533 }, + { 19972955.2699173, 102.875149183407, 77.294384444682547869, 18461.7742226227697, -1.00114676855429074464609584538266063 } + },{ + { 0, 31.519172055785 }, { 179.555251675378549409, -31.140142027808697534 }, + { 19952318.3772514, 26.247105619999, 153.865822276646938125, 86354.7117605101002, -0.995739948399825047786748655198607594 } + },{ + { 0, 31.863784754278 }, { 179.722489476483407524, -31.826935359797657785 }, + { 19993324.8682601, 29.572313410211, 150.440607907359037187, 41427.6181613499234, -0.995888009001147267440501309465616941 } + },{ + { 0, 76.434608546092 }, { 179.918287057674124459, -76.48787937532808951 }, + { 19997750.023578, 167.428385412814, 12.621032110142724567, 9619.5267710862108, -1.00233963893091582164629471662919968 } + },{ + { 0, 73.114273316483 }, { 179.576736605988553624, -73.098788070892914568 }, + { 19992866.6147806, 78.154765899661, 102.085693546950923465, 8580.6475692800946, -0.999384143308475469957841141876997426 } + },{ + { 0, 1.125639056292 }, { 178.426819580880619395, -.694775021853292564 }, + { 19852573.5442848, 67.184842289382, 112.831314850896246589, 132932.8743502563937, -0.999732957962833457266071945923613384 } + } +}; + +size_t const expected_size_antipodal = sizeof(expected_antipodal) / sizeof(expected_results_antipodal); + +#endif // BOOST_GEOMETRY_TEST_INVERSE_CASES_ANTIPODAL_HPP diff --git a/src/boost/libs/geometry/test/formulas/inverse_cases_small_angles.hpp b/src/boost/libs/geometry/test/formulas/inverse_cases_small_angles.hpp new file mode 100644 index 00000000..6fe9557c --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/inverse_cases_small_angles.hpp @@ -0,0 +1,106 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan. + +// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_INVERSE_CASES_SMALL_ANGLES_HPP +#define BOOST_GEOMETRY_TEST_INVERSE_CASES_SMALL_ANGLES_HPP + +#include "inverse_cases.hpp" + +struct expected_results_small_angles +{ + coordinates p1; + coordinates p2; + expected_result karney; +}; + +/* + These values are collected from GeodTest which is associated with GeographicLib: + https://zenodo.org/record/32156 + + The conversion to C++ array format is done using this Python script: + https://github.com/adl1995/boost-geometry-extra/blob/master/geographiclib-dataset-parse-inverse.py + + Geodesic scale (M12) is absent from the GeodTest dataset, so it is manually generated + using GeographicLib using this C++ script: + https://github.com/adl1995/boost-geometry-extra/blob/master/geographicLib-direct-small_angles.cpp +*/ +expected_results_small_angles expected_small_angles[] = +{ + { + { 180, 0 },{ 0, 0 }, + { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 }, + },{ + { 180, 0 },{ 1e-300, 0 }, + { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 }, + },{ + { 180, 0 },{ 1e-200, 0 }, + { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 }, + },{ + { 180, 0 },{ 1e-100, 0 }, + { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 }, + },{ + { 180, 0 },{ 1e-50, 0 }, + { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 }, + },{ + { 180, 0 },{ 1e-20, 0 }, + { 20003931.45862544700503349304, -0.00000000000000000000, 180.00000000000000000000, 67125.61229850351810455322266, -1.00000000000000000000 }, + },{ + { 180, 0 },{ 1e-10, 0 }, + { 20003931.45862544700503349304, -9.501793528220011062168943853e-09, -179.9999999904981962117744843, 67125.61229850351810455322266, -1 }, + },{ + { 0, 1e-100 },{ 170, 1e-200}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-300 },{ 170, 1e-50}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-300 },{ 170, 1e-10}, + { 18924313.43485650792717933655, 89.99999999939157646622334141, 90.00000000060019544889655663, 1041298.80855225014965981245, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-100 },{ 170, 1e-50}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-200 },{ 170, 1e-50}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 0.0 },{ 170, 1e-10}, + { 18924313.43485650792717933655, 89.99999999939157646622334141, 90.00000000060019544889655663, 1041298.80855225014965981245, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-20 },{ 170, 1e-100}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-100 },{ 170, 0.0}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-10 },{ 170, 1e-300}, + { 18924313.43485650792717933655, 89.99999999939980455110344337, 90.00000000060842353377665859, 1041298.80855225014965981245, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-300 },{ 170, 1e-100}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-200 },{ 170, 1e-100}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 1e-10 },{ 170, 1e-50}, + { 18924313.43485650792717933655, 89.99999999939980455110344337, 90.00000000060842353377665859, 1041298.80855225014965981245, -0.9864919282563420210863114335 }, + },{ + { 0, 0.0 },{ 170, 1e-200}, + { 18924313.43485650792717933655, 90, 90, 1041298.808552250848151743412, -0.9864919282563420210863114335 }, + },{ + { 0, 0.0 },{ 170, 1e-10}, + { 18924313.43485650792717933655, 89.99999999939157646622334141, 90.00000000060019544889655663, 1041298.80855225014965981245, -0.9864919282563420210863114335 }, + } +}; + + +size_t const expected_size_small_angles = sizeof(expected_small_angles) / sizeof(expected_results_small_angles); + +#endif // BOOST_GEOMETRY_TEST_INVERSE_CASES_SMALL_ANGLES_HPP diff --git a/src/boost/libs/geometry/test/formulas/inverse_karney.cpp b/src/boost/libs/geometry/test/formulas/inverse_karney.cpp new file mode 100644 index 00000000..f7004b64 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/inverse_karney.cpp @@ -0,0 +1,104 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2016-2019 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Copyright (c) 2018 Adeel Ahmad, Islamabad, Pakistan. + +// Contributed and/or modified by Adeel Ahmad, as part of Google Summer of Code 2018 program + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + + +#include <sstream> + +#include "test_formula.hpp" +#include "inverse_cases.hpp" +#include "inverse_cases_antipodal.hpp" +#include "inverse_cases_small_angles.hpp" + +#include <boost/geometry/formulas/karney_inverse.hpp> + +#include <boost/geometry/srs/spheroid.hpp> + +template <typename Result> +void check_inverse(std::string const& name, + Result const& results, + bg::formula::result_inverse<double> const& result, + expected_result const& expected, + expected_result const& reference, + double reference_error) +{ + std::stringstream ss; + ss << "(" << results.p1.lon << " " << results.p1.lat << ")->(" << results.p2.lon << " " << results.p2.lat << ")"; + + check_one(name + "_d " + ss.str(), + result.distance, expected.distance, reference.distance, reference_error); + check_one(name + "_a " + ss.str(), + result.azimuth, expected.azimuth, reference.azimuth, reference_error, true); + check_one(name + "_ra " + ss.str(), + result.reverse_azimuth, expected.reverse_azimuth, reference.reverse_azimuth, reference_error, true); + check_one(name + "_rl " + ss.str(), + result.reduced_length, expected.reduced_length, reference.reduced_length, reference_error); + check_one(name + "_gs " + ss.str(), + result.geodesic_scale, expected.geodesic_scale, reference.geodesic_scale, reference_error); +} + +void test_all(expected_results const& results) +{ + double lon1d = results.p1.lon; + double lat1d = results.p1.lat; + double lon2d = results.p2.lon; + double lat2d = results.p2.lat; + + // WGS84 + bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793); + + bg::formula::result_inverse<double> result_k; + + typedef bg::formula::karney_inverse<double, true, true, true, true, true, 8> ka_t; + result_k = ka_t::apply(lon1d, lat1d, lon2d, lat2d, spheroid); + check_inverse("karney", results, result_k, results.vincenty, results.reference, 0.0000001); +} + +template <typename ExpectedResults> +void test_karney(ExpectedResults const& results) +{ + double lon1d = results.p1.lon; + double lat1d = results.p1.lat; + double lon2d = results.p2.lon; + double lat2d = results.p2.lat; + + // WGS84 + bg::srs::spheroid<double> spheroid(6378137.0, 6356752.3142451793); + + bg::formula::result_inverse<double> result; + + typedef bg::formula::karney_inverse<double, true, true, true, true, true, 8> ka_t; + result = ka_t::apply(lon1d, lat1d, lon2d, lat2d, spheroid); + check_inverse("karney", results, result, results.karney, results.karney, 0.0000001); +} + +int test_main(int, char*[]) +{ + for (size_t i = 0; i < expected_size; ++i) + { + test_all(expected[i]); + } + + for (size_t i = 0; i < expected_size_antipodal; ++i) + { + test_karney(expected_antipodal[i]); + } + + for (size_t i = 0; i < expected_size_small_angles; ++i) + { + test_karney(expected_small_angles[i]); + } + + return 0; +} diff --git a/src/boost/libs/geometry/test/formulas/test_formula.hpp b/src/boost/libs/geometry/test/formulas/test_formula.hpp new file mode 100644 index 00000000..9e41bfca --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/test_formula.hpp @@ -0,0 +1,97 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2016-2019 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_FORMULA_HPP +#define BOOST_GEOMETRY_TEST_FORMULA_HPP + +#include <geometry_test_common.hpp> + +#include <boost/geometry/util/math.hpp> + +void normalize_deg(double & deg) +{ + while (deg > 180.0) + deg -= 360.0; + while (deg <= -180.0) + deg += 360.0; +} + + +#define BOOST_GEOMETRY_CHECK_CLOSE( L, R, T, M ) BOOST_TEST_TOOL_IMPL( 0, \ + ::boost::test_tools::check_is_close_t(), M, CHECK, CHECK_MSG, (L)(R)(::boost::math::fpc::percent_tolerance(T)) ) + + +void check_one(std::string const& name, double result, double expected) +{ + std::string id = name.empty() ? "" : (name + " : "); + + double eps = std::numeric_limits<double>::epsilon(); + double abs_result = bg::math::abs(result); + double abs_expected = bg::math::abs(expected); + double res_max = (std::max)(abs_result, abs_expected); + double res_min = (std::min)(abs_result, abs_expected); + if (res_min <= eps) // including 0 + { + bool is_close = abs_result <= 30 * eps && abs_expected <= 30 * eps; + BOOST_CHECK_MESSAGE((is_close), + id << std::setprecision(20) << "result {" << result << "} different than expected {" << expected << "}."); + } + else if (res_max > 100 * eps) + { + BOOST_GEOMETRY_CHECK_CLOSE(result, expected, 0.1, + id << std::setprecision(20) << "result {" << result << "} different than expected {" << expected << "}."); + } + else if (res_max > 10 * eps) + { + BOOST_GEOMETRY_CHECK_CLOSE(result, expected, 10, + id << std::setprecision(20) << "result {" << result << "} different than expected {" << expected << "}."); + } + else if (res_max > eps) + { + BOOST_GEOMETRY_CHECK_CLOSE(result, expected, 1000, + id << std::setprecision(20) << "result {" << result << "} different than expected {" << expected << "}."); + } +} + +void check_one(std::string const& name, + double result, double expected, double reference, double reference_error, + bool normalize = false, bool check_reference_only = false) +{ + std::string id = name.empty() ? "" : (name + " : "); + + if (normalize) + { + normalize_deg(result); + normalize_deg(expected); + normalize_deg(reference); + } + + if (! check_reference_only) + { + check_one(name, result, expected); + } + + // NOTE: in some cases it probably will be necessary to normalize + // the differences between the result and expected result + double ref_diff = bg::math::abs(result - reference); + double ref_max = (std::max)(bg::math::abs(result), bg::math::abs(reference)); + bool is_ref_close = ref_diff <= reference_error || ref_diff <= reference_error * ref_max; + BOOST_CHECK_MESSAGE((is_ref_close), + id << std::setprecision(20) << "result {" << result << "} and reference {" << reference << "} not close enough."); +} + +void check_one(double result, double expected, double reference, double reference_error, + bool normalize = false, bool check_reference_only = false) +{ + check_one("", result, expected, reference, reference_error, normalize, check_reference_only); +} + +#endif // BOOST_GEOMETRY_TEST_FORMULA_HPP diff --git a/src/boost/libs/geometry/test/formulas/vertex_longitude.cpp b/src/boost/libs/geometry/test/formulas/vertex_longitude.cpp new file mode 100644 index 00000000..1aadc4a3 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/vertex_longitude.cpp @@ -0,0 +1,154 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2017 Oracle and/or its affiliates. + +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include <geometry_test_common.hpp> + +#include "test_formula.hpp" +#include "vertex_longitude_cases.hpp" + +#include <boost/geometry/formulas/vertex_latitude.hpp> +#include <boost/geometry/formulas/vertex_longitude.hpp> +#include <boost/geometry/formulas/vincenty_inverse.hpp> +#include <boost/geometry/formulas/thomas_inverse.hpp> +#include <boost/geometry/formulas/andoyer_inverse.hpp> + +#include <boost/geometry/strategies/strategies.hpp> + +#include <boost/geometry/util/math.hpp> + +#define BOOST_GEOMETRY_TEST_DEBUG + +namespace bg = boost::geometry; + +template<typename CT> +CT test_vrt_lon_sph(CT lon1r, + CT lat1r, + CT lon2r, + CT lat2r) +{ + CT a1 = bg::formula::spherical_azimuth(lon1r, lat1r, lon2r, lat2r); + + typedef bg::model::point<CT, 2, + bg::cs::spherical_equatorial<bg::radian> > point; + + bg::model::segment<point> segment(point(lon1r, lat1r), + point(lon2r, lat2r)); + bg::model::box<point> box; + bg::envelope(segment, box); + + CT vertex_lat; + CT lat_sum = lat1r + lat2r; + if (lat_sum > CT(0)) + { + vertex_lat = bg::get_as_radian<bg::max_corner, 1>(box); + } else { + vertex_lat = bg::get_as_radian<bg::min_corner, 1>(box); + } + + bg::strategy::azimuth::spherical<> azimuth; + + return bg::formula::vertex_longitude + <CT, bg::spherical_equatorial_tag>:: + apply(lon1r, lat1r, + lon2r, lat2r, + vertex_lat, + a1, + azimuth); +} + +template +< + template <typename, bool, bool, bool, bool, bool> class FormulaPolicy, + typename CT + > +CT test_vrt_lon_geo(CT lon1r, + CT lat1r, + CT lon2r, + CT lat2r) +{ + // WGS84 + bg::srs::spheroid<CT> spheroid(6378137.0, 6356752.3142451793); + + typedef FormulaPolicy<CT, false, true, false, false, false> formula; + CT a1 = formula::apply(lon1r, lat1r, lon2r, lat2r, spheroid).azimuth; + + typedef bg::model::point<CT, 2, bg::cs::geographic<bg::radian> > geo_point; + + bg::model::segment<geo_point> segment(geo_point(lon1r, lat1r), + geo_point(lon2r, lat2r)); + bg::model::box<geo_point> box; + bg::envelope(segment, box); + + CT vertex_lat; + CT lat_sum = lat1r + lat2r; + if (lat_sum > CT(0)) + { + vertex_lat = bg::get_as_radian<bg::max_corner, 1>(box); + } else { + vertex_lat = bg::get_as_radian<bg::min_corner, 1>(box); + } + + bg::strategy::azimuth::geographic<> azimuth_geographic; + + return bg::formula::vertex_longitude + <CT, bg::geographic_tag>::apply(lon1r, lat1r, + lon2r, lat2r, + vertex_lat, + a1, + azimuth_geographic); + +} + +void test_all(expected_results const& results) +{ + double const d2r = bg::math::d2r<double>(); + + double lon1r = results.p1.lon * d2r; + double lat1r = results.p1.lat * d2r; + double lon2r = results.p2.lon * d2r; + double lat2r = results.p2.lat * d2r; + + if(lon1r > lon2r) + { + std::swap(lon1r, lon2r); + std::swap(lat1r, lat2r); + } + + double res_an = test_vrt_lon_geo<bg::formula::andoyer_inverse> + (lon1r, lat1r, lon2r, lat2r); + double res_th = test_vrt_lon_geo<bg::formula::thomas_inverse> + (lon1r, lat1r, lon2r, lat2r); + double res_vi = test_vrt_lon_geo<bg::formula::vincenty_inverse> + (lon1r, lat1r, lon2r, lat2r); + double res_sh = test_vrt_lon_sph(lon1r, lat1r, lon2r, lat2r); + + bg::math::normalize_longitude<bg::radian, double>(res_an); + bg::math::normalize_longitude<bg::radian, double>(res_th); + bg::math::normalize_longitude<bg::radian, double>(res_vi); + bg::math::normalize_longitude<bg::radian, double>(res_sh); + + check_one(res_an, results.andoyer * d2r, res_vi, 0.001); + check_one(res_th, results.thomas * d2r, res_vi, 0.01);//in some tests thomas gives low accuracy + check_one(res_vi, results.vincenty * d2r, res_vi, 0.0000001); + check_one(res_sh, results.spherical * d2r, res_vi, 1); +} + +int test_main(int, char*[]) +{ + + for (size_t i = 0; i < expected_size; ++i) + { + test_all(expected[i]); + } + + return 0; +} + diff --git a/src/boost/libs/geometry/test/formulas/vertex_longitude_cases.hpp b/src/boost/libs/geometry/test/formulas/vertex_longitude_cases.hpp new file mode 100644 index 00000000..2357c2b1 --- /dev/null +++ b/src/boost/libs/geometry/test/formulas/vertex_longitude_cases.hpp @@ -0,0 +1,457 @@ +// Boost.Geometry +// Unit Test + +// Copyright (c) 2017 Oracle and/or its affiliates. + +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_TEST_VERTEX_LONGITUDE_CASES_HPP +#define BOOST_GEOMETRY_TEST_VERTEX_LONGITUDE_CASES_HPP + +struct coordinates +{ + double lon; + double lat; +}; + +struct expected_result +{ + double lon; + double lat; +}; + +struct expected_results +{ + coordinates p1; + coordinates p2; + double andoyer; + double thomas; + double vincenty; + double spherical; +}; + +expected_results expected[] = +{ + { //ascenting segments (wrt pole) + { 1, 1 },{ 100, 2 }, + 66.25553538, + 66.25594187, + 66.25594273, + 66.39744208 + },{ + { 1, 1 },{ 90, 2 }, + 64.09051435, + 64.09082287, + 64.09082352, + 64.24414382 + },{ + { 0, 1 },{ 50, 1 }, + 24.99994265, + 24.99999906, + 25, + 25 + },{ + { 0, 1 },{ 50, 1.1 }, + 30.79039009, + 30.79049758, + 30.79049828, + 30.83209056 + },{ + { 0, 1 },{ 50, 1.2 }, + 35.95625867, + 35.95640445, + 35.95640493, + 36.0343576 + },{ + { 0, 1 },{ 50, 1.3 }, + 40.52204781, + 40.52222064, + 40.52222094, + 40.63120292 + },{ + { 0, 1 },{ 50, 1.4 }, + 44.53768967, + 44.53788045, + 44.53788061, + 44.6729585 + },{ + { 0, 1 },{ 50, 1.5 }, + 48.06382018, + 48.0640219, + 48.06402195, + 48.22088385 + },{ + { 0, 1 },{ 50, 1.6 }, + 50, + 50, + 50, + 50 + },{ //descending segment (wrt pole) + { 50, 1 },{ 0, 1.1 }, + 19.20950181, + 19.20950054, + 19.20950172, + 19.16790944 + },{ + { 50, 1 },{ 0, 1.2 }, + 14.04365003, + 14.04359367, + 14.04359507, + 13.9656424 + },{ + { 50, 1 },{ 0, 1.3 }, + 9.477883847, + 9.477777483, + 9.477779056, + 9.368797077 + },{ + { 50, 1 },{ 0, 1.4 }, + 5.462267984, + 5.462117673, + 5.462119386, + 5.327041497 + },{ + { 50, 1 },{ 0, 1.5 }, + 1.936164363, + 1.935976226, + 1.93597805, + 1.779116148 + },{ + { 3, 5 },{ 150, 0}, + 60.29182988, + 60.29785309, + 60.29785255, + 60 + },{ + { 3, 5 },{ 150, 0.5}, + 63.11344576, + 63.11900045, + 63.11899891, + 62.87000766 + },{ + { 3, 5 },{ 150, 1}, + 65.51880171, + 65.52391866, + 65.52391623, + 65.31813729 + },{ + { 3, 5 },{ 150, 5}, + 76.49727275, + 76.50000657, + 76.5, + 76.5 + },{ //segments parallel to equator + { 0, 1 },{ 4, 1 }, + 1.999999973, + 1.999999925, + 2, + 2 + },{ + { 0, 1 },{ 10, 1 }, + 4.999999569, + 4.999999812, + 5, + 5 + },{ + { 0, 1 },{ 60, 1 }, + 29.9998978, + 29.99999887, + 30, + 30 + },{ + { 0, 1 },{ 90, 1 }, + 44.99960266, + 45.22272756,//thomas low accuracy + 45, + 45 + },{ + { 0, 1 },{ 120, 1 }, + 59.99878311, + 59.99999778, + 60, + 60 + },{ + { 0, 1 },{ 180, 1 }, + 90, + 90, + 90, + 90 + },{ + { 0, 1 },{ 270, 1 }, + -44.99960266, + -45.08931472,//thomas low accuracy + -45, + -45 + },{ + { 0, 1 },{ 290, 1 }, + -34.9998314, + -34.99999868, + -35, + -35 + },{ + { 0, 1 },{ 150, 1 }, + 74.99598515, + 74.99999794, + 75, + 75 + },{ + { 0, 1 },{ 180, 1 }, + 90, + 90, + 90, + 90 + },{ //in equator vertex is any point on segment + { 1, 0 },{ 10, 0 }, + 1, + 1, + 1, + 1 + },{// one point on equator (descending) + { 150, 0},{ 3, 1 }, + 60.29513726, + 60.30158943, + 60.3015947, + 60 + },{// one point on equator (ascending) + { 3, 0 },{ 150, 1}, + 92.69840523, + 92.6984053, + 92.6984053, + 93 + },{ //meridian + { 1, 1 },{ 1, 2 }, + 1, + 1, + 1, + 1 + },{ //nearly meridian + { 1, 1 },{ 1.001, 2 }, + 1.001, + 1.001, + 1.001, + 1.001 + },{ //vertex is a segment's endpoint + { 1, 1 },{ 10, 2 }, + 10, + 10, + 10, + 10 + },{ + { 10, 1 },{ 1, 2 }, + 1, + 1, + 1, + 1 + },{ //South hemisphere, ascending + { 0, -1 },{ 50, -1.4 }, + 44.53768958, + 44.53788035, + 44.53788052, + 44.6729585 + },{ //South hemisphere, descending + { 0, -1.5 },{ 50, -1 }, + 1.936164356, + 1.935976219, + 1.935978042, + 1.779116148 + },{ //South hemisphere, same latitude + { 0, -1 },{ 50, -1 }, + 24.99994261, + 24.99999901, + 24.99999995, + 25 + },{//Both hemispheres, vertex on the northern + //A desc vertex north + { 3, 5 },{ 150, -3}, + 27.357069, + 27.36422922, + 27.36423549, + 26.74999989 + },{//B asc vertex north + { 3, -3 },{ 150, 5}, + 125.6403436, + 125.6357677, + 125.6357659, + 126.2500001 + },{//C desc vertex south + { 3, -5 },{ 150, 3}, + 27.3570679, + 27.36422812, + 27.36423439, + 26.74999989 + },{//D asc vertex south + { 3, 3 },{ 150, -5}, + 125.6403423, + 125.6357664, + 125.6357645, + 126.2500001 + },{//E asc vertex south + { 3, 3 },{ 184, -5}, + -88.00743796, + -88.0660268, + -88.0558747, + -88.49315894 + },{ + { 3, 5 },{ 150, -3.5}, + 17.96722293, + 17.97322407, + 17.97323051, + 17.3742464 + },{ + { 3, 5 },{ 150, -1}, + 52.9706038, + 52.97759463, + 52.9775964, + 52.56504545 + },{ //Both hemispheres, vertex on the southern + { 3, 3},{ 5, -5}, + 5, + 5, + 5, + 5 + },{ + { 3, -5 },{ 150, 1}, //symmetric to { 3, 5 },{ 150, -1} + 52.97060093, + 52.97759176, + 52.97759353, + 52.56504545 + },{// fix p1 lon, lat and p2 lon and vary p2 lat + { 3, 5 },{ 150, 1}, + 65.51880171, + 65.52391866, + 65.52391623, + 65.31813729 + },{ + { 3, 5 },{ 150, 0}, + 60.29182988, + 60.29785309, + 60.29785255, + 60 + },{ + { 3, 5 },{ 150, -0.1}, + 59.66911673, + 59.67523649, + 59.67523616, + 59.36690727 + },{ + { 3, 5 },{ 150, -1}, + 52.9706038, + 52.97759463, + 52.9775964, + 52.56504545 + },{ + { 3, 5 },{ 150, -4.15}, + 4.481947557, + 4.485467841, + 4.485473295, + 3.981178967 + },{ + { 3, 5 },{ 150, -4.2}, + 3, + 3, + 3, + 3 + },{//symmetry of geodesics: + // (i) case A same as C and B same as D + // (ii) longitude diff between vertex and p2 in A, C equals + // longitude diff between vertex and p1 in B, D by symmetry + // case (A) + { 0, 5 },{ 30, 5.5}, + 25.06431998, + 25.0644277, + 25.06442787, + 25.13253724 + },{// case (B) + { 0, 5.5 },{ 30, 5}, + 4.935667094, + 4.935571216, + 4.93557213, + 4.867462762 + },{// case (C) + { 0, -5 },{ 30, -5.5}, + 25.06431885, + 25.06442657, + 25.06442674, + 25.13253724 + },{// case (D) + { 0, -5.5 },{ 30, -5}, + 4.935666841, + 4.935570963, + 4.935571877, + 4.867462762 + },{//crossing meridian + { -10, 1 },{ 50, 1.1}, + 24.68113946, + 24.68127641, + 24.68127733, + 24.71605263 + },{ + { 350, 1 },{ 50, 1.1}, + 24.68113946, + 24.68127641, + 24.68127733, + 24.71605263 + },{//crossing antimeridian + { 130, 1 },{ 190, 1.1}, + 164.6811395, + 164.6812764, + 164.6812773, + 164.7160526 + },{ + { 130, 1 },{ -170, 1.1}, + 164.6811395, + 164.6812764, + 164.6812773, + 164.7160526 + },{//crossing meridian both hemispheres + { -10, -5 },{ 150, 1}, + 55.61285835, + 55.62727853, + 55.62725182, + 55.19943725 + },{ + { 350, -5 },{ 150, 1}, + 55.6243632, + 55.6272619, + 55.627257, + 55.1994373 + },{//crossing anti-meridian both hemispheres + { 90, -5 },{ 210, 1}, + 109.4997596, + 109.5011987, + 109.5012031, + 109.1354089 + },{ + { 90, -5 },{ -150, 1}, + 109.4997596, + 109.5011987, + 109.5012031, + 109.1354089 + },{ + { -150, -5 },{ 90, 1}, + -169.4997596, + -169.5011987, + -169.5012031, + -169.1354089 + },{ + { 90, 1 },{ 210, -5}, + -169.5008004, + -169.5012037, + -169.501204, + -169.1354089 + },{ + { 0, 1 },{ 120, -5}, + 100.4991996, + 100.4987963, + 100.498796, + 100.8645911 + } +}; + +size_t const expected_size = sizeof(expected) / sizeof(expected_results); + +#endif // BOOST_GEOMETRY_TEST_VERTEX_LONGITUDE_CASES_HPP |