Loading...
Searching...
No Matches
GeographicLib::GeodesicLineExact Class Reference

An exact geodesic line. More...

`#include <GeographicLib/GeodesicLineExact.hpp>`

## Public Types

enum | mask { NONE , LATITUDE , LONGITUDE , AZIMUTH , DISTANCE , STANDARD , DISTANCE_IN , REDUCEDLENGTH , GEODESICSCALE , AREA , LONG_UNROLL , ALL }
typedef GeodesicExact | BaseClass

## Public Member Functions

Constructors
| GeodesicLineExact (const GeodesicExact &g, real lat1, real lon1, real azi1, unsigned caps=ALL)
| GeodesicLineExact ()
Position in terms of distance
Math::real | Position (real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Math::real | Position (real s12, real &lat2, real &lon2) const
Math::real | Position (real s12, real &lat2, real &lon2, real &azi2) const
Math::real | Position (real s12, real &lat2, real &lon2, real &azi2, real &m12) const
Math::real | Position (real s12, real &lat2, real &lon2, real &azi2, real &M12, real &M21) const
Math::real | Position (real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21) const
Position in terms of arc length
void | ArcPosition (real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const
void | ArcPosition (real a12, real &lat2, real &lon2) const
void | ArcPosition (real a12, real &lat2, real &lon2, real &azi2) const
void | ArcPosition (real a12, real &lat2, real &lon2, real &azi2, real &s12) const
void | ArcPosition (real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12) const
void | ArcPosition (real a12, real &lat2, real &lon2, real &azi2, real &s12, real &M12, real &M21) const
void | ArcPosition (real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21) const
The general position function.
Math::real | GenPosition (bool arcmode, real s12_a12, unsigned outmask, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const
Setting point 3
void | SetDistance (real s13)
void | SetArc (real a13)
void | GenSetDistance (bool arcmode, real s13_a13)
Inspector functions
bool | Init () const
Math::real | Latitude () const
Math::real | Longitude () const
Math::real | Azimuth () const
void | Azimuth (real &sazi1, real &cazi1) const
Math::real | EquatorialAzimuth () const
void | EquatorialAzimuth (real &sazi0, real &cazi0) const
Math::real | EquatorialArc () const
Math::real | EquatorialRadius () const
Math::real | Flattening () const
unsigned | Capabilities () const
bool | Capabilities (unsigned testcaps) const
Math::real | GenDistance (bool arcmode) const
Math::real | Distance () const
Math::real | Arc () const

## Friends

class | GeodesicExact
class | GeodesicLine

## Detailed Description

An exact geodesic line.

GeodesicLineExact facilitates the determination of a series of points on a single geodesic. This is a companion to the GeodesicExact class. For additional information on this class see the documentation on the GeodesicLine class.

Example of use:

// Example of using the GeographicLib::GeodesicLineExact class
#include <iostream>
#include <iomanip>
#include <exception>
#include <cmath>
#include <GeographicLib/GeodesicExact.hpp>
#include <GeographicLib/GeodesicLineExact.hpp>
#include <GeographicLib/Constants.hpp>
using namespace std;
using namespace GeographicLib;
int main() {
try {
// Print waypoints between JFK and SIN
GeodesicExact geod(Constants::WGS84_a(), Constants::WGS84_f());
// Alternatively: const GeodesicExact& geod = GeodesicExact::WGS84();
double
lat1 = 40.640, lon1 = -73.779, // JFK
lat2 = 1.359, lon2 = 103.989; // SIN
GeodesicLineExact line = geod.InverseLine(lat1, lon1, lat2, lon2);
double ds0 = 500e3; // Nominal distance between points = 500 km
int num = int(ceil(line.Distance() / ds0)); // The number of intervals
cout << fixed << setprecision(3);
{
// Use intervals of equal length
double ds = line.Distance() / num;
for (int i = 0; i <= num; ++i) {
double lat, lon;
line.Position(i * ds, lat, lon);
cout << i << " " << lat << " " << lon << "\n";
}
}
{
// Slightly faster, use intervals of equal arc length
double da = line.Arc() / num;
for (int i = 0; i <= num; ++i) {
double lat, lon;
line.ArcPosition(i * da, lat, lon);
cout << i << " " << lat << " " << lon << "\n";
}
}
}
catch (const exception& e) {
cerr << "Caught exception: " << e.what() << "\n";
return 1;
}
}
main
int main(int argc, const char *const argv[])
Definition Cart3Convert.cpp:52
Constants.hpp
Header for GeographicLib::Constants class.
GeodesicExact.hpp
Header for GeographicLib::GeodesicExact class.
GeodesicLineExact.hpp
Header for GeographicLib::GeodesicLineExact class.
GeographicLib::Constants::WGS84_f
static T WGS84_f()
Definition Constants.hpp:118
GeographicLib::Constants::WGS84_a
static T WGS84_a()
Definition Constants.hpp:112
GeographicLib::GeodesicLineExact::GeodesicExact
friend class GeodesicExact
Definition GeodesicLineExact.hpp:45
GeographicLib::GeodesicLineExact::Arc
Math::real Arc() const
Definition GeodesicLineExact.hpp:671
GeographicLib::GeodesicLineExact::Position
Math::real Position(real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Definition GeodesicLineExact.hpp:263
GeographicLib::GeodesicLineExact::ArcPosition
void ArcPosition(real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const
Definition GeodesicLineExact.hpp:371
GeographicLib::GeodesicLineExact::Distance
Math::real Distance() const
Definition GeodesicLineExact.hpp:665
GeographicLib
Namespace for GeographicLib.
Definition Accumulator.cpp:12
std
Definition NearestNeighbor.hpp:806

GeodSolve is a command-line utility providing access to the functionality of GeodesicExact and GeodesicLineExact (via the -E option).

Definition at line 42 of file GeodesicLineExact.hpp.

## Member Typedef Documentation

## BaseClass

typedef GeodesicExact GeographicLib::GeodesicLineExact::BaseClass

Typedef for the base class implementing geodesics.

Definition at line 162 of file GeodesicLineExact.hpp.

## Member Enumeration Documentation

## mask

enum GeographicLib::GeodesicLineExact::mask

Bit masks for what calculations to do. They signify to the GeodesicLineExact::GeodesicLineExact constructor and to GeodesicExact::Line what capabilities should be included in the GeodesicLineExact object. This is merely a duplication of GeodesicExact::mask.

Enumerator
NONE | No capabilities, no output.
LATITUDE | Calculate latitude lat2. (It's not necessary to include this as a capability to GeodesicLineExact because this is included by default.)
LONGITUDE | Calculate longitude lon2.
AZIMUTH | Calculate azimuths azi1 and azi2. (It's not necessary to include this as a capability to GeodesicLineExact because this is included by default.)
DISTANCE | Calculate distance s12.
STANDARD | A combination of the common capabilities: GeodesicLineExact::LATITUDE, GeodesicLineExact::LONGITUDE, GeodesicLineExact::AZIMUTH, GeodesicLineExact::DISTANCE.
DISTANCE_IN | Allow distance s12 to be used as input in the direct geodesic problem.
REDUCEDLENGTH | Calculate reduced length m12.
GEODESICSCALE | Calculate geodesic scales M12 and M21.
AREA | Calculate area S12.
LONG_UNROLL | Unroll lon2 in the direct calculation.
ALL | All capabilities, calculate everything. (LONG_UNROLL is not included in this mask.)

Definition at line 89 of file GeodesicLineExact.hpp.

## Constructor & Destructor Documentation

## GeodesicLineExact() [1/2]

GeographicLib::GeodesicLineExact::GeodesicLineExact | ( | const GeodesicExact & | g,
|  | real | lat1,
|  | real | lon1,
|  | real | azi1,
|  | unsigned | caps = ALL )

Constructor for a geodesic line staring at latitude lat1, longitude lon1, and azimuth azi1 (all in degrees).

Parameters

  [in] | g | A GeodesicExact object used to compute the necessary information about the GeodesicLineExact.
  [in] | lat1 | latitude of point 1 (degrees).
  [in] | lon1 | longitude of point 1 (degrees).
  [in] | azi1 | azimuth at point 1 (degrees).
  [in] | caps | bitor'ed combination of GeodesicLineExact::mask values specifying the capabilities the GeodesicLineExact object should possess, i.e., which quantities can be returned in calls to GeodesicLine::Position.

lat1 should be in the range [−90°, 90°].

The GeodesicLineExact::mask values are

- caps |= GeodesicLineExact::LATITUDE for the latitude lat2; this is added automatically;
- caps |= GeodesicLineExact::LONGITUDE for the latitude lon2;
- caps |= GeodesicLineExact::AZIMUTH for the latitude azi2; this is added automatically;
- caps |= GeodesicLineExact::DISTANCE for the distance s12;
- caps |= GeodesicLineExact::REDUCEDLENGTH for the reduced length m12;
- caps |= GeodesicLineExact::GEODESICSCALE for the geodesic scales M12 and M21;
- caps |= GeodesicLineExact::AREA for the area S12;
- caps |= GeodesicLineExact::DISTANCE_IN permits the length of the geodesic to be given in terms of s12; without this capability the length can only be specified in terms of arc length;
- caps |= GeodesicLineExact::ALL for all of the above.

The default value of caps is GeodesicLineExact::ALL.

If the point is at a pole, the azimuth is defined by keeping lon1 fixed, writing lat1 = ±(90° − ε), and taking the limit ε → 0+.

Definition at line 124 of file GeodesicLineExact.cpp.

References GeographicLib::Math::AngNormalize(), GeographicLib::Math::AngRound(), GeodesicExact, and GeographicLib::Math::sincosd().

## GeodesicLineExact() [2/2]

GeographicLib::GeodesicLineExact::GeodesicLineExact | ( |  | ) |

inline

A default constructor. If GeodesicLineExact::Position is called on the resulting object, it returns immediately (without doing any calculations). The object can be set with a call to GeodesicExact::Line. Use Init() to test whether object is still in this uninitialized state.

Definition at line 217 of file GeodesicLineExact.hpp.

## Member Function Documentation

## Position() [1/6]

Math::real GeographicLib::GeodesicLineExact::Position | ( | real | s12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | m12,
|  | real & | M12,
|  | real & | M21,
|  | real & | S12 ) const

inline

Compute the position of point 2 which is a distance s12 (meters) from point 1.

Parameters

  [in] | s12 | distance from point 1 to point 2 (meters); it can be signed.
  [out] | lat2 | latitude of point 2 (degrees).
  [out] | lon2 | longitude of point 2 (degrees); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE.
  [out] | azi2 | (forward) azimuth at point 2 (degrees).
  [out] | m12 | reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH.
  [out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
  [out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
  [out] | S12 | area under the geodesic (meters2); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::AREA.

Returns
  a12 arc length from point 1 to point 2 (degrees).

The values of lon2 and azi2 returned are in the range [−180°, 180°].

The GeodesicLineExact object must have been constructed with caps |= GeodesicLineExact::DISTANCE_IN; otherwise Math::NaN() is returned and no parameters are set. Requesting a value which the GeodesicLineExact object is not capable of computing is not an error; the corresponding argument will not be altered.

The following functions are overloaded versions of GeodesicLineExact::Position which omit some of the output parameters. Note, however, that the arc length is always computed and returned as the function value.

Definition at line 263 of file GeodesicLineExact.hpp.

References AREA, AZIMUTH, GenPosition(), GEODESICSCALE, LATITUDE, LONGITUDE, and REDUCEDLENGTH.

## Position() [2/6]

Math::real GeographicLib::GeodesicLineExact::Position | ( | real | s12,
|  | real & | lat2,
|  | real & | lon2 ) const

inline

See the documentation for GeodesicLineExact::Position.

Definition at line 275 of file GeodesicLineExact.hpp.

References GenPosition(), LATITUDE, and LONGITUDE.

## Position() [3/6]

Math::real GeographicLib::GeodesicLineExact::Position | ( | real | s12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2 ) const

inline

See the documentation for GeodesicLineExact::Position.

Definition at line 286 of file GeodesicLineExact.hpp.

References AZIMUTH, GenPosition(), LATITUDE, and LONGITUDE.

## Position() [4/6]

Math::real GeographicLib::GeodesicLineExact::Position | ( | real | s12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | m12 ) const

inline

See the documentation for GeodesicLineExact::Position.

Definition at line 296 of file GeodesicLineExact.hpp.

References AZIMUTH, GenPosition(), LATITUDE, LONGITUDE, and REDUCEDLENGTH.

## Position() [5/6]

Math::real GeographicLib::GeodesicLineExact::Position | ( | real | s12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | M12,
|  | real & | M21 ) const

inline

See the documentation for GeodesicLineExact::Position.

Definition at line 308 of file GeodesicLineExact.hpp.

References AZIMUTH, GenPosition(), GEODESICSCALE, LATITUDE, and LONGITUDE.

## Position() [6/6]

Math::real GeographicLib::GeodesicLineExact::Position | ( | real | s12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | m12,
|  | real & | M12,
|  | real & | M21 ) const

inline

See the documentation for GeodesicLineExact::Position.

Definition at line 320 of file GeodesicLineExact.hpp.

References AZIMUTH, GenPosition(), GEODESICSCALE, LATITUDE, LONGITUDE, and REDUCEDLENGTH.

## ArcPosition() [1/7]

void GeographicLib::GeodesicLineExact::ArcPosition | ( | real | a12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | s12,
|  | real & | m12,
|  | real & | M12,
|  | real & | M21,
|  | real & | S12 ) const

inline

Compute the position of point 2 which is an arc length a12 (degrees) from point 1.

Parameters

  [in] | a12 | arc length from point 1 to point 2 (degrees); it can be signed.
  [out] | lat2 | latitude of point 2 (degrees).
  [out] | lon2 | longitude of point 2 (degrees); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE.
  [out] | azi2 | (forward) azimuth at point 2 (degrees).
  [out] | s12 | distance from point 1 to point 2 (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::DISTANCE.
  [out] | m12 | reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH.
  [out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
  [out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
  [out] | S12 | area under the geodesic (meters2); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::AREA.

The values of lon2 and azi2 returned are in the range [−180°, 180°].

Requesting a value which the GeodesicLineExact object is not capable of computing is not an error; the corresponding argument will not be altered.

The following functions are overloaded versions of GeodesicLineExact::ArcPosition which omit some of the output parameters.

Definition at line 371 of file GeodesicLineExact.hpp.

References AREA, AZIMUTH, DISTANCE, GenPosition(), GEODESICSCALE, LATITUDE, LONGITUDE, and REDUCEDLENGTH.

## ArcPosition() [2/7]

void GeographicLib::GeodesicLineExact::ArcPosition | ( | real | a12,
|  | real & | lat2,
|  | real & | lon2 ) const

inline

See the documentation for GeodesicLineExact::ArcPosition.

Definition at line 383 of file GeodesicLineExact.hpp.

References GenPosition(), LATITUDE, and LONGITUDE.

## ArcPosition() [3/7]

void GeographicLib::GeodesicLineExact::ArcPosition | ( | real | a12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2 ) const

inline

See the documentation for GeodesicLineExact::ArcPosition.

Definition at line 393 of file GeodesicLineExact.hpp.

References AZIMUTH, GenPosition(), LATITUDE, and LONGITUDE.

## ArcPosition() [4/7]

void GeographicLib::GeodesicLineExact::ArcPosition | ( | real | a12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | s12 ) const

inline

See the documentation for GeodesicLineExact::ArcPosition.

Definition at line 403 of file GeodesicLineExact.hpp.

References AZIMUTH, DISTANCE, GenPosition(), LATITUDE, and LONGITUDE.

## ArcPosition() [5/7]

void GeographicLib::GeodesicLineExact::ArcPosition | ( | real | a12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | s12,
|  | real & | m12 ) const

inline

See the documentation for GeodesicLineExact::ArcPosition.

Definition at line 414 of file GeodesicLineExact.hpp.

References AZIMUTH, DISTANCE, GenPosition(), LATITUDE, LONGITUDE, and REDUCEDLENGTH.

## ArcPosition() [6/7]

void GeographicLib::GeodesicLineExact::ArcPosition | ( | real | a12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | s12,
|  | real & | M12,
|  | real & | M21 ) const

inline

See the documentation for GeodesicLineExact::ArcPosition.

Definition at line 426 of file GeodesicLineExact.hpp.

References AZIMUTH, DISTANCE, GenPosition(), GEODESICSCALE, LATITUDE, and LONGITUDE.

## ArcPosition() [7/7]

void GeographicLib::GeodesicLineExact::ArcPosition | ( | real | a12,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | s12,
|  | real & | m12,
|  | real & | M12,
|  | real & | M21 ) const

inline

See the documentation for GeodesicLineExact::ArcPosition.

Definition at line 438 of file GeodesicLineExact.hpp.

References AZIMUTH, DISTANCE, GenPosition(), GEODESICSCALE, LATITUDE, LONGITUDE, and REDUCEDLENGTH.

## GenPosition()

Math::real GeographicLib::GeodesicLineExact::GenPosition | ( | bool | arcmode,
|  | real | s12_a12,
|  | unsigned | outmask,
|  | real & | lat2,
|  | real & | lon2,
|  | real & | azi2,
|  | real & | s12,
|  | real & | m12,
|  | real & | M12,
|  | real & | M21,
|  | real & | S12 ) const

The general position function. GeodesicLineExact::Position and GeodesicLineExact::ArcPosition are defined in terms of this function.

Parameters

  [in] | arcmode | boolean flag determining the meaning of the second parameter; if arcmode is false, then the GeodesicLineExact object must have been constructed with caps |= GeodesicLineExact::DISTANCE_IN.
  [in] | s12_a12 | if arcmode is false, this is the distance between point 1 and point 2 (meters); otherwise it is the arc length between point 1 and point 2 (degrees); it can be signed.
  [in] | outmask | a bitor'ed combination of GeodesicLineExact::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); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE.
  [out] | azi2 | (forward) azimuth at point 2 (degrees).
  [out] | s12 | distance from point 1 to point 2 (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::DISTANCE.
  [out] | m12 | reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH.
  [out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
  [out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
  [out] | S12 | area under the geodesic (meters2); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::AREA.

Returns
  a12 arc length from point 1 to point 2 (degrees).

The GeodesicLineExact::mask values possible for outmask are

- outmask |= GeodesicLineExact::LATITUDE for the latitude lat2;
- outmask |= GeodesicLineExact::LONGITUDE for the latitude lon2;
- outmask |= GeodesicLineExact::AZIMUTH for the latitude azi2;
- outmask |= GeodesicLineExact::DISTANCE for the distance s12;
- outmask |= GeodesicLineExact::REDUCEDLENGTH for the reduced length m12;
- outmask |= GeodesicLineExact::GEODESICSCALE for the geodesic scales M12 and M21;
- outmask |= GeodesicLineExact::AREA for the area S12;
- outmask |= GeodesicLineExact::ALL for all of the above;
- outmask |= GeodesicLineExact::LONG_UNROLL to unroll lon2 instead of wrapping it into the range [−180°, 180°].

Requesting a value which the GeodesicLineExact object is not capable of computing is not an error; the corresponding argument will not be altered. Note, however, that the arc length is always computed and returned as the function value.

With the GeodesicLineExact::LONG_UNROLL bit set, the quantity lon2 − lon1 indicates how many times and in what sense the geodesic encircles the ellipsoid.

Definition at line 143 of file GeodesicLineExact.cpp.

References GeographicLib::Math::AngNormalize(), AREA, GeographicLib::Math::atan2d(), AZIMUTH, GeographicLib::Math::degree(), DISTANCE, DISTANCE_IN, GEODESICSCALE, Init(), GeographicLib::DST::integral(), LATITUDE, LONG_UNROLL, LONGITUDE, GeographicLib::Math::NaN(), REDUCEDLENGTH, GeographicLib::Math::sincosd(), and GeographicLib::Math::sq().

Referenced by ArcPosition(), ArcPosition(), ArcPosition(), ArcPosition(), ArcPosition(), ArcPosition(), ArcPosition(), Position(), Position(), Position(), Position(), Position(), Position(), SetArc(), and SetDistance().

## SetDistance()

void GeographicLib::GeodesicLineExact::SetDistance | ( | real | s13 | ) |

Specify position of point 3 in terms of distance.

Parameters

  [in] | s13 | the distance from point 1 to point 3 (meters); it can be negative.

This is only useful if the GeodesicLineExact object has been constructed with caps |= GeodesicLineExact::DISTANCE_IN.

Definition at line 272 of file GeodesicLineExact.cpp.

References GenPosition().

Referenced by GenSetDistance().

## SetArc()

void GeographicLib::GeodesicLineExact::SetArc | ( | real | a13 | ) |

Specify position of point 3 in terms of arc length.

Parameters

  [in] | a13 | the arc length from point 1 to point 3 (degrees); it can be negative.

The distance s13 is only set if the GeodesicLineExact object has been constructed with caps |= GeodesicLineExact::DISTANCE.

Definition at line 280 of file GeodesicLineExact.cpp.

References DISTANCE, GenPosition(), and GeographicLib::Math::NaN().

Referenced by GenSetDistance().

## GenSetDistance()

void GeographicLib::GeodesicLineExact::GenSetDistance | ( | bool | arcmode,
|  | real | s13_a13 )

Specify position of point 3 in terms of either distance or arc length.

Parameters

  [in] | arcmode | boolean flag determining the meaning of the second parameter; if arcmode is false, then the GeodesicLineExact object must have been constructed with caps |= GeodesicLineExact::DISTANCE_IN.
  [in] | s13_a13 | if arcmode is false, this is the distance from point 1 to point 3 (meters); otherwise it is the arc length from point 1 to point 3 (degrees); it can be negative.

Definition at line 288 of file GeodesicLineExact.cpp.

References SetArc(), and SetDistance().

## Init()

bool GeographicLib::GeodesicLineExact::Init | ( |  | ) | const

inline

Returns
  true if the object has been initialized.

Definition at line 562 of file GeodesicLineExact.hpp.

Referenced by Azimuth(), Azimuth(), EquatorialArc(), EquatorialAzimuth(), EquatorialAzimuth(), EquatorialRadius(), Flattening(), GenDistance(), GenPosition(), Latitude(), and Longitude().

## Latitude()

Math::real GeographicLib::GeodesicLineExact::Latitude | ( |  | ) | const

inline

Returns
  lat1 the latitude of point 1 (degrees).

Definition at line 567 of file GeodesicLineExact.hpp.

References Init(), and GeographicLib::Math::NaN().

## Longitude()

Math::real GeographicLib::GeodesicLineExact::Longitude | ( |  | ) | const

inline

Returns
  lon1 the longitude of point 1 (degrees).

Definition at line 573 of file GeodesicLineExact.hpp.

References Init(), and GeographicLib::Math::NaN().

## Azimuth() [1/2]

Math::real GeographicLib::GeodesicLineExact::Azimuth | ( |  | ) | const

inline

Returns
  azi1 the azimuth (degrees) of the geodesic line at point 1.

Definition at line 579 of file GeodesicLineExact.hpp.

References Init(), and GeographicLib::Math::NaN().

## Azimuth() [2/2]

void GeographicLib::GeodesicLineExact::Azimuth | ( | real & | sazi1,
|  | real & | cazi1 ) const

inline

The sine and cosine of azi1.

Parameters

  [out] | sazi1 | the sine of azi1.
  [out] | cazi1 | the cosine of azi1.

Definition at line 588 of file GeodesicLineExact.hpp.

References Init().

## EquatorialAzimuth() [1/2]

Math::real GeographicLib::GeodesicLineExact::EquatorialAzimuth | ( |  | ) | const

inline

Returns
  azi0 the azimuth (degrees) of the geodesic line as it crosses the equator in a northward direction.

The result lies in [−90°, 90°].

Definition at line 597 of file GeodesicLineExact.hpp.

References GeographicLib::Math::atan2d(), Init(), and GeographicLib::Math::NaN().

## EquatorialAzimuth() [2/2]

void GeographicLib::GeodesicLineExact::EquatorialAzimuth | ( | real & | sazi0,
|  | real & | cazi0 ) const

inline

The sine and cosine of azi0.

Parameters

  [out] | sazi0 | the sine of azi0.
  [out] | cazi0 | the cosine of azi0.

Definition at line 606 of file GeodesicLineExact.hpp.

References Init().

## EquatorialArc()

Math::real GeographicLib::GeodesicLineExact::EquatorialArc | ( |  | ) | const

inline

Returns
  a1 the arc length (degrees) between the northward equatorial crossing and point 1.

The result lies in [−180°, 180°].

Definition at line 615 of file GeodesicLineExact.hpp.

References GeographicLib::Math::degree(), Init(), and GeographicLib::Math::NaN().

## EquatorialRadius()

Math::real GeographicLib::GeodesicLineExact::EquatorialRadius | ( |  | ) | const

inline

Returns
  a the equatorial radius of the ellipsoid (meters). This is the value inherited from the GeodesicExact object used in the constructor.

Definition at line 625 of file GeodesicLineExact.hpp.

References Init(), and GeographicLib::Math::NaN().

## Flattening()

Math::real GeographicLib::GeodesicLineExact::Flattening | ( |  | ) | const

inline

Returns
  f the flattening of the ellipsoid. This is the value inherited from the GeodesicExact object used in the constructor.

Definition at line 632 of file GeodesicLineExact.hpp.

References Init(), and GeographicLib::Math::NaN().

## Capabilities() [1/2]

unsigned GeographicLib::GeodesicLineExact::Capabilities | ( |  | ) | const

inline

Returns
  caps the computational capabilities that this object was constructed with. LATITUDE and AZIMUTH are always included.

Definition at line 639 of file GeodesicLineExact.hpp.

## Capabilities() [2/2]

bool GeographicLib::GeodesicLineExact::Capabilities | ( | unsigned | testcaps | ) | const

inline

Test what capabilities are available.

Parameters

  [in] | testcaps | a set of bitor'ed GeodesicLineExact::mask values.

Returns
  true if the GeodesicLineExact object has all these capabilities.

Definition at line 647 of file GeodesicLineExact.hpp.

## GenDistance()

Math::real GeographicLib::GeodesicLineExact::GenDistance | ( | bool | arcmode | ) | const

inline

The distance or arc length to point 3.

Parameters

  [in] | arcmode | boolean flag determining the meaning of returned value.

Returns
  s13 if arcmode is false; a13 if arcmode is true.

Definition at line 659 of file GeodesicLineExact.hpp.

References Init(), and GeographicLib::Math::NaN().

Referenced by Arc(), and Distance().

## Distance()

Math::real GeographicLib::GeodesicLineExact::Distance | ( |  | ) | const

inline

Returns
  s13, the distance to point 3 (meters).

Definition at line 665 of file GeodesicLineExact.hpp.

References GenDistance().

## Arc()

Math::real GeographicLib::GeodesicLineExact::Arc | ( |  | ) | const

inline

Returns
  a13, the arc length to point 3 (degrees).

Definition at line 671 of file GeodesicLineExact.hpp.

References GenDistance().

## Friends And Related Symbol Documentation

## GeodesicExact

friend class GeodesicExact

friend

Definition at line 45 of file GeodesicLineExact.hpp.

References GeodesicExact.

Referenced by GeodesicExact, GeodesicLine, and GeodesicLineExact().

## GeodesicLine

friend class GeodesicLine

friend

Definition at line 46 of file GeodesicLineExact.hpp.

References GeodesicExact, and GeodesicLine.

Referenced by GeodesicLine.

The documentation for this class was generated from the following files:

- GeodesicLineExact.hpp
- GeodesicLineExact.cpp