Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
NETGeographicLib::GeodesicExact Class Reference

.NET wrapper for GeographicLib::GeodesicExact. More...

#include <GeodesicExact.h>

Public Types

enum  mask {
  mask::NONE, mask::LATITUDE, mask::LONGITUDE, mask::AZIMUTH,
  mask::DISTANCE, mask::DISTANCE_IN, mask::REDUCEDLENGTH, mask::GEODESICSCALE,
  mask::AREA, mask::LONG_UNROLL, mask::ALL
}
 

Public Member Functions

System::IntPtr GetUnmanaged ()
 
 ~GeodesicExact ()
 
Constructor
 GeodesicExact ()
 
 GeodesicExact (double a, double f)
 
Direct geodesic problem specified in terms of distance.
double Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12)
 
double Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2)
 
double Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2)
 
double Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12)
 
double Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21)
 
double Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21)
 
Direct geodesic problem specified in terms of arc length.
void ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12)
 
void ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2)
 
void ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2)
 
void ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12)
 
void ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12)
 
void ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21)
 
void ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21)
 
General version of the direct geodesic solution.
double GenDirect (double lat1, double lon1, double azi1, bool arcmode, double s12_a12, GeodesicExact::mask outmask, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12)
 
Inverse geodesic problem.
double Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12)
 
double Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12)
 
double Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2)
 
double Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2)
 
double Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12)
 
double Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21)
 
double Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21)
 
General version of inverse geodesic solution.
double GenInverse (double lat1, double lon1, double lat2, double lon2, GeodesicExact::mask outmask, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12)
 
Interface to GeodesicLineExact.
GeodesicLineExact Line (double lat1, double lon1, double azi1, NETGeographicLib::Mask caps)
 
GeodesicLineExact InverseLine (double lat1, double lon1, double lat2, double lon2, NETGeographicLib::Mask caps)
 
GeodesicLineExact DirectLine (double lat1, double lon1, double azi1, double s12, NETGeographicLib::Mask caps)
 
GeodesicLineExact ArcDirectLine (double lat1, double lon1, double azi1, double a12, NETGeographicLib::Mask caps)
 
GeodesicLineExact GenDirectLine (double lat1, double lon1, double azi1, bool arcmode, double s12_a12, NETGeographicLib::Mask caps)
 

Public Attributes

