GeographicLib 2.1.2
|
Find a sequence of points on a single rhumb line. More...
#include <GeographicLib/Rhumb.hpp>
Public Types | |
enum | mask { NONE , LATITUDE , LONGITUDE , AZIMUTH , DISTANCE , AREA , LONG_UNROLL , ALL } |
Public Member Functions | |
RhumbLine (const RhumbLine &)=default | |
void | Position (real s12, real &lat2, real &lon2, real &S12) const |
void | Position (real s12, real &lat2, real &lon2) const |
void | GenPosition (real s12, unsigned outmask, real &lat2, real &lon2, real &S12) const |
Inspector functions | |
Math::real | Latitude () const |
Math::real | Longitude () const |
Math::real | Azimuth () const |
Math::real | EquatorialRadius () const |
Math::real | Flattening () const |
Friends | |
class | Rhumb |
Find a sequence of points on a single rhumb line.
RhumbLine facilitates the determination of a series of points on a single rhumb line. The starting point (lat1, lon1) and the azimuth azi12 are specified in the call to Rhumb::Line which returns a RhumbLine object. RhumbLine.Position returns the location of point 2 (and, optionally, the corresponding area, S12) a distance s12 along the rhumb line.
There is no public constructor for this class. (Use Rhumb::Line to create an instance.) The Rhumb object used to create a RhumbLine must stay in scope as long as the RhumbLine.
Example of use:
This is a duplication of Rhumb::mask.
|
default |
Construction is via default copy constructor.
|
inline |
Compute the position of point 2 which is a distance s12 (meters) from point 1. The area is also computed.
[in] | s12 | distance between point 1 and point 2 (meters); it can be negative. |
[out] | lat2 | latitude of point 2 (degrees). |
[out] | lon2 | longitude of point 2 (degrees). |
[out] | S12 | area under the rhumb line (meters2). |
The value of lon2 returned is in the range [−180°, 180°].
If s12 is large enough that the rhumb line crosses a pole, the longitude of point 2 is indeterminate (a NaN is returned for lon2 and S12).
Definition at line 535 of file Rhumb.hpp.
Referenced by main().
|
inline |
void GeographicLib::RhumbLine::GenPosition | ( | real | s12, |
unsigned | outmask, | ||
real & | lat2, | ||
real & | lon2, | ||
real & | S12 | ||
) | const |
The general position routine. RhumbLine::Position is defined in term so this function.
[in] | s12 | distance between point 1 and point 2 (meters); it can be negative. |
[in] | outmask | a bitor'ed combination of RhumbLine::mask values specifying which of the following parameters should be set. |
[out] | lat2 | latitude of point 2 (degrees). |
[out] | lon2 | longitude of point 2 (degrees). |
[out] | S12 | area under the rhumb line (meters2). |
The RhumbLine::mask values possible for outmask are
With the RhumbLine::LONG_UNROLL bit set, the quantity lon2 − lon1 indicates how many times and in what sense the rhumb line encircles the ellipsoid.
If s12 is large enough that the rhumb line crosses a pole, the longitude of point 2 is indeterminate (a NaN is returned for lon2 and S12).
Definition at line 350 of file Rhumb.cpp.
References GeographicLib::Math::AngNormalize(), AREA, GeographicLib::Math::degree(), GeographicLib::Math::hd, GeographicLib::Ellipsoid::InverseRectifyingLatitude(), LATITUDE, LONG_UNROLL, LONGITUDE, GeographicLib::Math::NaN(), GeographicLib::Math::qd, and GeographicLib::Ellipsoid::QuarterMeridian().
Referenced by GeographicLib::Rhumb::GenDirect().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 602 of file Rhumb.hpp.
References GeographicLib::Rhumb::EquatorialRadius().
|
inline |
Definition at line 608 of file Rhumb.hpp.
References GeographicLib::Rhumb::Flattening().