boostorg/geometry — pull request #183 by awulkiew (2014-11-21 00:38:45+00:00)
Title: Feature/geographic

The purpose of this PR is to move an algorithm resolving vincenty inverse problem outside of the vincenty strategy.

The goal was to add the algorithm a way of calculating not only distance but also forward and reverse azimuths and in the same time to reuse as much code as possible. I implemented a class performing a common part of the algorithm in the ctor and allowing to calculate desired result with member functions. This way it's possible to e.g. calculate the distance and azimuth without recalculating most of the intermediate values:

vincenty_inverse vi(lon1, lat1, lon2, lat2, spheroid);
vi.distance();
vi.azimuth12();

The next step is to move the vincenty and andoyer strategies out of the extensions. Since Vincenty's algorithm could be used one way or another in various strategies would it be a good idea to rename it (e.g. to `vincenty_distance`)? Or would you prefer to leave the name `vincenty` for a distance strategy and pick some suitable names for possible other strategies in the future?