GeographicLib 2.7

Loading...
Searching...
No Matches
GeographicLib::Triaxial::GeodesicLine3 Class Reference

The direct geodesic problem for a triaxial ellipsoid. More...

`#include <GeographicLib/Triaxial/GeodesicLine3.hpp>`

## Public Member Functions
| GeodesicLine3 (const Geodesic3 &tg, Angle bet1, Angle omg1, Angle alp1)
| GeodesicLine3 (const Geodesic3 &tg, real bet1, real omg1, real alp1)
void | Position (real s12, Angle &bet2, Angle &omg2, Angle &alp2) const
void | Position (real s12, real &bet2, real &omg2, real &alp2, bool unroll=true) const
void | SetDistance (real s13)
real | Distance () const
void | pos1 (Angle &bet1, Angle &omg1, Angle &alp1) const
void | pos1 (real &bet1, real &omg1, real &alp1, bool unroll=true) const

## Detailed Description

The direct geodesic problem for a triaxial ellipsoid.

This is an implementation of Jacobi's method for finding geodesics on a triaxial ellipsoid (1839).

This class performs the quadrature necessary to evaluate to the integrals for the course and distance equations and it solves the 2 coupled equations to determine the latitude and longitude of the destination. This functionality is used by the Geodesic3 class to solve the inverse geodesic problem.

Example of use:

