GeographicLib: GeographicLib::experimental::TriaxialGeodesicODE Class Reference

GeographicLib 2.6

Loading...
Searching...
No Matches
GeographicLib::experimental::TriaxialGeodesicODE Class Reference

The ODE solution of direct geodesic problem for triaxial ellipsoids. More...

`#include <TriaxialGeodesicODE.hpp>`

## Public Types
using | vec3 = Triaxial::Ellipsoid3::vec3

## Public Member Functions
| TriaxialGeodesicODE (const Triaxial::Ellipsoid3 &t, vec3 R1, vec3 V1, bool extended=false, bool dense=false, bool normp=false, real eps=0)
| TriaxialGeodesicODE (const Triaxial::Ellipsoid3 &t, bool extended=false, bool dense=false, bool normp=false, real eps=0)
| TriaxialGeodesicODE (const Triaxial::Ellipsoid3 &t, Angle bet1, Angle omg1, Angle alp1, bool extended=false, bool dense=false, bool normp=false, real eps=0)
std::pair< real, real > | Position (real s12, vec3 &R2, vec3 &V2)
std::pair< real, real > | Position (real s12, vec3 &R2, vec3 &V2, real &m12, real &M12, real &M21)
std::pair< real, real > | Position (real s12, Angle &bet2, Angle &omg2, Angle &alp2)
std::pair< real, real > | Position (real s12, Angle &bet2, Angle &omg2, Angle &alp2, real &m12, real &M12, real &M21)
void | Position (const std::vector< real > &s12, std::vector< vec3 > &R2, std::vector< vec3 > &V2)
void | Position (const std::vector< real > &s12, std::vector< vec3 > &R2, std::vector< vec3 > &V2, std::vector< real > &m12, std::vector< real > &M12, std::vector< real > &M21)
void | Position (const std::vector< real > &s12, std::vector< Angle > &bet2, std::vector< Angle > &omg2, std::vector< Angle > &alp2)
void | Position (const std::vector< real > &s12, std::vector< Angle > &bet2, std::vector< Angle > &omg2, std::vector< Angle > &alp2, std::vector< real > &m12, std::vector< real > &M12, std::vector< real > &M21)
void | Reset (vec3 R1, vec3 V1)
void | Reset (Angle bet1, Angle omg1, Angle alp1)
long | NSteps () const
long | IntSteps () const
std::pair< real, real > | CurrentDistance () const
bool | Extended () const
void | Position1 (vec3 &R1, vec3 &V1) const
void | Position1 (Angle &bet1, Angle &omg1, Angle &alp1) const
const Triaxial::Ellipsoid3 & | t () const

## Detailed Description

The ODE solution of direct geodesic problem for triaxial ellipsoids.

This determines the course of a geodesic by solving the equations of motion for a particle sliding without friction on the surface of the ellipsoid. The solution is carried out in Cartesian coordinates. The same approach was used by Panou and Korakitis (2019). Significant differences are:

- The code is provided.
- This method uses a high order method provided by Boost. This allows reasonably high accuracy to be achieved using double precision.
- It solver optionally offers "dense" output. It takes as large steps as possible while meeting the accuracy requirements. The results at specific distances are then found by interpolation. There is little penalty in requesting many waypoints.
- Because the ODE only "works" in one direction, the solver has to restart if the direction is reversed (but this is hidden from the user). To simplify usage, you can provide a vector of distances to the solver and this is sorted appropriately before calling the underlying Boost integrator. This vector can include negative as well as positive distances.
- This class can also, optionally, solve for the reduced length m12, and the geodesic scales M12 and M21.

These routines are distributed as source code with GeographicLib but, because of the dependency on the Boost library, are not incorporated into the library itself.

The recommended way to solve the direct and indirect geodesic problems on a triaxial ellipsoid is with the class Triaxial::Geodesic3.

Geod3ODE.cpp is a utility which uses this class to solve direct geodesic problems. Use Geod3ODE --help for brief documentation.

Definition at line 103 of file TriaxialGeodesicODE.hpp.

## Member Typedef Documentation

## ◆ vec3

using GeographicLib::experimental::TriaxialGeodesicODE::vec3 = Triaxial::Ellipsoid3::vec3

A type to hold three-dimentional positions and velocities in Cartesian coordinates.

Definition at line 109 of file TriaxialGeodesicODE.hpp.

## Constructor & Destructor Documentation

## ◆ TriaxialGeodesicODE() [1/3]

