NETGeographicLib  1.38
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Pages
GeodesicExact.h
Go to the documentation of this file.
1 #pragma once
2 /**
3  * \file NETGeographicLib/GeodesicExact.h
4  * \brief Header for NETGeographicLib::GeodesicExact class
5  *
6  * NETGeographicLib is copyright (c) Scott Heiman (2013)
7  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
8  * <charles@karney.com> and licensed under the MIT/X11 License.
9  * For more information, see
10  * http://geographiclib.sourceforge.net/
11  **********************************************************************/
12 #include "NETGeographicLib.h"
13 
14 namespace NETGeographicLib
15 {
16  ref class GeodesicLineExact;
17  /*!
18  \brief .NET wrapper for GeographicLib::GeodesicExact.
19 
20  This class allows .NET applications to access GeographicLib::GeodesicExact.
21  */
22  /**
23  * \brief .NET wrapper for GeographicLib::GeodesicExact.
24  *
25  * This class allows .NET applications to access GeographicLib::GeodesicExact.
26  *
27  * The equations for geodesics on an ellipsoid can be expressed in terms of
28  * incomplete elliptic integrals. The Geodesic class expands these integrals
29  * in a series in the flattening \e f and this provides an accurate solution
30  * for \e f &isin [-0.01, 0.01]. The GeodesicExact class computes the
31  * ellitpic integrals directly and so provides a solution which is valid for
32  * all \e f. However, in practice, its use should be limited to about \e
33  * b/\e a &isin; [0.01, 100] or \e f &isin; [-99, 0.99].
34  *
35  * For the WGS84 ellipsoid, these classes are 2--3 times \e slower than the
36  * series solution and 2--3 times \e less \e accurate (because it's less easy
37  * to control round-off errors with the elliptic integral formulation); i.e.,
38  * the error is about 40 nm (40 nanometers) instead of 15 nm. However the
39  * error in the series solution scales as <i>f</i><sup>7</sup> while the
40  * error in the elliptic integral solution depends weakly on \e f. If the
41  * quarter meridian distance is 10000 km and the ratio \e b/\e a = 1 &minus;
42  * \e f is varied then the approximate maximum error (expressed as a
43  * distance) is <pre>
44  * 1 - f error (nm)
45  * 1/128 387
46  * 1/64 345
47  * 1/32 269
48  * 1/16 210
49  * 1/8 115
50  * 1/4 69
51  * 1/2 36
52  * 1 15
53  * 2 25
54  * 4 96
55  * 8 318
56  * 16 985
57  * 32 2352
58  * 64 6008
59  * 128 19024
60  * </pre>
61  *
62  * The computation of the area in these classes is via a 30th order series.
63  * This gives accurate results for \e b/\e a &isin; [1/2, 2]; the accuracy is
64  * about 8 decimal digits for \e b/\e a &isin; [1/4, 4].
65  *
66  * See \ref geodellip for the formulation. See the documentation on the
67  * Geodesic class for additional information on the geodesics problems.
68  *
69  * C# Example:
70  * \include example-GeodesicExact.cs
71  * Managed C++ Example:
72  * \include example-GeodesicExact.cpp
73  * Visual Basic Example:
74  * \include example-GeodesicExact.vb
75  *
76  * <B>INTERFACE DIFFERENCES:</B><BR>
77  * A default constructor is provided that assumes WGS84 parameters.
78  *
79  * The MajorRadius, Flattening, and EllipsoidArea functions are
80  * implemented as properties.
81  *
82  * The GenDirect, GenInverse, and Line functions accept the
83  * "capabilities mask" as a NETGeographicLib::Mask rather than an
84  * unsigned.
85  **********************************************************************/
86  public ref class GeodesicExact
87  {
88  private:
89  // pointer to the unmanaged GeographicLib::GeodesicExact.
90  const GeographicLib::GeodesicExact* m_pGeodesicExact;
91 
92  // the finalizer deletes the unmanaged memory.
93  !GeodesicExact();
94  public:
95  /** \name Constructor
96  **********************************************************************/
97  ///@{
98  /**
99  * Constructor for a WGS84 ellipsoid
100  **********************************************************************/
101  GeodesicExact();
102 
103  /**
104  * Constructor for a ellipsoid with
105  *
106  * @param[in] a equatorial radius (meters).
107  * @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere.
108  * Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening
109  * to 1/\e f.
110  * @exception GeographicErr if \e a or (1 &minus; \e f ) \e a is not
111  * positive.
112  **********************************************************************/
113  GeodesicExact(double a, double f);
114  ///@}
115 
116  /**
117  * The desstructor calls the finalizer.
118  **********************************************************************/
120  { this->!GeodesicExact(); }
121 
122  /** \name Direct geodesic problem specified in terms of distance.
123  **********************************************************************/
124  ///@{
125  /**
126  * Perform the direct geodesic calculation where the length of the geodesic
127  * is specified in terms of distance.
128  *
129  * @param[in] lat1 latitude of point 1 (degrees).
130  * @param[in] lon1 longitude of point 1 (degrees).
131  * @param[in] azi1 azimuth at point 1 (degrees).
132  * @param[in] s12 distance between point 1 and point 2 (meters); it can be
133  * signed.
134  * @param[out] lat2 latitude of point 2 (degrees).
135  * @param[out] lon2 longitude of point 2 (degrees).
136  * @param[out] azi2 (forward) azimuth at point 2 (degrees).
137  * @param[out] m12 reduced length of geodesic (meters).
138  * @param[out] M12 geodesic scale of point 2 relative to point 1
139  * (dimensionless).
140  * @param[out] M21 geodesic scale of point 1 relative to point 2
141  * (dimensionless).
142  * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
143  * @return \e a12 arc length of between point 1 and point 2 (degrees).
144  *
145  * \e lat1 should be in the range [&minus;90&deg;, 90&deg;]; \e lon1 and \e
146  * azi1 should be in the range [&minus;540&deg;, 540&deg;). The values of
147  * \e lon2 and \e azi2 returned are in the range [&minus;180&deg;,
148  * 180&deg;).
149  *
150  * If either point is at a pole, the azimuth is defined by keeping the
151  * longitude fixed, writing \e lat = &plusmn;(90&deg; &minus; &epsilon;),
152  * and taking the limit &epsilon; &rarr; 0+. An arc length greater that
153  * 180&deg; signifies a geodesic which is not a shortest path. (For a
154  * prolate ellipsoid, an additional condition is necessary for a shortest
155  * path: the longitudinal extent must not exceed of 180&deg;.)
156  *
157  * The following functions are overloaded versions of GeodesicExact::Direct
158  * which omit some of the output parameters. Note, however, that the arc
159  * length is always computed and returned as the function value.
160  **********************************************************************/
161  double Direct(double lat1, double lon1, double azi1, double s12,
162  [System::Runtime::InteropServices::Out] double% lat2,
163  [System::Runtime::InteropServices::Out] double% lon2,
164  [System::Runtime::InteropServices::Out] double% azi2,
165  [System::Runtime::InteropServices::Out] double% m12,
166  [System::Runtime::InteropServices::Out] double% M12,
167  [System::Runtime::InteropServices::Out] double% M21,
168  [System::Runtime::InteropServices::Out] double% S12);
169 
170  /**
171  * See the documentation for GeodesicExact::Direct.
172  **********************************************************************/
173  double Direct(double lat1, double lon1, double azi1, double s12,
174  [System::Runtime::InteropServices::Out] double% lat2,
175  [System::Runtime::InteropServices::Out] double% lon2);
176 
177  /**
178  * See the documentation for GeodesicExact::Direct.
179  **********************************************************************/
180  double Direct(double lat1, double lon1, double azi1, double s12,
181  [System::Runtime::InteropServices::Out] double% lat2,
182  [System::Runtime::InteropServices::Out] double% lon2,
183  [System::Runtime::InteropServices::Out] double% azi2);
184 
185  /**
186  * See the documentation for GeodesicExact::Direct.
187  **********************************************************************/
188  double Direct(double lat1, double lon1, double azi1, double s12,
189  [System::Runtime::InteropServices::Out] double% lat2,
190  [System::Runtime::InteropServices::Out] double% lon2,
191  [System::Runtime::InteropServices::Out] double% azi2,
192  [System::Runtime::InteropServices::Out] double% m12);
193 
194  /**
195  * See the documentation for GeodesicExact::Direct.
196  **********************************************************************/
197  double Direct(double lat1, double lon1, double azi1, double s12,
198  [System::Runtime::InteropServices::Out] double% lat2,
199  [System::Runtime::InteropServices::Out] double% lon2,
200  [System::Runtime::InteropServices::Out] double% azi2,
201  [System::Runtime::InteropServices::Out] double% M12,
202  [System::Runtime::InteropServices::Out] double% M21);
203 
204  /**
205  * See the documentation for GeodesicExact::Direct.
206  **********************************************************************/
207  double Direct(double lat1, double lon1, double azi1, double s12,
208  [System::Runtime::InteropServices::Out] double% lat2,
209  [System::Runtime::InteropServices::Out] double% lon2,
210  [System::Runtime::InteropServices::Out] double% azi2,
211  [System::Runtime::InteropServices::Out] double% m12,
212  [System::Runtime::InteropServices::Out] double% M12,
213  [System::Runtime::InteropServices::Out] double% M21);
214  ///@}
215 
216  /** \name Direct geodesic problem specified in terms of arc length.
217  **********************************************************************/
218  ///@{
219  /**
220  * Perform the direct geodesic calculation where the length of the geodesic
221  * is specified in terms of arc length.
222  *
223  * @param[in] lat1 latitude of point 1 (degrees).
224  * @param[in] lon1 longitude of point 1 (degrees).
225  * @param[in] azi1 azimuth at point 1 (degrees).
226  * @param[in] a12 arc length between point 1 and point 2 (degrees); it can
227  * be signed.
228  * @param[out] lat2 latitude of point 2 (degrees).
229  * @param[out] lon2 longitude of point 2 (degrees).
230  * @param[out] azi2 (forward) azimuth at point 2 (degrees).
231  * @param[out] s12 distance between point 1 and point 2 (meters).
232  * @param[out] m12 reduced length of geodesic (meters).
233  * @param[out] M12 geodesic scale of point 2 relative to point 1
234  * (dimensionless).
235  * @param[out] M21 geodesic scale of point 1 relative to point 2
236  * (dimensionless).
237  * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
238  *
239  * \e lat1 should be in the range [&minus;90&deg;, 90&deg;]; \e lon1 and \e
240  * azi1 should be in the range [&minus;540&deg;, 540&deg;). The values of
241  * \e lon2 and \e azi2 returned are in the range [&minus;180&deg;,
242  * 180&deg;).
243  *
244  * If either point is at a pole, the azimuth is defined by keeping the
245  * longitude fixed, writing \e lat = &plusmn;(90&deg; &minus; &epsilon;),
246  * and taking the limit &epsilon; &rarr; 0+. An arc length greater that
247  * 180&deg; signifies a geodesic which is not a shortest path. (For a
248  * prolate ellipsoid, an additional condition is necessary for a shortest
249  * path: the longitudinal extent must not exceed of 180&deg;.)
250  *
251  * The following functions are overloaded versions of GeodesicExact::Direct
252  * which omit some of the output parameters.
253  **********************************************************************/
254  void ArcDirect(double lat1, double lon1, double azi1, double a12,
255  [System::Runtime::InteropServices::Out] double% lat2,
256  [System::Runtime::InteropServices::Out] double% lon2,
257  [System::Runtime::InteropServices::Out] double% azi2,
258  [System::Runtime::InteropServices::Out] double% s12,
259  [System::Runtime::InteropServices::Out] double% m12,
260  [System::Runtime::InteropServices::Out] double% M12,
261  [System::Runtime::InteropServices::Out] double% M21,
262  [System::Runtime::InteropServices::Out] double% S12);
263 
264  /**
265  * See the documentation for GeodesicExact::ArcDirect.
266  **********************************************************************/
267  void ArcDirect(double lat1, double lon1, double azi1, double a12,
268  [System::Runtime::InteropServices::Out] double% lat2,
269  [System::Runtime::InteropServices::Out] double% lon2);
270 
271  /**
272  * See the documentation for GeodesicExact::ArcDirect.
273  **********************************************************************/
274  void ArcDirect(double lat1, double lon1, double azi1, double a12,
275  [System::Runtime::InteropServices::Out] double% lat2,
276  [System::Runtime::InteropServices::Out] double% lon2,
277  [System::Runtime::InteropServices::Out] double% azi2);
278 
279  /**
280  * See the documentation for GeodesicExact::ArcDirect.
281  **********************************************************************/
282  void ArcDirect(double lat1, double lon1, double azi1, double a12,
283  [System::Runtime::InteropServices::Out] double% lat2,
284  [System::Runtime::InteropServices::Out] double% lon2,
285  [System::Runtime::InteropServices::Out] double% azi2,
286  [System::Runtime::InteropServices::Out] double% s12);
287 
288  /**
289  * See the documentation for GeodesicExact::ArcDirect.
290  **********************************************************************/
291  void ArcDirect(double lat1, double lon1, double azi1, double a12,
292  [System::Runtime::InteropServices::Out] double% lat2,
293  [System::Runtime::InteropServices::Out] double% lon2,
294  [System::Runtime::InteropServices::Out] double% azi2,
295  [System::Runtime::InteropServices::Out] double% s12,
296  [System::Runtime::InteropServices::Out] double% m12);
297 
298  /**
299  * See the documentation for GeodesicExact::ArcDirect.
300  **********************************************************************/
301  void ArcDirect(double lat1, double lon1, double azi1, double a12,
302  [System::Runtime::InteropServices::Out] double% lat2,
303  [System::Runtime::InteropServices::Out] double% lon2,
304  [System::Runtime::InteropServices::Out] double% azi2,
305  [System::Runtime::InteropServices::Out] double% s12,
306  [System::Runtime::InteropServices::Out] double% M12,
307  [System::Runtime::InteropServices::Out] double% M21);
308 
309  /**
310  * See the documentation for GeodesicExact::ArcDirect.
311  **********************************************************************/
312  void ArcDirect(double lat1, double lon1, double azi1, double a12,
313  [System::Runtime::InteropServices::Out] double% lat2,
314  [System::Runtime::InteropServices::Out] double% lon2,
315  [System::Runtime::InteropServices::Out] double% azi2,
316  [System::Runtime::InteropServices::Out] double% s12,
317  [System::Runtime::InteropServices::Out] double% m12,
318  [System::Runtime::InteropServices::Out] double% M12,
319  [System::Runtime::InteropServices::Out] double% M21);
320  ///@}
321 
322  /** \name General version of the direct geodesic solution.
323  **********************************************************************/
324  ///@{
325 
326  /**
327  * The general direct geodesic calculation. GeodesicExact::Direct and
328  * GeodesicExact::ArcDirect are defined in terms of this function.
329  *
330  * @param[in] lat1 latitude of point 1 (degrees).
331  * @param[in] lon1 longitude of point 1 (degrees).
332  * @param[in] azi1 azimuth at point 1 (degrees).
333  * @param[in] arcmode boolean flag determining the meaning of the second
334  * parameter.
335  * @param[in] s12_a12 if \e arcmode is false, this is the distance between
336  * point 1 and point 2 (meters); otherwise it is the arc length between
337  * point 1 and point 2 (degrees); it can be signed.
338  * @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask values
339  * specifying which of the following parameters should be set.
340  * @param[out] lat2 latitude of point 2 (degrees).
341  * @param[out] lon2 longitude of point 2 (degrees).
342  * @param[out] azi2 (forward) azimuth at point 2 (degrees).
343  * @param[out] s12 distance between point 1 and point 2 (meters).
344  * @param[out] m12 reduced length of geodesic (meters).
345  * @param[out] M12 geodesic scale of point 2 relative to point 1
346  * (dimensionless).
347  * @param[out] M21 geodesic scale of point 1 relative to point 2
348  * (dimensionless).
349  * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
350  * @return \e a12 arc length of between point 1 and point 2 (degrees).
351  *
352  * The NETGeographicLib::Mask values possible for \e outmask are
353  * - \e outmask |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2;
354  * - \e outmask |= NETGeographicLib::Mask::LONGITUDE for the latitude \e lon2;
355  * - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2;
356  * - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12;
357  * - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e
358  * m12;
359  * - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e
360  * M12 and \e M21;
361  * - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12;
362  * - \e outmask |= NETGeographicLib::Mask::ALL for all of the above.
363  * .
364  * The function value \e a12 is always computed and returned and this
365  * equals \e s12_a12 is \e arcmode is true. If \e outmask includes
366  * GeodesicExact::DISTANCE and \e arcmode is false, then \e s12 = \e
367  * s12_a12. It is not necessary to include NETGeographicLib::Mask::DISTANCE_IN in
368  * \e outmask; this is automatically included is \e arcmode is false.
369  **********************************************************************/
370  double GenDirect(double lat1, double lon1, double azi1,
371  bool arcmode, double s12_a12, NETGeographicLib::Mask outmask,
372  [System::Runtime::InteropServices::Out] double% lat2,
373  [System::Runtime::InteropServices::Out] double% lon2,
374  [System::Runtime::InteropServices::Out] double% azi2,
375  [System::Runtime::InteropServices::Out] double% s12,
376  [System::Runtime::InteropServices::Out] double% m12,
377  [System::Runtime::InteropServices::Out] double% M12,
378  [System::Runtime::InteropServices::Out] double% M21,
379  [System::Runtime::InteropServices::Out] double% S12);
380  ///@}
381 
382  /** \name Inverse geodesic problem.
383  **********************************************************************/
384  ///@{
385  /**
386  * Perform the inverse geodesic calculation.
387  *
388  * @param[in] lat1 latitude of point 1 (degrees).
389  * @param[in] lon1 longitude of point 1 (degrees).
390  * @param[in] lat2 latitude of point 2 (degrees).
391  * @param[in] lon2 longitude of point 2 (degrees).
392  * @param[out] s12 distance between point 1 and point 2 (meters).
393  * @param[out] azi1 azimuth at point 1 (degrees).
394  * @param[out] azi2 (forward) azimuth at point 2 (degrees).
395  * @param[out] m12 reduced length of geodesic (meters).
396  * @param[out] M12 geodesic scale of point 2 relative to point 1
397  * (dimensionless).
398  * @param[out] M21 geodesic scale of point 1 relative to point 2
399  * (dimensionless).
400  * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
401  * @return \e a12 arc length of between point 1 and point 2 (degrees).
402  *
403  * \e lat1 and \e lat2 should be in the range [&minus;90&deg;, 90&deg;]; \e
404  * lon1 and \e lon2 should be in the range [&minus;540&deg;, 540&deg;).
405  * The values of \e azi1 and \e azi2 returned are in the range
406  * [&minus;180&deg;, 180&deg;).
407  *
408  * If either point is at a pole, the azimuth is defined by keeping the
409  * longitude fixed, writing \e lat = &plusmn;(90&deg; &minus; &epsilon;),
410  * and taking the limit &epsilon; &rarr; 0+.
411  *
412  * The following functions are overloaded versions of GeodesicExact::Inverse
413  * which omit some of the output parameters. Note, however, that the arc
414  * length is always computed and returned as the function value.
415  **********************************************************************/
416  double Inverse(double lat1, double lon1, double lat2, double lon2,
417  [System::Runtime::InteropServices::Out] double% s12,
418  [System::Runtime::InteropServices::Out] double% azi1,
419  [System::Runtime::InteropServices::Out] double% azi2,
420  [System::Runtime::InteropServices::Out] double% m12,
421  [System::Runtime::InteropServices::Out] double% M12,
422  [System::Runtime::InteropServices::Out] double% M21,
423  [System::Runtime::InteropServices::Out] double% S12);
424 
425  /**
426  * See the documentation for GeodesicExact::Inverse.
427  **********************************************************************/
428  double Inverse(double lat1, double lon1, double lat2, double lon2,
429  [System::Runtime::InteropServices::Out] double% s12);
430 
431  /**
432  * See the documentation for GeodesicExact::Inverse.
433  **********************************************************************/
434  double Inverse(double lat1, double lon1, double lat2, double lon2,
435  [System::Runtime::InteropServices::Out] double% azi1,
436  [System::Runtime::InteropServices::Out] double% azi2);
437 
438  /**
439  * See the documentation for GeodesicExact::Inverse.
440  **********************************************************************/
441  double Inverse(double lat1, double lon1, double lat2, double lon2,
442  [System::Runtime::InteropServices::Out] double% s12,
443  [System::Runtime::InteropServices::Out] double% azi1,
444  [System::Runtime::InteropServices::Out] double% azi2);
445 
446  /**
447  * See the documentation for GeodesicExact::Inverse.
448  **********************************************************************/
449  double Inverse(double lat1, double lon1, double lat2, double lon2,
450  [System::Runtime::InteropServices::Out] double% s12,
451  [System::Runtime::InteropServices::Out] double% azi1,
452  [System::Runtime::InteropServices::Out] double% azi2,
453  [System::Runtime::InteropServices::Out] double% m12);
454 
455  /**
456  * See the documentation for GeodesicExact::Inverse.
457  **********************************************************************/
458  double Inverse(double lat1, double lon1, double lat2, double lon2,
459  [System::Runtime::InteropServices::Out] double% s12,
460  [System::Runtime::InteropServices::Out] double% azi1,
461  [System::Runtime::InteropServices::Out] double% azi2,
462  [System::Runtime::InteropServices::Out] double% M12,
463  [System::Runtime::InteropServices::Out] double% M21);
464 
465  /**
466  * See the documentation for GeodesicExact::Inverse.
467  **********************************************************************/
468  double Inverse(double lat1, double lon1, double lat2, double lon2,
469  [System::Runtime::InteropServices::Out] double% s12,
470  [System::Runtime::InteropServices::Out] double% azi1,
471  [System::Runtime::InteropServices::Out] double% azi2,
472  [System::Runtime::InteropServices::Out] double% m12,
473  [System::Runtime::InteropServices::Out] double% M12,
474  [System::Runtime::InteropServices::Out] double% M21);
475  ///@}
476 
477  /** \name General version of inverse geodesic solution.
478  **********************************************************************/
479  ///@{
480  /**
481  * The general inverse geodesic calculation. GeodesicExact::Inverse is
482  * defined in terms of this function.
483  *
484  * @param[in] lat1 latitude of point 1 (degrees).
485  * @param[in] lon1 longitude of point 1 (degrees).
486  * @param[in] lat2 latitude of point 2 (degrees).
487  * @param[in] lon2 longitude of point 2 (degrees).
488  * @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask values
489  * specifying which of the following parameters should be set.
490  * @param[out] s12 distance between point 1 and point 2 (meters).
491  * @param[out] azi1 azimuth at point 1 (degrees).
492  * @param[out] azi2 (forward) azimuth at point 2 (degrees).
493  * @param[out] m12 reduced length of geodesic (meters).
494  * @param[out] M12 geodesic scale of point 2 relative to point 1
495  * (dimensionless).
496  * @param[out] M21 geodesic scale of point 1 relative to point 2
497  * (dimensionless).
498  * @param[out] S12 area under the geodesic (meters<sup>2</sup>).
499  * @return \e a12 arc length of between point 1 and point 2 (degrees).
500  *
501  * The NETGeographicLib::Mask values possible for \e outmask are
502  * - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12;
503  * - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2;
504  * - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e
505  * m12;
506  * - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e
507  * M12 and \e M21;
508  * - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12;
509  * - \e outmask |= NETGeographicLib::Mask::ALL for all of the above.
510  * .
511  * The arc length is always computed and returned as the function value.
512  **********************************************************************/
513  double GenInverse(double lat1, double lon1, double lat2, double lon2,
514  NETGeographicLib::Mask outmask,
515  [System::Runtime::InteropServices::Out] double% s12,
516  [System::Runtime::InteropServices::Out] double% azi1,
517  [System::Runtime::InteropServices::Out] double% azi2,
518  [System::Runtime::InteropServices::Out] double% m12,
519  [System::Runtime::InteropServices::Out] double% M12,
520  [System::Runtime::InteropServices::Out] double% M21,
521  [System::Runtime::InteropServices::Out] double% S12);
522  ///@}
523 
524  /** \name Interface to GeodesicLineExact.
525  **********************************************************************/
526  ///@{
527 
528  /**
529  * Set up to compute several points on a single geodesic.
530  *
531  * @param[in] lat1 latitude of point 1 (degrees).
532  * @param[in] lon1 longitude of point 1 (degrees).
533  * @param[in] azi1 azimuth at point 1 (degrees).
534  * @param[in] caps bitor'ed combination of NETGeographicLib::Mask values
535  * specifying the capabilities the GeodesicLineExact object should
536  * possess, i.e., which quantities can be returned in calls to
537  * GeodesicLineExact::Position.
538  * @return a GeodesicLineExact object.
539  *
540  * \e lat1 should be in the range [&minus;90&deg;, 90&deg;]; \e lon1 and \e
541  * azi1 should be in the range [&minus;540&deg;, 540&deg;).
542  *
543  * The GeodesicExact::mask values are
544  * - \e caps |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2; this is
545  * added automatically;
546  * - \e caps |= NETGeographicLib::Mask::LONGITUDE for the latitude \e lon2;
547  * - \e caps |= NETGeographicLib::Mask::AZIMUTH for the azimuth \e azi2; this is
548  * added automatically;
549  * - \e caps |= NETGeographicLib::Mask::DISTANCE for the distance \e s12;
550  * - \e caps |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e m12;
551  * - \e caps |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e M12
552  * and \e M21;
553  * - \e caps |= NETGeographicLib::Mask::AREA for the area \e S12;
554  * - \e caps |= NETGeographicLib::Mask::DISTANCE_IN permits the length of the
555  * geodesic to be given in terms of \e s12; without this capability the
556  * length can only be specified in terms of arc length;
557  * - \e caps |= GeodesicExact::ALL for all of the above.
558  * .
559  * The default value of \e caps is GeodesicExact::ALL which turns on all
560  * the capabilities.
561  *
562  * If the point is at a pole, the azimuth is defined by keeping \e lon1
563  * fixed, writing \e lat1 = &plusmn;(90 &minus; &epsilon;), and taking the
564  * limit &epsilon; &rarr; 0+.
565  **********************************************************************/
566  GeodesicLineExact^ Line(double lat1, double lon1, double azi1,
567  NETGeographicLib::Mask caps );
568 
569  ///@}
570 
571  /** \name Inspector functions.
572  **********************************************************************/
573  ///@{
574 
575  /**
576  * @return \e a the equatorial radius of the ellipsoid (meters). This is
577  * the value used in the constructor.
578  **********************************************************************/
579  property double MajorRadius { double get(); }
580 
581  /**
582  * @return \e f the flattening of the ellipsoid. This is the
583  * value used in the constructor.
584  **********************************************************************/
585  property double Flattening { double get(); }
586 
587  /**
588  * @return total area of ellipsoid in meters<sup>2</sup>. The area of a
589  * polygon encircling a pole can be found by adding
590  * GeodesicExact::EllipsoidArea()/2 to the sum of \e S12 for each side of
591  * the polygon.
592  **********************************************************************/
593  property double EllipsoidArea { double get(); }
594  ///@}
595 
596  /**
597  * @return A pointer to the unmanaged GeographicLib::GeodesicExact.
598  *
599  * This function is for internal use only.
600  **********************************************************************/
601  System::IntPtr^ GetUnmanaged();
602  };
603 } // namespace NETGeographicLib