Commit Graph

8536 Commits

Author SHA1 Message Date
Vissarion Fysikopoulos
b7406fd19c [formulas] Spherical direct formula 2018-06-12 15:29:56 +03:00
Vissarion Fysikopoulos
c572601efa [formulas] [strategies] Rename elliptic_arc_length formula to elliptic_meridian_arc_inverse for consistency 2018-06-12 14:48:06 +03:00
Vissarion Fysikopoulos
d22c39b52c [formulas] Elliptic meridian arc direct formula 2018-06-12 14:36:12 +03:00
Adeel Ahmad
5bb581c932
[formulas] Flip sign of cos_lam12
This fixes the inaccuracy caused during the
calculation of Newton's starting point.
2018-06-12 15:51:55 +05:00
Adeel Ahmad
71fbc86f44 Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-12 15:42:41 +05:00
Adeel Ahmad
2cba2fa83f
[test] Calculate geodesic scale (M12) using high precision arithmetic
Instructions for building GeographicLib are given here:
https://geographiclib.sourceforge.io/html/highprec.html

It requires the use of libquadmath package, which is present
in g++-7 by default. The cmake command used is:
cmake -DCMAKE_CXX_COMPILER=g++-7 -DGEOGRAPHICLIB_PRECISION=4 ..

Internally, GeographicLib makes use of float128 as part of Boost
Multiprecision library. To output full precision values, use:
std::setprecision(std::numeric_limits<float128>::max_digits10)
2018-06-12 12:00:52 +05:00
Adeel Ahmad
485a2f9a0f
[formulas] Find starting point for inverse problem (short lines) 2018-06-11 18:44:27 +05:00
Adeel Ahmad
0344ba5c1a
[formulas] Handle case for equatorial points in inverse problem 2018-06-11 11:06:18 +05:00
Adeel Ahmad
fe1b9ff8ba
[test] Update geodesic scale (M12) in GeographicLib dataset
M12 is calculated manually using GeographicLib. Previously,
GEOGRAPHICLIB_PRECISION was set to 2 (default) with series
order set to 6. The updated values are generated with
GEOGRAPHICLIB_PRECISION set to 3 and series order set to 7.

Build instructions are provided here:
https://geographiclib.sourceforge.io/html/install.html
2018-06-09 16:17:42 +05:00
Adeel Ahmad
96074e2ab2
[test] Use series order 2 for Karney's direct method
Boost Geometry dataset is created with series order 2. Therefore,
the tests fail at all other values.
2018-06-09 16:15:55 +05:00
Adeel Ahmad
043f401fbe
[util] Use Maxima generated function for computing C3x coefficients
The script used is geod.mac:
https://sourceforge.net/p/geographiclib/code/ci/release/tree/maxima/geod.mac
2018-06-09 16:11:46 +05:00
Phillip Palk
61679f4adc [iterators] use the base type (iterator_facade) for the reference and difference_type typedefs inside closing_iterator and ever_circling_iterator. Also, fixed reference_type type name to be reference. 2018-06-08 08:18:01 +10:00
Adeel Ahmad
276e8e6d7a
[formulas] Add function for computing the length at the meridians
This method is an integral part of Karney's solution to inverse
geodesic problem. It is only invoked for points that lie on
the meridian, or are close to it.
2018-06-07 18:28:22 +05:00
Adeel Ahmad
efd30c8ccc Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-07 11:00:37 +05:00
Adeel Ahmad
8a2dd63ccf
[util] Move sin_cos_series function to series_expansion.hpp
This function is extensively used for the direct and
inverse geodesic problem, therefore, it is moved
to a more accessible location.
2018-06-07 10:58:13 +05:00
Phillip Palk
1d7a38fbee [iterators] fix return of a reference to a temporary object when using closing_iterator and ever_circling_iterator with transformed ranges. 2018-06-07 10:07:48 +10:00
Phillip Palk
43538e5f24 [test][iterators] add test case that demonstrates SEGFAULT when using closing_iterator and ever_circling_iterator with transformed ranges. 2018-06-07 10:07:33 +10:00
Adeel Ahmad
2e064c0f0d
[formulas] Arrange points in canonical form for inverse geodesic problem 2018-06-06 09:42:09 +05:00
Adeel Ahmad
7561d68c08
[util] Add function for returning NaN (not a number) 2018-06-06 09:39:31 +05:00
Adeel Ahmad
49e0a4fdae Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-06 08:24:27 +05:00
Adeel Ahmad
df0cafdd19
[doc] Move Maxima scripts for geodesics to doc/other/maxima/geod.mac 2018-06-05 17:26:30 +05:00
Adeel Ahmad
b9b0f85560
[util] Add functions to normalize / sum two given values (angles) 2018-06-05 12:44:36 +05:00
Adeel Ahmad
a10815366a
[test] Add comment providing dataset source and how it is parsed 2018-06-05 10:21:49 +05:00
Adeel Ahmad
cc19342b4e
[util] Remove duplicated Maxima code from series_expansion.hpp 2018-06-05 09:28:37 +05:00
Adeel Ahmad
831873752d
[formulas] Use constant type variables for comparison 2018-06-04 19:12:50 +05:00
Adeel Ahmad
1ed5f103f4
[formulas] Move SeriesOrder to the end of template parameter list 2018-06-04 19:09:07 +05:00
Adam Wulkiewicz
097f6fdbe9
Merge pull request #482 from e-kwsm/include-cstring
[srs] Add missing cstring include.
2018-06-04 14:09:03 +02:00
Adeel Ahmad
4fa4a8206a
[util] Update series expansion for C3x 2018-05-31 17:40:53 +05:00
Adeel Ahmad
6ff97a6991
[test] Test Karney's method on antipodal points dataset 2018-05-31 16:36:16 +05:00
Adeel Ahmad
3c21b13c91
[test] Add geodesic length to antipodal points dataset
The geodesic length is calculated manually using GeographicLib/Geodesic.hpp
in C++. However, this value differs when calculated using the
CLI tool GeodSolve.
2018-05-31 16:28:09 +05:00
Adeel Ahmad
fdbb3886d3
[test] Add nearly antipodal points dataset for direct geodesic problem
Dataset is collected from:
https://zenodo.org/record/32156

It is then parsed using a Python script.
2018-05-30 12:14:33 +05:00
Adeel Ahmad
b8a225e1cf
[formulas] Fix direct geodesic method by performing normalization
- Add minus sign for B12 evaluation
2018-05-29 21:11:53 +05:00
Adeel Ahmad
3dd6bce720
[util] Add functions for normalizing and evaluating polynomial 2018-05-29 21:08:06 +05:00
Adeel Ahmad
1e31876e94
[util] Modify function for evaluting C3x coefficient
- Add separate function for evaluating C3 from C3x coefficient
2018-05-29 21:06:19 +05:00
Adeel Ahmad
afe7bc679c
[test] Add direct Karney's method to direct.cpp test cases 2018-05-28 16:46:20 +05:00
Adeel Ahmad
6a2897db25
[formulas][util] Add missing import and function return type 2018-05-28 12:28:14 +05:00
Vissarion Fysikopoulos
49fd8bcda4 [test] Adding distance tests for spherical and geographic cs and do some renaming 2018-05-25 14:05:33 +03:00
Adeel Ahmad
0c2b8cdbab
[formulas] Make variable declarations constant 2018-05-24 22:09:47 +05:00
Adeel Ahmad
ac4e483c92
[formulas] Compute the reduced length and geodesic scale using Karney's direct method 2018-05-24 11:26:56 +05:00
Adeel Ahmad
a0a55f361f
[util] Evaluate series and coefficients for A2 and C2 using series expansion 2018-05-24 11:18:26 +05:00
Vissarion Fysikopoulos
b504dcee4b [test] Remove duplicated tests (ar-ar,pl-ar) 2018-05-23 13:14:48 +03:00
Vissarion Fysikopoulos
04b6e0f16c [test] Distance areal-areal 2018-05-23 13:10:00 +03:00
Adeel Ahmad
9e2c74afc8
[formulas] Compute the longitude for second point using the longitudinal difference 2018-05-23 14:22:40 +05:00
Adeel Ahmad
9152191986
[util] Add functions to evaluate coefficients for A3 and C3 using series expansion 2018-05-23 12:32:21 +05:00
Adeel Ahmad
881c73c90b
[formulas] Compute the latitude for second point following Karney's method
- Link to paper: https://arxiv.org/pdf/1109.4448.pdf
2018-05-22 17:18:37 +05:00
Vissarion Fysikopoulos
1646a67df6 [tests] Tests for areal-box geo distance 2018-05-21 17:06:23 +03:00
Vissarion Fysikopoulos
d91259b4e1 [algorithms] [test] Use s/b distance strategy in linear-box cases 2018-05-21 15:39:12 +03:00
Adeel Ahmad
6ce1b099cb
[util] Evaluate coefficients for C1p using series expansion
- Fix conversion from degree to radian in sin_cos_degrees function
2018-05-21 16:32:28 +05:00
Adeel Ahmad
3700b4fafa
[util] Move series expansion functions to util/series_expansion.hpp 2018-05-19 21:49:24 +05:00
Adeel Ahmad
b6fcee8f30
[formulas] Compute sin cos series using Clenshaw summation
- Update function headers
2018-05-19 21:33:01 +05:00