GeographicLib::experimental::TriaxialGeodesicODE::TriaxialGeodesicODE | ( | const Triaxial::Ellipsoid3 & | t,
|  | vec3 | R1,
|  | vec3 | V1,
|  | bool | extended = false,
|  | bool | dense = false,
|  | bool | normp = false,
|  | real | eps = 0 )

Basic constructor specifying ellipsoid and starting point.

Parameters

  [in] | t | the Ellipsoid3 object.
  [in] | R1 | the starting position on the ellipsoid.
  [in] | V1 | the starting velocity tangent to the ellipsoid.
  [in] | extended | (default false), if true solve for reduced length and geodesic scale.
  [in] | dense | (default false), if true use a dense solver allowing interpolated way points to tbe computed inexpensively.
  [in] | normp | (default false), if true force the solution vector onto the ellipsoid when computing the acceleration.
  [in] | eps | (default 0), if positive the error threshold for the integrator; otherwise use a good default value related to the machine precision.

The values R1 and V1 are normalized to place R1 on the ellipsoid and V1 tangent to the ellipsoid with unit speed.

Internally, the integration scales the ellipsoid so that the median semiaxis = 1. The eps parameter is a measure of the absolution error on this scaled ellipsoid.

References t().

## ◆ TriaxialGeodesicODE() [2/3]

GeographicLib::experimental::TriaxialGeodesicODE::TriaxialGeodesicODE | ( | const Triaxial::Ellipsoid3 & | t,
|  | bool | extended = false,
|  | bool | dense = false,
|  | bool | normp = false,
|  | real | eps = 0 )

Constructor specifying just the ellipsoid.

Parameters

  [in] | t | the Ellipsoid3 object.
  [in] | extended | (default false), if true solve for reduced length and geodesic scale.
  [in] | dense | (default false), if true use a dense solver allowing interpolated way points to tbe computed inexpensively.
  [in] | normp | (default false), if true force the solution vector onto the ellipsoid when computing the acceleration.
  [in] | eps | (default 0), if positive the error threshold for the integrator; otherwise use a good default value related to the machine precision.

This form starts the geodesic at R1 = [a, 0, 0], V1 = [0, 0, 1].

References t().

## ◆ TriaxialGeodesicODE() [3/3]

GeographicLib::experimental::TriaxialGeodesicODE::TriaxialGeodesicODE | ( | const Triaxial::Ellipsoid3 & | t,
|  | Angle | bet1,
|  | Angle | omg1,
|  | Angle | alp1,
|  | bool | extended = false,
|  | bool | dense = false,
|  | bool | normp = false,
|  | real | eps = 0 )

Basic constructor specifying ellipsoid and starting point in ellipsoidal coordinates.

Parameters

  [in] | t | the Ellipsoid3 object.
  [in] | bet1 | the starting latitude.
  [in] | omg1 | the starting longitude.
  [in] | alp1 | the starting azimuth.
  [in] | extended | (default false), if true solve for reduced length and geodesic scale.
  [in] | dense | (default false), if true use a dense solver allowing interpolated way points to tbe computed inexpensively.
  [in] | normp | (default false), if true force the solution vector onto the ellipsoid when computing the acceleration.
  [in] | eps | (default 0), if positive the error threshold for the integrator; otherwise use a good default value related to the machine precision.

References t().

## Member Function Documentation

## ◆ Position() [1/8]

std::pair< real, real > GeographicLib::experimental::TriaxialGeodesicODE::Position | ( | real | s12,
|  | vec3 & | R2,
|  | vec3 & | V2 )

Find the position a given distance from the starting point.

Parameters

  [in] | s12 | the distance between point 1 and point 2.
  [out] | R2 | the position of point 2.
  [out] | V2 | the velocity at point 2.

Returns
  a pair of error estimates, the distance from the ellipsoid (in meters) and the deviation of the velocity from a unit tangential vector.

The returned values R2 and V2 are normalized to place R2 on the ellipsoid and V2 tangent to the ellipsoid with unit speed.

## ◆ Position() [2/8]

std::pair< real, real > GeographicLib::experimental::TriaxialGeodesicODE::Position | ( | real | s12,
|  | vec3 & | R2,
|  | vec3 & | V2,
|  | real & | m12,
|  | real & | M12,
|  | real & | M21 )

Find the position and differential quantities a given distance from the starting point.

Parameters

  [in] | s12 | the distance between point 1 and point 2.
  [out] | R2 | the position of point 2.
  [out] | V2 | the velocity at point 2.
  [out] | m12 | the reduced length
  [out] | M12 | the geodesic scale at point 2 relative to point 1.
  [out] | M21 | the geodesic scale at point 1 relative to point 2.

