Commit Graph

7446 Commits

Author SHA1 Message Date
Adeel Ahmad
02577bda55 [formulas] Use midpoint of bracket when value lies outside of range 2018-06-20 21:31:18 +05:00
Adeel Ahmad
ead0b188f9 [formulas] Update bracketing values in Newton's method 2018-06-19 20:26:49 +05:00
Adeel Ahmad
2ddad45616 [util] Move difference_angle function to normalize_spheroidal_coordinates.hpp 2018-06-19 18:11:17 +05:00
Adeel Ahmad
490b4df943 Merge branch 'feature/geodesic_direct' into feature/karney_inverse
Conflicts (resolved):
	include/boost/geometry/util/math.hpp
2018-06-19 10:05:16 +05:00
Adeel Ahmad
78411f63c8 [doc][util][formulas][test] Add copyright information in updated files 2018-06-18 18:05:11 +05:00
Adeel Ahmad
2c7a29e7dc [formulas][util] Improve code formatting to conform with guidelines 2018-06-15 18:52:30 +05:00
Adeel Ahmad
318a61dce0 [formulas] Use updated functions for normalization 2018-06-15 18:20:01 +05:00
Adeel Ahmad
d591d7a7bb [util] Use existing normalize_spheroidal_coordinates class for normalizing an angle
- This should normalize the given angle in range (-180, 180].
- The function normalize is also moved from math.hpp to
normalize_spheroidal_coordinates.hpp where it is renamed
to normalize_values
2018-06-15 18:14:17 +05:00
Adeel Ahmad
06fc06dc7f [formulas] Add function lambda12 to regulate bracketing range in Karney inverse 2018-06-14 13:42:44 +05:00
Adeel Ahmad
642a84c551 Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-14 13:34:29 +05:00
Adeel Ahmad
943672bd3a [formulas] Use template argument CT instead of double
This change is made in Karney's direct method.
2018-06-14 13:27:33 +05:00
Adeel Ahmad
2aac4027aa Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-14 11:54:09 +05:00
Adeel Ahmad
d11b7160b2 [formulas] Fix calculation of t for finding the geodesic scale (M12) 2018-06-13 12:26:56 +05:00
Adeel Ahmad
15d5cd6281 [formulas] Perform normalization on starting guess if it passes the sanity check 2018-06-12 18:32:26 +05:00
Adeel Ahmad
2bde1c119a [formulas] Solve the astroid equation for inverse problem
For details, please refer to Eq. (65) in,
Geodesics on an ellipsoid of revolution, Charles F.F Karney,
https://arxiv.org/abs/1102.1215
2018-06-12 18:27:29 +05: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
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
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
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
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
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