// Example of using the Triaxial::GeodesicLine3 class.
#include <iostream>
#include <iomanip>
#include <exception>
#include <GeographicLib/Triaxial/Geodesic3.hpp>
using namespace std;
using namespace GeographicLib;
int main() {
try {
Triaxial::Geodesic3 g(Triaxial::Ellipsoid3::Earth());
Triaxial::GeodesicLine3 l = g.Line(90, 0, 135);
// The approximate distance between opposite umbilical points
double s0 = 20003986;
int num = 20;
for (int i = 0; i <= num; ++i) {
double bet2, omg2, alp2, s12 = i*s0/num;
l.Position(s12, bet2, omg2, alp2);
cout << s12 << " " << bet2 << " " << omg2 << " " << alp2 << "\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
Geodesic3.hpp
Header for GeographicLib::Triaxial::Geodesic3 class.
GeographicLib::Triaxial::Ellipsoid3::Earth
static const Ellipsoid3 & Earth()
Definition Ellipsoid3.cpp:226
GeographicLib::Triaxial::Geodesic3
The solution of the geodesic problem for a triaxial ellipsoid.
Definition Geodesic3.hpp:71
GeographicLib::Triaxial::GeodesicLine3
The direct geodesic problem for a triaxial ellipsoid.
Definition GeodesicLine3.hpp:54
GeographicLib::Triaxial::GeodesicLine3::Position
void Position(real s12, Angle &bet2, Angle &omg2, Angle &alp2) const
Definition GeodesicLine3.cpp:71
GeographicLib
Namespace for GeographicLib.
Definition Accumulator.cpp:12
std
Definition NearestNeighbor.hpp:806

Geod3Solve is a command-line utility providing access to the functionality of Geodesic3 and GeodesicLine3.

The class experimental::TriaxialGeodesicODE solves the direct geodesic problem by integrating the corresponding ordinary differential equations. This is not part of GeographicLib itself because it used Boost for solving the ODEs and Boost is not a requirement for using GeographicLib.

Definition at line 54 of file GeodesicLine3.hpp.

## Constructor & Destructor Documentation

## ◆ GeodesicLine3() [1/2]

GeographicLib::Triaxial::GeodesicLine3::GeodesicLine3 | ( | const Geodesic3 & | tg,
|  | Angle | bet1,
|  | Angle | omg1,
|  | Angle | alp1 )

Constructor for a geodesic line specified at point 1

Parameters

  [in] | tg | the underlying Geodesic3 object.
  [in] | bet1 | the ellipsoidal latitude of point 1.
  [in] | omg1 | the ellipsoidal longitude of point 1.
  [in] | alp1 | the forward azimuth of the geodesic at point 1.

Definition at line 35 of file GeodesicLine3.cpp.

References GeographicLib::AngleT< T >::round().

## ◆ GeodesicLine3() [2/2]

GeographicLib::Triaxial::GeodesicLine3::GeodesicLine3 | ( | const Geodesic3 & | tg,
|  | real | bet1,
|  | real | omg1,
|  | real | alp1 )

Constructor for a geodesic line specified at point 1 in degrees

Parameters

  [in] | tg | the underlying Geodesic3 object.
  [in] | bet1 | the ellipsoidal latitude of point 1.
  [in] | omg1 | the ellipsoidal longitude of point 1 (in degrees).
  [in] | alp1 | the forward azimuth of the geodesic at point 1 (in degrees).

Definition at line 49 of file GeodesicLine3.cpp.

## Member Function Documentation

## ◆ Position() [1/2]

void GeographicLib::Triaxial::GeodesicLine3::Position | ( | real | s12,
|  | Angle & | bet2,
|  | Angle & | omg2,
|  | Angle & | alp2 ) const

Find point 2 a given distance from point 1

Parameters

  [in] | s12 | the distance from point 1 to point 2.
  [out] | bet2 | the ellipsoidal latitude of point 2.
  [out] | omg2 | the ellipsoidal longitude of point 2.
  [out] | alp2 | the forward azimuth of the geodesic at point 2.

Definition at line 71 of file GeodesicLine3.cpp.

References GeographicLib::AngleT< T >::c(), GeographicLib::AngleT< Math::real >::cardinal(), GeographicLib::AngleT< T >::flipsign(), GeographicLib::AngleT< Math::real >::radians(), GeographicLib::AngleT< T >::rebase(), GeographicLib::AngleT< T >::reflect(), GeographicLib::AngleT< T >::round(), GeographicLib::AngleT< T >::s(), and std::swap().

Referenced by GeographicLib::Triaxial::Geodesic3::Direct(), and Position().

## ◆ Position() [2/2]

void GeographicLib::Triaxial::GeodesicLine3::Position | ( | real | s12,
|  | real & | bet2,
|  | real & | omg2,
|  | real & | alp2,
|  | bool | unroll = true ) const

Find point 2 a given distance from point 1 in degrees

Parameters

  [in] | s12 | the distance from point 1 to point 2.
  [out] | bet2 | the ellipsoidal latitude of point 2 (in degrees).
  [out] | omg2 | the ellipsoidal longitude of point 2 (in degrees).
  [out] | alp2 | the forward azimuth of the geodesic at point 2 (in degrees).
  [in] | unroll | if true (the default) "unroll" the coordinates; otherwise reduce them to their conventional ranges.

Definition at line 161 of file GeodesicLine3.cpp.

References GeographicLib::Triaxial::Ellipsoid3::AngNorm(), Position(), and GeographicLib::AngleT< T >::setn().

## ◆ SetDistance()

void GeographicLib::Triaxial::GeodesicLine3::SetDistance | ( | real | s13 | ) |
| inline

Define a reference point 3 on the geodesic line

Parameters

  [in] | s13 | distance from point 1 to point 3.

Definition at line 540 of file GeodesicLine3.hpp.

## ◆ Distance()

real GeographicLib::Triaxial::GeodesicLine3::Distance | ( |  | ) | const
| inline

Returns
  s13 the distance from point 1 to reference point 3.

Definition at line 544 of file GeodesicLine3.hpp.

## ◆ pos1() [1/2]

void GeographicLib::Triaxial::GeodesicLine3::pos1 | ( | Angle & | bet1,
|  | Angle & | omg1,
|  | Angle & | alp1 ) const

Return the coordinates of point 1

Parameters

  [out] | bet1 | the ellipsoidal latitude of point 1.
  [out] | omg1 | the ellipsoidal longitude of point 1.
  [out] | alp1 | the forward azimuth of the geodesic at point 1.

Definition at line 54 of file GeodesicLine3.cpp.

Referenced by pos1(), and GeographicLib::Triaxial::GeodesicLine3::fline::fics::setquadrant().

## ◆ pos1() [2/2]

void GeographicLib::Triaxial::GeodesicLine3::pos1 | ( | real & | bet1,
|  | real & | omg1,
|  | real & | alp1,
|  | bool | unroll = true ) const

Return the coordinates of point 1 in degrees

Parameters

  [out] | bet1 | the ellipsoidal latitude of point 1 (in degrees).
  [out] | omg1 | the ellipsoidal longitude of point 1 (in degrees).
  [out] | alp1 | the forward azimuth of the geodesic at point 1 (in degrees).
  [in] | unroll | if true (the default), return the coordinates used to specify this line; otherwise reduce the coordinates for point 1 to their conventional ranges.

Definition at line 58 of file GeodesicLine3.cpp.

References GeographicLib::Triaxial::Ellipsoid3::AngNorm(), pos1(), and GeographicLib::AngleT< T >::setn().

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

- GeodesicLine3.hpp
- GeodesicLine3.cpp