Returns
  a pair of error estimates, the distance from the ellipsoid (in meters) and the deviation of the velocity from a unit tangential vector.

The returned values R2 and V2 are normalized to place R2 on the ellipsoid and V2 tangent to the ellipsoid with unit speed.

If the object was constructed with extended = false, nans are returned for the differential quantities.

## ◆ Position() [3/8]

std::pair< real, real > GeographicLib::experimental::TriaxialGeodesicODE::Position | ( | real | s12,
|  | Angle & | bet2,
|  | Angle & | omg2,
|  | Angle & | alp2 )

Find the ellipsoidal coordinates a given distance from the starting point.

Parameters

  [in] | s12 | the distance between point 1 and point 2.
  [out] | bet2 | the latitude at point 2.
  [out] | omg2 | the longitude at point 2.
  [out] | alp2 | the azimuth at point 2.

Returns
  a pair of error estimates, the distance from the ellipsoid (in meters) and the deviation of the velocity from a unit tangential vector.

## ◆ Position() [4/8]

std::pair< real, real > GeographicLib::experimental::TriaxialGeodesicODE::Position | ( | real | s12,
|  | Angle & | bet2,
|  | Angle & | omg2,
|  | Angle & | alp2,
|  | real & | m12,
|  | real & | M12,
|  | real & | M21 )

Find the ellipsoidal coordinates and differential quantities a given distance from the starting point.

Parameters

  [in] | s12 | the distance between point 1 and point 2.
  [out] | bet2 | the latitude at point 2.
  [out] | omg2 | the longitude at point 2.
  [out] | alp2 | the azimuth at point 2.
  [out] | m12 | the reduced length
  [out] | M12 | the geodesic scale at point 2 relative to point 1.
  [out] | M21 | the geodesic scale at point 1 relative to point 2.

Returns
  a pair of error estimates, the distance from the ellipsoid (in meters) and the deviation of the velocity from a unit tangential vector.

If the object was constructed with extended = false, nans are returned for the differential quantities.

## ◆ Position() [5/8]

void GeographicLib::experimental::TriaxialGeodesicODE::Position | ( | const std::vector< real > & | s12,
|  | std::vector< vec3 > & | R2,
|  | std::vector< vec3 > & | V2 )

Find the positions for a series of distances from the starting point.

Parameters

  [in] | s12 | a vector of distances between point 1 and points 2.
  [out] | R2 | a vector of positions of points 2.
  [out] | V2 | a vector of velocities at points 2.

Before starting the integration, s12 is sorted to separate the positive and negative values and place each in order of increasing magnitude. The results are placed back in the correct positions in the output vectors.

The returned values R2 and V2 are normalized to place R2 on the ellipsoid and V2 tangent to the ellipsoid with unit speed.

## ◆ Position() [6/8]

void GeographicLib::experimental::TriaxialGeodesicODE::Position | ( | const std::vector< real > & | s12,
|  | std::vector< vec3 > & | R2,
|  | std::vector< vec3 > & | V2,
|  | std::vector< real > & | m12,
|  | std::vector< real > & | M12,
|  | std::vector< real > & | M21 )

Find the positions and differential quantities for a series of distances from the starting point.

Parameters

  [in] | s12 | a vector of distances between point 1 and points 2.
  [out] | R2 | a vector of positions of points 2.
  [out] | V2 | a vector of velocities at points 2.
  [out] | m12 | a vector of the reduced lengths.
  [out] | M12 | a vector of the geodesic scales at points 2 relative to point 1.
  [out] | M21 | a vector of the geodesic scales at point 1 relative to points 2.

Before starting the integration, s12 is sorted to separate the positive and negative values and place each in order of increasing magnitude. The results are placed back in the correct positions in the output vectors.

The returned values R2 and V2 are normalized to place R2 on the ellipsoid and V2 tangent to the ellipsoid with unit speed.

If the object was constructed with extended = false, nans are returned for the differential quantities.

## ◆ Position() [7/8]

void GeographicLib::experimental::TriaxialGeodesicODE::Position | ( | const std::vector< real > & | s12,
|  | std::vector< Angle > & | bet2,
|  | std::vector< Angle > & | omg2,
|  | std::vector< Angle > & | alp2 )

Find the ellipsoidal coordinates for a series of distances from the starting point.

Parameters

  [in] | s12 | a vector of distances between point 1 and points 2.
  [out] | bet2 | a vector of latitudes at points 2.
  [out] | omg2 | a vector of longitudes at points 2.
  [out] | alp2 | a vector of azimuths at points 2.

