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

.NET wrapper for GeographicLib::GeodesicLineExact. More...

#include <GeodesicLineExact.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

 ~GeodesicLineExact ()
 
Constructors
 GeodesicLineExact (GeodesicExact^ g, double lat1, double lon1, double azi1, NETGeographicLib::Mask caps)
 
 GeodesicLineExact (double lat1, double lon1, double azi1, NETGeographicLib::Mask caps)
 
 GeodesicLineExact (const GeographicLib::GeodesicLineExact &gle)
 
Position in terms of distance
double Position (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 Position (double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2)
 
double Position (double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2)
 
double Position (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 Position (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 Position (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)
 
Position in terms of arc length
void ArcPosition (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 ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2)
 
void ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2)
 
void ArcPosition (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 ArcPosition (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 ArcPosition (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 ArcPosition (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)
 
The general position function.
double GenPosition (bool arcmode, double s12_a12, GeodesicLineExact::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)
 
Setting point 3
void SetDistance (double s13)
 
void SetArc (double a13)
 
void GenSetDistance (bool arcmode, double s13_a13)
 
double GenDistance (bool arcmode)
 
Trigonometric accessor functions
void AzimuthSinCos ([System::Runtime::InteropServices::Out] double% sazi1, [System::Runtime::InteropServices::Out] double% cazi1)
 
void EquatorialAzimuthSinCos ([System::Runtime::InteropServices::Out] double% sazi0, [System::Runtime::InteropServices::Out] double% cazi0)
 

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

 !GeodesicLineExact (void)
 

Private Attributes

GeographicLib::GeodesicLineExactm_pGeodesicLineExact
 

Inspector functions

property double Latitude { double get()
 
property double Longitude { double get()
 
property double Azimuth { double get()
 
property double EquatorialAzimuth { double get()
 
property double EquatorialArc { double get()
 
property double MajorRadius { double get()
 
property double Flattening { double get()
 
property double Distance { double get()
 
property double Arc { double get()
 
NETGeographicLib::Mask Capabilities ()
 
bool Capabilities (NETGeographicLib::Mask testcaps)
 

Detailed Description

.NET wrapper for GeographicLib::GeodesicLineExact.

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

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.

C# Example:

using System;
namespace example_GeodesicLineExact
{
class Program
{
static void Main(string[] args)
{
try {
// Print waypoints between JFK and SIN
GeodesicExact geod = new GeodesicExact(); // WGS84
double
lat1 = 40.640, lon1 = -73.779, // JFK
lat2 = 1.359, lon2 = 103.989; // SIN
double s12, azi1, azi2,
a12 = geod.Inverse(lat1, lon1, lat2, lon2, out s12, out azi1, out azi2);
GeodesicLineExact line = new GeodesicLineExact(geod, lat1, lon1, azi1, Mask.ALL);
// Alternatively GeodesicLine line = geod.Line(lat1, lon1, azi1, Mask.ALL);
double ds = 500e3; // Nominal distance between points = 500 km
int num = (int)(Math.Ceiling(s12 / ds)); // The number of intervals
{
// Use intervals of equal length
ds = s12 / num;
for (int i = 0; i <= num; ++i) {
double lat, lon;
line.Position(i * ds, out lat, out lon);
Console.WriteLine( String.Format( "i: {0} Latitude: {1} Longitude: {2}", i, lat, lon ));
}
}
{
// Slightly faster, use intervals of equal arc length
double da = a12 / num;
for (int i = 0; i <= num; ++i) {
double lat, lon;
line.ArcPosition(i * da, out lat, out lon);
Console.WriteLine( String.Format( "i: {0} Latitude: {1} Longitude: {2}", i, lat, lon ));
}
}
}
catch (GeographicErr e) {
Console.WriteLine(String.Format("Caught exception: {0}", e.Message));
}
}
}
}

Managed C++ Example:

// Example of using the GeographicLib::GeodesicLineExact class
#include <iostream>
#include <iomanip>
#include <exception>
#include <cmath>
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
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;
}
}

Visual Basic Example:

Imports NETGeographicLib
Module example_GeodesicLineExact
Sub Main()
Try
' Print waypoints between JFK and SIN
Dim geod As GeodesicExact = New GeodesicExact() ' WGS84
Dim lat1 As Double = 40.64, lon1 = -73.779 ' JFK
Dim lat2 As Double = 1.359, lon2 = 103.989 ' SIN
Dim s12, azi1, azi2 As Double
Dim a12 As Double = geod.Inverse(lat1, lon1, lat2, lon2, s12, azi1, azi2)
Dim line As GeodesicLineExact = New GeodesicLineExact(geod, lat1, lon1, azi1, Mask.ALL)
' Alternatively Dim line As GeodesicLineExact = geod.Line(lat1, lon1, azi1, Mask.ALL)
Dim ds As Double = 500000.0 ' Nominal distance between points = 500 km
Dim num As Integer = CInt(Math.Ceiling(s12 / ds)) ' The number of intervals
' Use intervals of equal length
ds = s12 / num
For i As Integer = 0 To num
Dim lat, lon As Double
line.Position(i * ds, lat, lon)
Console.WriteLine(String.Format("i: {0} Latitude: {1} Longitude: {2}", i, lat, lon))
Next
' Slightly faster, use intervals of equal arc length
Dim da As Double = a12 / num
For i As Integer = 0 To num
Dim lat, lon As Double
line.ArcPosition(i * da, lat, lon)
Console.WriteLine(String.Format("i: {0} Latitude: {1} Longitude: {2}", i, lat, lon))
Next
Catch ex As GeographicErr
Console.WriteLine(String.Format("Caught exception: {0}", ex.Message))
End Try
End Sub
End Module

INTERFACE DIFFERENCES:
A constructor has been provided that assumes WGS84 parameters.

The following functions are implemented as properties: Latitude, Longitude, Azimuth, EquatorialAzimuth, EquatorialArc, MajorRadius, Distance, Arc, and Flattening.

The constructors, GenPosition, and Capabilities functions accept the "capabilities mask" as a NETGeographicLib::Mask rather than an unsigned. The Capabilities function returns a NETGeographicLib::Mask rather than an unsigned.

The overloaded Azimuth and EquatorialAzimuth functions that return the sin and cosine terms have been renamed AzimuthSinCos and EquatorialAzimuthSinCos, repectively.

Definition at line 50 of file GeodesicLineExact.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 53 of file GeodesicLineExact.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 80 of file GeodesicLineExact.h.

Constructor & Destructor Documentation

◆ !GeodesicLineExact()

GeodesicLineExact::!GeodesicLineExact ( void  )
private

◆ GeodesicLineExact() [1/3]

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

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

Parameters
[in]gA GeodesicExact object used to compute the necessary information about the GeodesicLineExact.
[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 GeodesicLine::Position.

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

The NETGeographicLib::Mask values are

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 31 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ GeodesicLineExact() [2/3]

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

A default constructor which assumes the WGS84 ellipsoid. See constructor comments for details.

Definition at line 63 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ GeodesicLineExact() [3/3]

GeodesicLineExact::GeodesicLineExact ( const GeographicLib::GeodesicLineExact gle)

This constructor accepts a reference to an unmanaged GeodesicLineExact. FOR INTERNAL USE ONLY.

Definition at line 49 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ ~GeodesicLineExact()

NETGeographicLib::GeodesicLineExact::~GeodesicLineExact ( )
inline

The destructor calls the finalizer

Definition at line 206 of file GeodesicLineExact.h.

Member Function Documentation

◆ ArcPosition() [1/7]

void GeodesicLineExact::ArcPosition ( double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2 
)

See the documentation for GeodesicLineExact::ArcPosition.

Definition at line 209 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ ArcPosition() [2/7]

void GeodesicLineExact::ArcPosition ( double  a12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2 
)

See the documentation for GeodesicLineExact::ArcPosition.

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

◆ ArcPosition() [3/7]

void GeodesicLineExact::ArcPosition ( 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 GeodesicLineExact::ArcPosition.

Definition at line 233 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ ArcPosition() [4/7]

void GeodesicLineExact::ArcPosition ( 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 GeodesicLineExact::ArcPosition.

Definition at line 248 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ ArcPosition() [5/7]

void GeodesicLineExact::ArcPosition ( 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 GeodesicLineExact::ArcPosition.

Definition at line 286 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ ArcPosition() [6/7]

void GeodesicLineExact::ArcPosition ( 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 
)

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

Parameters
[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); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE.
[out]azi2(forward) azimuth at point 2 (degrees).
[out]s12distance between point 1 and point 2 (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::DISTANCE.
[out]m12reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH.
[out]M12geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
[out]M21geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
[out]S12area 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 185 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ ArcPosition() [7/7]

void GeodesicLineExact::ArcPosition ( 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 GeodesicLineExact::ArcPosition.

Definition at line 266 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ AzimuthSinCos()

void GeodesicLineExact::AzimuthSinCos ( [System::Runtime::InteropServices::Out] double%  sazi1,
[System::Runtime::InteropServices::Out] double%  cazi1 
)

The sine and cosine of azi1.

Parameters
[out]sazi1the sine of azi1.
[out]cazi1the cosine of azi1.

Definition at line 391 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ Capabilities() [1/2]

NETGeographicLib::Mask GeodesicLineExact::Capabilities ( )
Returns
caps the computational capabilities that this object was constructed with. LATITUDE and AZIMUTH are always included.

Definition at line 371 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ Capabilities() [2/2]

bool GeodesicLineExact::Capabilities ( NETGeographicLib::Mask  testcaps)
Parameters
[in]testcapsa set of bitor'ed GeodesicLineExact::mask values.
Returns
true if the GeodesicLineExact object has all these capabilities.

Definition at line 375 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ EquatorialAzimuthSinCos()

void GeodesicLineExact::EquatorialAzimuthSinCos ( [System::Runtime::InteropServices::Out] double%  sazi0,
[System::Runtime::InteropServices::Out] double%  cazi0 
)

The sine and cosine of azi0.

Parameters
[out]sazi0the sine of azi0.
[out]cazi0the cosine of azi0.

Definition at line 400 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ GenDistance()

double GeodesicLineExact::GenDistance ( bool  arcmode)

The distance or arc length to point 3.

Parameters
[in]arcmodeboolean flag determining the meaning of returned value.
Returns
s13 if arcmode is false; a13 if arcmode is true.

Definition at line 409 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ GenPosition()

double GeodesicLineExact::GenPosition ( bool  arcmode,
double  s12_a12,
GeodesicLineExact::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 position function. GeodesicLineExact::Position and GeodesicLineExact::ArcPosition are defined in terms of this function.

Parameters
[in]arcmodeboolean 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_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 GeodesicLineExact::mask values specifying which of the following parameters should be set.
[out]lat2latitude of point 2 (degrees).
[out]lon2longitude of point 2 (degrees); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE.
[out]azi2(forward) azimuth at point 2 (degrees).
[out]s12distance between point 1 and point 2 (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::DISTANCE.
[out]m12reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH.
[out]M12geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
[out]M21geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
[out]S12area under the geodesic (meters2); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::AREA.
Returns
a12 arc length of between point 1 and 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 LONG_UNROLL bit set, the quantity lon2lon1 indicates how many times and in what sense the geodesic encircles the ellipsoid.

Definition at line 308 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ GenSetDistance()

void GeodesicLineExact::GenSetDistance ( bool  arcmode,
double  s13_a13 
)

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

Parameters
[in]arcmodeboolean 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_a13if 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 387 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ Position() [1/6]

double GeodesicLineExact::Position ( double  s12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2 
)

See the documentation for GeodesicLineExact::Position.

Definition at line 102 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ Position() [2/6]

double GeodesicLineExact::Position ( double  s12,
[System::Runtime::InteropServices::Out] double%  lat2,
[System::Runtime::InteropServices::Out] double%  lon2,
[System::Runtime::InteropServices::Out] double%  azi2 
)

See the documentation for GeodesicLineExact::Position.

Definition at line 114 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ Position() [3/6]

double GeodesicLineExact::Position ( 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 GeodesicLineExact::Position.

Definition at line 128 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ Position() [4/6]

double GeodesicLineExact::Position ( 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 GeodesicLineExact::Position.

Definition at line 164 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ Position() [5/6]

double GeodesicLineExact::Position ( 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 
)

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

Parameters
[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); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE.
[out]azi2(forward) azimuth at point 2 (degrees).
[out]m12reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH.
[out]M12geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
[out]M21geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE.
[out]S12area under the geodesic (meters2); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::AREA.
Returns
a12 arc length of between point 1 and 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 79 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ Position() [6/6]

double GeodesicLineExact::Position ( 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 GeodesicLineExact::Position.

Definition at line 145 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ SetArc()

void GeodesicLineExact::SetArc ( double  a13)

Specify position of point 3 in terms of arc length.

Parameters
[in]a13the 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 383 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

◆ SetDistance()

void GeodesicLineExact::SetDistance ( double  s13)

Specify position of point 3 in terms of distance.

Parameters
[in]s13the 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 379 of file dotnet/NETGeographicLib/GeodesicLineExact.cpp.

Member Data Documentation

◆ Arc

property double NETGeographicLib::GeodesicLineExact::Arc { double get()
Returns
a13, the arc length to point 3 (degrees).

Definition at line 615 of file GeodesicLineExact.h.

◆ Azimuth

property double NETGeographicLib::GeodesicLineExact::Azimuth { double get()
Returns
azi1 the azimuth (degrees) of the geodesic line at point 1.

Definition at line 580 of file GeodesicLineExact.h.

◆ Distance

property double NETGeographicLib::GeodesicLineExact::Distance { double get()
Returns
s13, the distance to point 3 (meters).

Definition at line 610 of file GeodesicLineExact.h.

◆ EquatorialArc

property double NETGeographicLib::GeodesicLineExact::EquatorialArc { double get()
Returns
a1 the arc length (degrees) between the northward equatorial crossing and point 1.

Definition at line 592 of file GeodesicLineExact.h.

◆ EquatorialAzimuth

property double NETGeographicLib::GeodesicLineExact::EquatorialAzimuth { double get()
Returns
azi0 the azimuth (degrees) of the geodesic line as it crosses the equator in a northward direction.

Definition at line 586 of file GeodesicLineExact.h.

◆ Flattening

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

Definition at line 605 of file GeodesicLineExact.h.

◆ Latitude

property double NETGeographicLib::GeodesicLineExact::Latitude { double get()
Returns
lat1 the latitude of point 1 (degrees).

Definition at line 570 of file GeodesicLineExact.h.

◆ Longitude

property double NETGeographicLib::GeodesicLineExact::Longitude { double get()
Returns
lon1 the longitude of point 1 (degrees).

Definition at line 575 of file GeodesicLineExact.h.

◆ m_pGeodesicLineExact

GeographicLib::GeodesicLineExact* NETGeographicLib::GeodesicLineExact::m_pGeodesicLineExact
private

Definition at line 66 of file GeodesicLineExact.h.

◆ MajorRadius

property double NETGeographicLib::GeodesicLineExact::MajorRadius { double get()
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 599 of file GeodesicLineExact.h.


The documentation for this class was generated from the following files:
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
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
main
int main(int argc, char **argv)
Definition: cmake/example_cmake_find_gtsam/main.cpp:63
GeodesicExact.hpp
Header for GeographicLib::GeodesicExact class.
GeodesicLineExact.hpp
Header for GeographicLib::GeodesicLineExact class.
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:356
GeographicLib::GeodesicLineExact::Distance
Math::real Distance() const
Definition: GeodesicLineExact.hpp:655
Constants.hpp
Header for GeographicLib::Constants class.
out
std::ofstream out("Result.txt")
GeographicLib::GeodesicLineExact
An exact geodesic line.
Definition: GeodesicLineExact.hpp:35
std
Definition: BFloat16.h:88
args
Definition: pytypes.h:2210
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:243
NETGeographicLib::Mask
Mask
Definition: NETGeographicLib.h:38
ceil
const EIGEN_DEVICE_FUNC CeilReturnType ceil() const
Definition: ArrayCwiseUnaryOps.h:495
lon
static const double lon
Definition: testGeographicLib.cpp:34
NETGeographicLib::GeodesicLineExact::GeodesicLineExact
GeodesicLineExact(GeodesicExact^ g, double lat1, double lon1, double azi1, NETGeographicLib::Mask caps)
Definition: dotnet/NETGeographicLib/GeodesicLineExact.cpp:31
NETGeographicLib
Definition: Accumulator.h:13
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
GeographicLib::GeodesicLineExact::Arc
Math::real Arc() const
Definition: GeodesicLineExact.hpp:660
lat
static const double lat
Definition: testGeographicLib.cpp:34


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