Inspector functions.
property double MajorRadius { double get()
 
property double Flattening { double get()
 
property double EllipsoidArea { double get()
 

Private Types

enum  captype {
  captype::CAP_NONE = 0U, captype::CAP_E = 1U<<0, captype::CAP_D = 1U<<2, captype::CAP_H = 1U<<3,
  captype::CAP_C4 = 1U<<4, captype::CAP_ALL = 0x1FU, captype::CAP_MASK = CAP_ALL, captype::OUT_ALL = 0x7F80U,
  captype::OUT_MASK = 0xFF80U
}
 

Private Member Functions

 !GeodesicExact ()
 

Private Attributes

const GeographicLib::GeodesicExactm_pGeodesicExact
 

Detailed Description

.NET wrapper for GeographicLib::GeodesicExact.

This class allows .NET applications to access GeographicLib::GeodesicExact.

.NET wrapper for GeographicLib::GeodesicExact.

This class allows .NET applications to access GeographicLib::GeodesicExact.

The equations for geodesics on an ellipsoid can be expressed in terms of incomplete elliptic integrals. The Geodesic class expands these integrals in a series in the flattening f and this provides an accurate solution for f &isin [-0.01, 0.01]. The GeodesicExact class computes the ellitpic integrals directly and so provides a solution which is valid for all f. However, in practice, its use should be limited to about b/a [0.01, 100] or f ∈ [-99, 0.99].

For the WGS84 ellipsoid, these classes are 2–3 times slower than the series solution and 2–3 times less accurate (because it's less easy to control round-off errors with the elliptic integral formulation); i.e., the error is about 40 nm (40 nanometers) instead of 15 nm. However the error in the series solution scales as f7 while the error in the elliptic integral solution depends weakly on f. If the quarter meridian distance is 10000 km and the ratio b/a = 1 − f is varied then the approximate maximum error (expressed as a distance) is

      1 - f  error (nm)
      1/128     387
      1/64      345
      1/32      269
      1/16      210
      1/8       115
      1/4        69
      1/2        36
        1        15
        2        25
        4        96
        8       318
       16       985
       32      2352
       64      6008
      128     19024

The computation of the area in these classes is via a 30th order series. This gives accurate results for b/a [1/2, 2]; the accuracy is about 8 decimal digits for b/a [1/4, 4].

See geodellip for the formulation. See the documentation on the Geodesic class for additional information on the geodesics problems.

C# Example:

using System;
namespace example_GeodesicExact
{
class Program
{
static void Main(string[] args)
{
try {
GeodesicExact geod = new GeodesicExact( Constants.WGS84.MajorRadius,
Constants.WGS84.Flattening );
// Alternatively: GeodesicExact geod = new GeodesicExact();
{
// Sample direct calculation, travelling about NE from JFK
double lat1 = 40.6, lon1 = -73.8, s12 = 5.5e6, azi1 = 51;
double lat2, lon2;
geod.Direct(lat1, lon1, azi1, s12, out lat2, out lon2);
Console.WriteLine(String.Format("Latitude: {0} Longitude: {1}", lat2, lon2));
}
{
// Sample inverse calculation, JFK to LHR
double
lat1 = 40.6, lon1 = -73.8, // JFK Airport
lat2 = 51.6, lon2 = -0.5; // LHR Airport
double s12;
geod.Inverse(lat1, lon1, lat2, lon2, out s12);
Console.WriteLine(s12);
}
}
catch (GeographicErr e) {
Console.WriteLine(String.Format("Caught exception: {0}", e.Message));
}
}
}
}

Managed C++ Example:

// Example of using the GeographicLib::GeodesicExact class
#include <iostream>
#include <exception>
using namespace std;
using namespace GeographicLib;
int main() {
try {
GeodesicExact geod(Constants::WGS84_a(), Constants::WGS84_f());
// Alternatively: const GeodesicExact& geod = GeodesicExact::WGS84();
{
// Sample direct calculation, travelling about NE from JFK
double lat1 = 40.6, lon1 = -73.8, s12 = 5.5e6, azi1 = 51;
double lat2, lon2;
geod.Direct(lat1, lon1, azi1, s12, lat2, lon2);
cout << lat2 << " " << lon2 << "\n";
}
{
// Sample inverse calculation, JFK to LHR
double
lat1 = 40.6, lon1 = -73.8, // JFK Airport
lat2 = 51.6, lon2 = -0.5; // LHR Airport
double s12;
geod.Inverse(lat1, lon1, lat2, lon2, s12);
cout << s12 << "\n";
}
}
catch (const exception& e) {
cerr << "Caught exception: " << e.what() << "\n";
return 1;
}
}

Visual Basic Example:

Imports NETGeographicLib
Module example_GeodesicExact
Sub Main()
Try
Dim geod As GeodesicExact = New GeodesicExact(Constants.WGS84.MajorRadius,
Constants.WGS84.Flattening)
' Alternatively: Dim geod As GeodesicExact = new GeodesicExact()
' Sample direct calculation, travelling about NE from JFK
Dim lat1 As Double = 40.6, lon1 = -73.8, s12 = 5500000.0, azi1 = 51
Dim lat2, lon2 As Double
geod.Direct(lat1, lon1, azi1, s12, lat2, lon2)
Console.WriteLine(String.Format("Latitude: {0} Longitude: {1}", lat2, lon2))
' Sample inverse calculation, JFK to LHR
lat1 = 40.6 : lon1 = -73.8 ' JFK Airport
lat2 = 51.6 : lon2 = -0.5 ' LHR Airport
geod.Inverse(lat1, lon1, lat2, lon2, s12)
Console.WriteLine(s12)
Catch ex As GeographicErr
Console.WriteLine(String.Format("Caught exception: {0}", ex.Message))
End Try
End Sub
End Module

INTERFACE DIFFERENCES:
A default constructor is provided that assumes WGS84 parameters.

The MajorRadius, Flattening, and EllipsoidArea functions are implemented as properties.

The GenDirect, GenInverse, and Line functions accept the "capabilities mask" as a NETGeographicLib::Mask rather than an unsigned.

Definition at line 86 of file GeodesicExact.h.

Member Enumeration Documentation

◆ captype

Enumerator
CAP_NONE 
CAP_E 
CAP_D 
CAP_H 
CAP_C4 
CAP_ALL 
CAP_MASK 
OUT_ALL 
OUT_MASK 

Definition at line 89 of file GeodesicExact.h.

◆ mask

Bit masks for what calculations to do. These masks do double duty. They signify to the GeodesicLineExact::GeodesicLineExact constructor and to GeodesicExact::Line what capabilities should be included in the GeodesicLineExact object. They also specify which results to return in the general routines GeodesicExact::GenDirect and GeodesicExact::GenInverse routines. GeodesicLineExact::mask is a duplication of this enum.

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.

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 116 of file GeodesicExact.h.

Constructor & Destructor Documentation

◆ !GeodesicExact()

GeodesicExact::!GeodesicExact ( )
private

Definition at line 22 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ GeodesicExact() [1/2]

GeodesicExact::GeodesicExact ( )

Constructor for a WGS84 ellipsoid

Definition at line 32 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ GeodesicExact() [2/2]

GeodesicExact::GeodesicExact ( double  a,
double  f 
)

Constructor for a ellipsoid with

Parameters
[in]aequatorial radius (meters).
[in]fflattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid.
Exceptions
GeographicErrif a or (1 − f ) a is not positive.

Definition at line 45 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ ~GeodesicExact()

NETGeographicLib::GeodesicExact::~GeodesicExact ( )
inline

The desstructor calls the finalizer.

Definition at line 202 of file GeodesicExact.h.

Member Function Documentation

◆ ArcDirect() [1/7]

void GeodesicExact::ArcDirect ( double  lat1,
double  lon1,
double  azi1,
double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2 
)

See the documentation for GeodesicExact::ArcDirect.

Definition at line 194 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ ArcDirect() [2/7]

void GeodesicExact::ArcDirect ( double  lat1,
double  lon1,
double  azi1,
double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2 
)

See the documentation for GeodesicExact::ArcDirect.

Definition at line 206 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ ArcDirect() [3/7]

void GeodesicExact::ArcDirect ( double  lat1,
double  lon1,
double  azi1,
double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  s12 
)

See the documentation for GeodesicExact::ArcDirect.

Definition at line 220 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ ArcDirect() [4/7]

void GeodesicExact::ArcDirect ( double  lat1,
double  lon1,
double  azi1,
double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  m12 
)

See the documentation for GeodesicExact::ArcDirect.

Definition at line 236 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ ArcDirect() [5/7]

void GeodesicExact::ArcDirect ( double  lat1,
double  lon1,
double  azi1,
double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  m12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21 
)

See the documentation for GeodesicExact::ArcDirect.

Definition at line 274 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ ArcDirect() [6/7]

void GeodesicExact::ArcDirect ( double  lat1,
double  lon1,
double  azi1,
double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  m12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21,
[System::Runtime::InteropServices::Out] double%  S12 
)

Perform the direct geodesic calculation where the length of the geodesic is specified in terms of arc length.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]azi1azimuth at point 1 (degrees).
[in]a12arc length between point 1 and point 2 (degrees); it can be signed.
[out]lat2latitude of point 2 (degrees).
[out]lon2longitude of point 2 (degrees).
[out]azi2(forward) azimuth at point 2 (degrees).
[out]s12distance between point 1 and point 2 (meters).
[out]m12reduced length of geodesic (meters).
[out]M12geodesic scale of point 2 relative to point 1 (dimensionless).
[out]M21geodesic scale of point 1 relative to point 2 (dimensionless).
[out]S12area under the geodesic (meters2).

lat1 should be in the range [−90°, 90°]. The values of lon2 and azi2 returned are in the range [−180°, 180°).

If either point is at a pole, the azimuth is defined by keeping the longitude fixed, writing lat = ±(90° − ε), and taking the limit ε → 0+. An arc length greater that 180° signifies a geodesic which is not a shortest path. (For a prolate ellipsoid, an additional condition is necessary for a shortest path: the longitudinal extent must not exceed of 180°.)

The following functions are overloaded versions of GeodesicExact::Direct which omit some of the output parameters.

Definition at line 170 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ ArcDirect() [7/7]

void GeodesicExact::ArcDirect ( double  lat1,
double  lon1,
double  azi1,
double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21 
)

See the documentation for GeodesicExact::ArcDirect.

Definition at line 254 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ ArcDirectLine()

GeodesicLineExact GeodesicExact::ArcDirectLine ( double  lat1,
double  lon1,
double  azi1,
double  a12,
NETGeographicLib::Mask  caps 
)

Define a GeodesicLineExact in terms of the direct geodesic problem specified in terms of arc length.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]azi1azimuth at point 1 (degrees).
[in]a12arc length between point 1 and point 2 (degrees); it can be negative.
[in]capsbitor'ed combination of GeodesicExact::mask values specifying the capabilities the GeodesicLineExact object should possess, i.e., which quantities can be returned in calls to GeodesicLineExact::Position.
Returns
a GeodesicLineExact object.

This function sets point 3 of the GeodesicLineExact to correspond to point 2 of the direct geodesic problem.

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

Definition at line 497 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Direct() [1/6]

double GeodesicExact::Direct ( double  lat1,
double  lon1,
double  azi1,
double  s12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2 
)

See the documentation for GeodesicExact::Direct.

Definition at line 85 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Direct() [2/6]

double GeodesicExact::Direct ( double  lat1,
double  lon1,
double  azi1,
double  s12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2 
)

See the documentation for GeodesicExact::Direct.

Definition at line 98 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Direct() [3/6]

double GeodesicExact::Direct ( double  lat1,
double  lon1,
double  azi1,
double  s12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  m12 
)

See the documentation for GeodesicExact::Direct.

Definition at line 113 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Direct() [4/6]

double GeodesicExact::Direct ( double  lat1,
double  lon1,
double  azi1,
double  s12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  m12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21 
)

See the documentation for GeodesicExact::Direct.

Definition at line 149 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Direct() [5/6]

double GeodesicExact::Direct ( double  lat1,
double  lon1,
double  azi1,
double  s12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  m12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21,
[System::Runtime::InteropServices::Out] double%  S12 
)

Perform the direct geodesic calculation where the length of the geodesic is specified in terms of distance.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]azi1azimuth at point 1 (degrees).
[in]s12distance between point 1 and point 2 (meters); it can be signed.
[out]lat2latitude of point 2 (degrees).
[out]lon2longitude of point 2 (degrees).
[out]azi2(forward) azimuth at point 2 (degrees).
[out]m12reduced length of geodesic (meters).
[out]M12geodesic scale of point 2 relative to point 1 (dimensionless).
[out]M21geodesic scale of point 1 relative to point 2 (dimensionless).
[out]S12area under the geodesic (meters2).
Returns
a12 arc length of between point 1 and point 2 (degrees).

lat1 should be in the range [−90°, 90°];. The values of lon2 and azi2 returned are in the range [−180°, 180°).

If either point is at a pole, the azimuth is defined by keeping the longitude fixed, writing lat = ±(90° − ε), and taking the limit ε → 0+. An arc length greater that 180° signifies a geodesic which is not a shortest path. (For a prolate ellipsoid, an additional condition is necessary for a shortest path: the longitudinal extent must not exceed of 180°.)

The following functions are overloaded versions of GeodesicExact::Direct 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 62 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Direct() [6/6]

double GeodesicExact::Direct ( double  lat1,
double  lon1,
double  azi1,
double  s12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21 
)

See the documentation for GeodesicExact::Direct.

Definition at line 130 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ DirectLine()

GeodesicLineExact GeodesicExact::DirectLine ( double  lat1,
double  lon1,
double  azi1,
double  s12,
NETGeographicLib::Mask  caps 
)

Define a GeodesicLineExact in terms of the direct geodesic problem specified in terms of distance.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]azi1azimuth at point 1 (degrees).
[in]s12distance between point 1 and point 2 (meters); it can be negative.
[in]capsbitor'ed combination of GeodesicExact::mask values specifying the capabilities the GeodesicLineExact object should possess, i.e., which quantities can be returned in calls to GeodesicLineExact::Position.
Returns
a GeodesicLineExact object.