Before starting the integration, s12 is sorted to separate the positive and negative values and place each in order of increasing magnitude. The results are placed back in the correct positions in the output vectors.

## ◆ Position() [8/8]

void GeographicLib::experimental::TriaxialGeodesicODE::Position | ( | const std::vector< real > & | s12,
|  | std::vector< Angle > & | bet2,
|  | std::vector< Angle > & | omg2,
|  | std::vector< Angle > & | alp2,
|  | std::vector< real > & | m12,
|  | std::vector< real > & | M12,
|  | std::vector< real > & | M21 )

Find the ellipsoidal coordinates and differential quantities for a series of distances from the starting point.

Parameters

  [in] | s12 | a vector of distances between point 1 and points 2.
  [out] | bet2 | a vector of latitudes at points 2.
  [out] | omg2 | a vector of longitudes at points 2.
  [out] | alp2 | a vector of azimuths at points 2.
  [out] | m12 | a vector of the reduced lengths.
  [out] | M12 | a vector of the geodesic scales at points 2 relative to point 1.
  [out] | M21 | a vector of the geodesic scales at point 1 relative to points 2.

Before starting the integration, s12 is sorted to separate the positive and negative values and place each in order of increasing magnitude. The results are placed back in the correct positions in the output vectors.

## ◆ Reset() [1/2]

void GeographicLib::experimental::TriaxialGeodesicODE::Reset | ( | vec3 | R1,
|  | vec3 | V1 )

Reset the starting point.

Parameters

  [in] | R1 | the starting position on the ellipsoid.
  [in] | V1 | the starting velocity tangent to the ellipsoid.

The values R1 and V1 are normalized to place R1 on the ellipsoid and V1 tangent to the ellipsoid with unit speed.

## ◆ Reset() [2/2]

void GeographicLib::experimental::TriaxialGeodesicODE::Reset | ( | Angle | bet1,
|  | Angle | omg1,
|  | Angle | alp1 )

Reset the starting point in ellipsoidal coordinates.

Parameters

  [in] | bet1 | the starting latitude.
  [in] | omg1 | the starting longitude.
  [in] | alp1 | the starting azimuth.

## ◆ NSteps()

long GeographicLib::experimental::TriaxialGeodesicODE::NSteps | ( |  | ) | const
| inline

Returns
  the number of integration steps since the last Reset()

Definition at line 399 of file TriaxialGeodesicODE.hpp.

## ◆ IntSteps()

long GeographicLib::experimental::TriaxialGeodesicODE::IntSteps | ( |  | ) | const
| inline

Returns
  the number of calls to the acceleration routine since the last Reset()

Definition at line 404 of file TriaxialGeodesicODE.hpp.

## ◆ CurrentDistance()

std::pair< real, real > GeographicLib::experimental::TriaxialGeodesicODE::CurrentDistance | ( |  | ) | const

Returns
  a pair for the current distance bracket.

If the object was constructed with dense = true this gives the current interval over which an interpolated waypoint can be found. Otherwise the two distances are equal to the last distance calculation.

## ◆ Extended()

bool GeographicLib::experimental::TriaxialGeodesicODE::Extended | ( |  | ) | const
| inline

Returns
  whether the object was constructed with extended = true.

Definition at line 416 of file TriaxialGeodesicODE.hpp.

## ◆ Position1() [1/2]

void GeographicLib::experimental::TriaxialGeodesicODE::Position1 | ( | vec3 & | R1,
|  | vec3 & | V1 ) const
| inline

The current starting point.

Parameters

  [out] | R1 | the starting position.
  [out] | V1 | the starting velocity.

Definition at line 423 of file TriaxialGeodesicODE.hpp.

## ◆ Position1() [2/2]

void GeographicLib::experimental::TriaxialGeodesicODE::Position1 | ( | Angle & | bet1,
|  | Angle & | omg1,
|  | Angle & | alp1 ) const
| inline

The current starting point in ellipsoidal coordinates.

Parameters

  [out] | bet1 | the starting latitude.
  [out] | omg1 | the starting longitude.
  [out] | alp1 | the starting azimuth.

Definition at line 431 of file TriaxialGeodesicODE.hpp.

## ◆ t()

const Triaxial::Ellipsoid3 & GeographicLib::experimental::TriaxialGeodesicODE::t | ( |  | ) | const
| inline

Returns
  the Ellipsoid3 object used in the constructor.

Definition at line 437 of file TriaxialGeodesicODE.hpp.

Referenced by TriaxialGeodesicODE(), TriaxialGeodesicODE(), and TriaxialGeodesicODE().

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

- TriaxialGeodesicODE.hpp