• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry
2 // Unit Test
3 
4 // Copyright (c) 2018 Oracle and/or its affiliates.
5 
6 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
7 
8 // Use, modification and distribution is subject to the Boost Software License,
9 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
11 
12 #ifndef BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP
13 #define BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP
14 
15 struct coordinates
16 {
17     double lon;
18     double lat;
19 };
20 
21 struct expected_results
22 {
23     coordinates p1;
24     double distance;
25     bool direction;//north=true, south=false
26     coordinates p2;
27 };
28 
29 expected_results expected[] =
30 {
31     { {0, 0}, 100000, true, {0, 0.90435537782} },
32     { {0, 0}, 200000, true, {0, 1.8087062846} },
33     { {0, 0}, 300000, true, {0, 2.7130880778385226826} },
34     { {0, 0}, 400000, true, {0, 3.6174296804714929365} },
35     { {0, 0}, 500000, true, {0, 4.521753233678117212} },
36     { {0, 0}, 600000, true, {0, 5.4260542596891729872} },
37     { {0, 0}, 700000, true, {0, 6.3303283037366426811} },
38     { {0, 0}, 800000, true, {0, 7.234570938597034484} },
39     { {0, 0}, 900000, true, {0, 8.1386639105161684427} },
40     { {0, 0}, 1000000, true, {0, 9.0428195432854963087} },
41     { {0, 0}, 10000000, true, {0, 89.982400761362015373} },
42     { {0, 0}, 10001965, true, {0, 90} },
43     { {0, 0}, 11000000, true, {180, 81.063836359} },
44     { {10, 0}, 11000000, true, {-170, 81.063836359} },
45     { {0, 1}, 100000, true, {0, 1.9043634563000368942} },
46     { {0, 10}, 100000, true, {0, 10.904070448} },
47     { {0, 80}, 100000, true, {0, 80.895552833} },
48     { {0, 0}, 40010000, true, {0, 0.01932683869} },//wrap the spheroid once
49     { {0, 10}, 100000, false, {0, 9.0956502718} },
50     { {0, 10}, 2000000, false, {0, -8.0858305929} },
51     { {0, 0}, 11000000, false, {180, -81.063836359} },
52     { {0, 0}, 40010000, false, {0, -0.01932683869} } //wrap the spheroid once
53 };
54 
55 size_t const expected_size = sizeof(expected) / sizeof(expected_results);
56 
57 #endif // BOOST_GEOMETRY_TEST_DIRECT_MERIDIAN_CASES_HPP
58