This function sets point 3 of the GeodesicLineExact to correspond to point 2 of the direct geodesic problem.

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

Definition at line 489 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ GenDirect()

double GeodesicExact::GenDirect ( double  lat1,
double  lon1,
double  azi1,
bool  arcmode,
double  s12_a12,
GeodesicExact::mask  outmask,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  m12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21,
[System::Runtime::InteropServices::Out] double%  S12 
)

The general direct geodesic calculation. GeodesicExact::Direct and GeodesicExact::ArcDirect are defined in terms of this function.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]azi1azimuth at point 1 (degrees).
[in]arcmodeboolean flag determining the meaning of the second parameter.
[in]s12_a12if 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]outmaska bitor'ed combination of GeodesicExact::mask values specifying which of the following parameters should be set.
[out]lat2latitude of point 2 (degrees).
[out]lon2longitude of point 2 (degrees).
[out]azi2(forward) azimuth at point 2 (degrees).
[out]s12distance between point 1 and point 2 (meters).
[out]m12reduced length of geodesic (meters).
[out]M12geodesic scale of point 2 relative to point 1 (dimensionless).
[out]M21geodesic scale of point 1 relative to point 2 (dimensionless).
[out]S12area under the geodesic (meters2).
Returns
a12 arc length of between point 1 and point 2 (degrees).

The GeodesicExact::mask values possible for outmask are

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

The function value a12 is always computed and returned and this equals s12_a12 is arcmode is true. If outmask includes GeodesicExact::DISTANCE and arcmode is false, then s12 = s12_a12. It is not necessary to include GeodesicExact::DISTANCE_IN in outmask; this is automatically included is arcmode is false.

With the LONG_UNROLL bit set, the quantity lon2lon1 indicates how many times and in what sense the geodesic encircles the ellipsoid.

Definition at line 296 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ GenDirectLine()

GeodesicLineExact GeodesicExact::GenDirectLine ( double  lat1,
double  lon1,
double  azi1,
bool  arcmode,
double  s12_a12,
NETGeographicLib::Mask  caps 
)

Define a GeodesicLineExact in terms of the direct geodesic problem specified in terms of either distance or arc length.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]azi1azimuth at point 1 (degrees).
[in]arcmodeboolean flag determining the meaning of the s12_a12.
[in]s12_a12if 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 negative.
[in]capsbitor'ed combination of GeodesicExact::mask values specifying the capabilities the GeodesicLineExact object should possess, i.e., which quantities can be returned in calls to GeodesicLineExact::Position.
Returns
a GeodesicLineExact object.

This function sets point 3 of the GeodesicLineExact to correspond to point 2 of the direct geodesic problem.

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

Definition at line 505 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ GenInverse()

double GeodesicExact::GenInverse ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
GeodesicExact::mask  outmask,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  azi1,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  m12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21,
[System::Runtime::InteropServices::Out] double%  S12 
)

The general inverse geodesic calculation. GeodesicExact::Inverse is defined in terms of this function.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]lat2latitude of point 2 (degrees).
[in]lon2longitude of point 2 (degrees).
[in]outmaska bitor'ed combination of GeodesicExact::mask values specifying which of the following parameters should be set.
[out]s12distance between point 1 and point 2 (meters).
[out]azi1azimuth at point 1 (degrees).
[out]azi2(forward) azimuth at point 2 (degrees).
[out]m12reduced length of geodesic (meters).
[out]M12geodesic scale of point 2 relative to point 1 (dimensionless).
[out]M21geodesic scale of point 1 relative to point 2 (dimensionless).
[out]S12area under the geodesic (meters2).
Returns
a12 arc length of between point 1 and point 2 (degrees).

The GeodesicExact::mask values possible for outmask are

  • outmask |= GeodesicExact::DISTANCE for the distance s12;
  • outmask |= GeodesicExact::AZIMUTH for the latitude azi2;
  • outmask |= GeodesicExact::REDUCEDLENGTH for the reduced length m12;
  • outmask |= GeodesicExact::GEODESICSCALE for the geodesic scales M12 and M21;
  • outmask |= GeodesicExact::AREA for the area S12;
  • outmask |= GeodesicExact::ALL for all of the above.

The arc length is always computed and returned as the function value.

Definition at line 442 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ GetUnmanaged()

System::IntPtr GeodesicExact::GetUnmanaged ( )
Returns
A pointer to the unmanaged GeographicLib::GeodesicExact.

This function is for internal use only.

Definition at line 467 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Inverse() [1/7]

double GeodesicExact::Inverse ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
[System::Runtime::InteropServices::Out] double%  azi1,
[System::Runtime::InteropServices::Out] double%  azi2 
)

See the documentation for GeodesicExact::Inverse.

Definition at line 357 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Inverse() [2/7]

double GeodesicExact::Inverse ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
[System::Runtime::InteropServices::Out] double%  s12 
)

See the documentation for GeodesicExact::Inverse.

Definition at line 347 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Inverse() [3/7]

double GeodesicExact::Inverse ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  azi1,
[System::Runtime::InteropServices::Out] double%  azi2 
)

See the documentation for GeodesicExact::Inverse.

Definition at line 370 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Inverse() [4/7]

double GeodesicExact::Inverse ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  azi1,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  m12 
)

See the documentation for GeodesicExact::Inverse.

Definition at line 385 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Inverse() [5/7]

double GeodesicExact::Inverse ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  azi1,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  m12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21 
)

See the documentation for GeodesicExact::Inverse.

Definition at line 421 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Inverse() [6/7]

double GeodesicExact::Inverse ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  azi1,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  m12,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21,
[System::Runtime::InteropServices::Out] double%  S12 
)

Perform the inverse geodesic calculation.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]lat2latitude of point 2 (degrees).
[in]lon2longitude of point 2 (degrees).
[out]s12distance between point 1 and point 2 (meters).
[out]azi1azimuth at point 1 (degrees).
[out]azi2(forward) azimuth at point 2 (degrees).
[out]m12reduced length of geodesic (meters).
[out]M12geodesic scale of point 2 relative to point 1 (dimensionless).
[out]M21geodesic scale of point 1 relative to point 2 (dimensionless).
[out]S12area under the geodesic (meters2).
Returns
a12 arc length of between point 1 and point 2 (degrees).

lat1 and lat2 should be in the range [−90°, 90°]. The values of azi1 and azi2 returned are in the range [−180°, 180°).

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

The following functions are overloaded versions of GeodesicExact::Inverse 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 324 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Inverse() [7/7]

double GeodesicExact::Inverse ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
[System::Runtime::InteropServices::Out] double%  s12,
[System::Runtime::InteropServices::Out] double%  azi1,
[System::Runtime::InteropServices::Out] double%  azi2,
[System::Runtime::InteropServices::Out] double%  M12,
[System::Runtime::InteropServices::Out] double%  M21 
)

See the documentation for GeodesicExact::Inverse.

Definition at line 402 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ InverseLine()

GeodesicLineExact GeodesicExact::InverseLine ( double  lat1,
double  lon1,
double  lat2,
double  lon2,
NETGeographicLib::Mask  caps 
)

Define a GeodesicLineExact in terms of the inverse geodesic problem.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]lat2latitude of point 2 (degrees).
[in]lon2longitude of point 2 (degrees).
[in]capsbitor'ed combination of GeodesicExact::mask values specifying the capabilities the GeodesicLineExact object should possess, i.e., which quantities can be returned in calls to GeodesicLineExact::Position.
Returns
a GeodesicLineExact object.

This function sets point 3 of the GeodesicLineExact to correspond to point 2 of the inverse geodesic problem.

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

Definition at line 481 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

◆ Line()

GeodesicLineExact GeodesicExact::Line ( double  lat1,
double  lon1,
double  azi1,
NETGeographicLib::Mask  caps 
)

Set up to compute several points on a single geodesic.

Parameters
[in]lat1latitude of point 1 (degrees).
[in]lon1longitude of point 1 (degrees).
[in]azi1azimuth at point 1 (degrees).
[in]capsbitor'ed combination of NETGeographicLib::Mask values specifying the capabilities the GeodesicLineExact object should possess, i.e., which quantities can be returned in calls to GeodesicLineExact::Position.
Returns
a GeodesicLineExact object.

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

The GeodesicExact::mask values are

The default value of caps is GeodesicExact::ALL which turns on all the capabilities.

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 474 of file dotnet/NETGeographicLib/GeodesicExact.cpp.

Member Data Documentation

◆ EllipsoidArea

property double NETGeographicLib::GeodesicExact::EllipsoidArea { double get()
Returns
total area of ellipsoid in meters2. The area of a polygon encircling a pole can be found by adding GeodesicExact::EllipsoidArea()/2 to the sum of S12 for each side of the polygon.

Definition at line 770 of file GeodesicExact.h.

◆ Flattening

property double NETGeographicLib::GeodesicExact::Flattening { double get()
Returns
f the flattening of the ellipsoid. This is the value used in the constructor.

Definition at line 762 of file GeodesicExact.h.

◆ m_pGeodesicExact

const GeographicLib::GeodesicExact* NETGeographicLib::GeodesicExact::m_pGeodesicExact
private

Definition at line 102 of file GeodesicExact.h.

◆ MajorRadius

property double NETGeographicLib::GeodesicExact::MajorRadius { double get()
Returns
a the equatorial radius of the ellipsoid (meters). This is the value used in the constructor.

Definition at line 756 of file GeodesicExact.h.


The documentation for this class was generated from the following files:
GeographicLib::GeodesicExact
Exact geodesic calculations.
Definition: GeodesicExact.hpp:80
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
GeographicLib
Namespace for GeographicLib.
Definition: JacobiConformal.hpp:15
NETGeographicLib::GeodesicExact::GeodesicExact
GeodesicExact()
Definition: dotnet/NETGeographicLib/GeodesicExact.cpp:32
main
int main(int argc, char **argv)
Definition: cmake/example_cmake_find_gtsam/main.cpp:63
GeodesicExact.hpp
Header for GeographicLib::GeodesicExact class.
Constants.hpp
Header for GeographicLib::Constants class.
out
std::ofstream out("Result.txt")
std
Definition: BFloat16.h:88
args
Definition: pytypes.h:2210
NETGeographicLib
Definition: Accumulator.h:13


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:16:46