Skip to content

Conversation

@adl1995
Copy link
Contributor

@adl1995 adl1995 commented Jul 10, 2018

The implementation for Karney's inverse method is almost complete. The test cases are similar to Karney's direct method i.e. taken from GeographicLib. However, there a some bugs in the calculation which leads to failure in test cases.

Once those are resolved, you could review the code for any improvements.

adl1995 added 29 commits June 5, 2018 12:44
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.
This fixes the inaccuracy caused during the
calculation of Newton's starting point.
For details, please refer to Eq. (65) in,
Geodesics on an ellipsoid of revolution, Charles F.F Karney,
https://arxiv.org/abs/1102.1215
Conflicts (resolved):
	include/boost/geometry/util/math.hpp
…e structure

The computed values from inverse method include distance, azimuth,
reverse_azimuth, reduced_length, and geodesic_scale.
The compilation is successful with gcc version (7.2.0),
but not with version (5.4.1). The accepted tolerance
is set to (0.0000001). Currently, all tests are not
passing, which indicates an error in the calculation.

Additionally, some changes have been made in
karney_inverse.hpp
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
@adl1995
Copy link
Contributor Author

adl1995 commented Jul 13, 2018

@vissarion, @awulkiew - I have resolved the bug which was causing test failures.

Since all tests are passing now, please feel free to review the code.

@adl1995 adl1995 changed the title WIP: Introduce formula for Karney's inverse geodesic method Introduce formula for Karney's inverse geodesic method Jul 20, 2018
@vissarion
Copy link
Member

@adl1995 are you willing to answer the above comments so we can merge this piece of code?

I am ok with merging if the above comments are somehow addressed.

@adl1995
Copy link
Contributor Author

adl1995 commented Feb 7, 2019

@vissarion - Sorry for not being responsive on this PR.

I will try and address the comments in the coming weeks so this can be merged.

adl1995 added 2 commits March 17, 2019 11:23
NaN was previously being used when the angle was greater
than 90 deg. Since we now use the maximum angle value [-90, 90]
this function is no longer required.
@adl1995 adl1995 force-pushed the feature/karney_inverse branch 3 times, most recently from 8bab57b to 05ae463 Compare March 17, 2019 11:21
@adl1995 adl1995 force-pushed the feature/karney_inverse branch from 2bbf930 to c5b684f Compare April 6, 2019 19:16
@vissarion vissarion modified the milestones: 1.71, 1.72 Jul 10, 2019
@vissarion
Copy link
Member

Thanks Adeel for the long effort.

NOTE: the operations are accurate (at least all the tests are passing) but I have noticed some performance issues, i.e. it is slower than GeographicLib, around 4 times in some quick benchmarks.

We could merge now and resolve this issue in a different PR. @awulkiew @barendgehrels what do you think?

@awulkiew
Copy link
Member

@adl1995 Thanks!

@vissarion Yes, I'm ok with merging it now.

@vissarion vissarion merged commit 8f1e506 into boostorg:develop Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants