NETGeographicLib  1.50.1
GeodesicLine.h
Go to the documentation of this file.
1 #pragma once
2 /**
3  * \file NETGeographicLib/GeodesicLine.h
4  * \brief Header for NETGeographicLib::GeodesicLine 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  * https://geographiclib.sourceforge.io/
11  **********************************************************************/
12 #include "NETGeographicLib.h"
13 
14 namespace NETGeographicLib
15 {
16  /**
17  * \brief .NET wrapper for GeographicLib::GeodesicLine.
18  *
19  * This class allows .NET applications to access GeographicLib::GeodesicLine.
20  *
21  * GeodesicLine facilitates the determination of a series of points on a
22  * single geodesic. The starting point (\e lat1, \e lon1) and the azimuth \e
23  * azi1 are specified in the constructor. GeodesicLine.Position returns the
24  * location of point 2 a distance \e s12 along the geodesic. Alternatively
25  * GeodesicLine.ArcPosition gives the position of point 2 an arc length \e
26  * a12 along the geodesic.
27  *
28  * The default copy constructor and assignment operators work with this
29  * class. Similarly, a vector can be used to hold GeodesicLine objects.
30  *
31  * The calculations are accurate to better than 15 nm (15 nanometers). See
32  * Sec. 9 of
33  * <a href="https://arxiv.org/abs/1102.1215v1">arXiv:1102.1215v1</a> for
34  * details. The algorithms used by this class are based on series expansions
35  * using the flattening \e f as a small parameter. These are only accurate
36  * for |<i>f</i>| &lt; 0.02; however reasonably accurate results will be
37  * obtained for |<i>f</i>| &lt; 0.2. For very eccentric ellipsoids, use
38  * GeodesicLineExact instead.
39  *
40  * The algorithms are described in
41  * - C. F. F. Karney,
42  * <a href="https://doi.org/10.1007/s00190-012-0578-z">
43  * Algorithms for geodesics</a>,
44  * J. Geodesy <b>87</b>, 43--55 (2013);
45  * DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
46  * 10.1007/s00190-012-0578-z</a>;
47  * addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
48  * geod-addenda.html</a>.
49  * .
50  * For more information on geodesics see \ref geodesic.
51  *
52  * C# Example:
53  * \include example-GeodesicLine.cs
54  * Managed C++ Example:
55  * \include example-GeodesicLine.cpp
56  * Visual Basic Example:
57  * \include example-GeodesicLine.vb
58  *
59  * <B>INTERFACE DIFFERENCES:</B><BR>
60  * A constructor has been provided which assumes WGS84 parameters.
61  *
62  * The following functions are implemented as properties:
63  * Latitude, Longitude, Azimuth, EquatorialAzimuth, EquatorialArc,
64  * EquatorialRadius, Distance, Arc, and Flattening.
65  *
66  * The constructors, Capabilities, and GenPosition functions accept the
67  * "capabilities mask" as a NETGeographicLib::Mask rather than an
68  * unsigned. The Capabilities function returns a NETGeographicLib::Mask
69  * rather than an unsigned.
70  *
71  * The overloaded Azimuth and EquatorialAzimuth functions that return
72  * the sin and cosine terms have been renamed AzimuthSinCos and
73  * EquatorialAzimuthSinCos, repectively.
74  **********************************************************************/
75  public ref class GeodesicLine
76  {
77  private:
78  // pointer to the unmanaged GeographicLib::GeodesicLine.
79  GeographicLib::GeodesicLine* m_pGeodesicLine;
80 
81  // The finalizer frees the unmanaged memory when this object is destroyed.
82  !GeodesicLine(void);
83  public:
84 
85  /**
86  * Bit masks for what calculations to do. They signify to the
87  * GeodesicLine::GeodesicLine constructor and to Geodesic::Line what
88  * capabilities should be included in the GeodesicLine object. This is
89  * merely a duplication of Geodesic::mask.
90  **********************************************************************/
91  enum class mask {
92  /**
93  * No capabilities, no output.
94  * @hideinitializer
95  **********************************************************************/
96  NONE = 0U,
97  /**
98  * Calculate latitude \e lat2. (It's not necessary to include this as a
99  * capability to GeodesicLine because this is included by default.)
100  * @hideinitializer
101  **********************************************************************/
102  LATITUDE = 1U<<7 | unsigned(captype::CAP_NONE),
103  /**
104  * Calculate longitude \e lon2.
105  * @hideinitializer
106  **********************************************************************/
107  LONGITUDE = 1U<<8 | unsigned(captype::CAP_C3),
108  /**
109  * Calculate azimuths \e azi1 and \e azi2. (It's not necessary to
110  * include this as a capability to GeodesicLine because this is included
111  * by default.)
112  * @hideinitializer
113  **********************************************************************/
114  AZIMUTH = 1U<<9 | unsigned(captype::CAP_NONE),
115  /**
116  * Calculate distance \e s12.
117  * @hideinitializer
118  **********************************************************************/
119  DISTANCE = 1U<<10 | unsigned(captype::CAP_C1),
120  /**
121  * Allow distance \e s12 to be used as input in the direct geodesic
122  * problem.
123  * @hideinitializer
124  **********************************************************************/
125  DISTANCE_IN = 1U<<11 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C1p),
126  /**
127  * Calculate reduced length \e m12.
128  * @hideinitializer
129  **********************************************************************/
130  REDUCEDLENGTH = 1U<<12 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C2),
131  /**
132  * Calculate geodesic scales \e M12 and \e M21.
133  * @hideinitializer
134  **********************************************************************/
135  GEODESICSCALE = 1U<<13 | unsigned(captype::CAP_C1) | unsigned(captype::CAP_C2),
136  /**
137  * Calculate area \e S12.
138  * @hideinitializer
139  **********************************************************************/
140  AREA = 1U<<14 | unsigned(captype::CAP_C4),
141  /**
142  * Unroll \e lon2 in the direct calculation.
143  * @hideinitializer
144  **********************************************************************/
145  LONG_UNROLL = 1U<<15,
146  /**
147  * All capabilities, calculate everything. (LONG_UNROLL is not
148  * included in this mask.)
149  * @hideinitializer
150  **********************************************************************/
151  ALL = unsigned(captype::OUT_ALL)| unsigned(captype::CAP_ALL),
152  };
153  /** \name Constructors
154  **********************************************************************/
155  ///@{
156 
157  /**
158  * Constructor for a geodesic line staring at latitude \e lat1, longitude
159  * \e lon1, and azimuth \e azi1 (all in degrees).
160  *
161  * @param[in] g A Geodesic object used to compute the necessary information
162  * about the GeodesicLine.
163  * @param[in] lat1 latitude of point 1 (degrees).
164  * @param[in] lon1 longitude of point 1 (degrees).
165  * @param[in] azi1 azimuth at point 1 (degrees).
166  * @param[in] caps bitor'ed combination of NETGeographicLib::Mask values
167  * specifying the capabilities the GeodesicLine object should possess,
168  * i.e., which quantities can be returned in calls to
169  * GeodesicLine::Position.
170  *
171  * \e lat1 should be in the range [&minus;90&deg;, 90&deg;].
172  *
173  * The NETGeographicLib::Mask values are
174  * - \e caps |= GeodesicLine::LATITUDE for the latitude \e lat2; this is
175  * added automatically;
176  * - \e caps |= GeodesicLine::LONGITUDE for the latitude \e lon2;
177  * - \e caps |= GeodesicLine::AZIMUTH for the latitude \e azi2; this is
178  * added automatically;
179  * - \e caps |= GeodesicLine::DISTANCE for the distance \e s12;
180  * - \e caps |= GeodesicLine::REDUCEDLENGTH for the reduced length \e m12;
181  * - \e caps |= GeodesicLine::GEODESICSCALE for the geodesic scales \e M12
182  * and \e M21;
183  * - \e caps |= GeodesicLine::AREA for the area \e S12;
184  * - \e caps |= GeodesicLine::DISTANCE_IN permits the length of the
185  * geodesic to be given in terms of \e s12; without this capability the
186  * length can only be specified in terms of arc length;
187  * - \e caps |= GeodesicLine::ALL for all of the above.
188  * .
189  * The default value of \e caps is GeodesicLine::ALL.
190  *
191  * If the point is at a pole, the azimuth is defined by keeping \e lon1
192  * fixed, writing \e lat1 = &plusmn;(90&deg; &minus; &epsilon;), and taking
193  * the limit &epsilon; &rarr; 0+.
194  **********************************************************************/
195  GeodesicLine( Geodesic^ g, double lat1, double lon1, double azi1,
196  NETGeographicLib::Mask caps );
197 
198  /**
199  * A constructor which assumes the WGS84 ellipsoid.
200  **********************************************************************/
201  GeodesicLine(double lat1, double lon1, double azi1,
203 
204  /**
205  * A constructoe that accepts a reference to an unmanages GeodesicLin.
206  * FOR INTERNAL USE ONLY
207  **********************************************************************/
209  ///@}
210 
211  /**
212  * The destructor calls the finalizer.
213  **********************************************************************/
215  { this->!GeodesicLine(); }
216 
217  /** \name Position in terms of distance
218  **********************************************************************/
219  ///@{
220 
221  /**
222  * Compute the position of point 2 which is a distance \e s12 (meters) from
223  * point 1.
224  *
225  * @param[in] s12 distance between point 1 and point 2 (meters); it can be
226  * negative.
227  * @param[out] lat2 latitude of point 2 (degrees).
228  * @param[out] lon2 longitude of point 2 (degrees); requires that the
229  * GeodesicLine object was constructed with \e caps |=
230  * GeodesicLine::LONGITUDE.
231  * @param[out] azi2 (forward) azimuth at point 2 (degrees).
232  * @param[out] m12 reduced length of geodesic (meters); requires that the
233  * GeodesicLine object was constructed with \e caps |=
234  * GeodesicLine::REDUCEDLENGTH.
235  * @param[out] M12 geodesic scale of point 2 relative to point 1
236  * (dimensionless); requires that the GeodesicLine object was constructed
237  * with \e caps |= GeodesicLine::GEODESICSCALE.
238  * @param[out] M21 geodesic scale of point 1 relative to point 2
239  * (dimensionless); requires that the GeodesicLine object was constructed
240  * with \e caps |= GeodesicLine::GEODESICSCALE.
241  * @param[out] S12 area under the geodesic (meters<sup>2</sup>); requires
242  * that the GeodesicLine object was constructed with \e caps |=
243  * GeodesicLine::AREA.
244  * @return \e a12 arc length of between point 1 and point 2 (degrees).
245  *
246  * The values of \e lon2 and \e azi2 returned are in the range
247  * [&minus;180&deg;, 180&deg;).
248  *
249  * The GeodesicLine object \e must have been constructed with \e caps |=
250  * GeodesicLine::DISTANCE_IN; otherwise Math::NaN() is returned and no
251  * parameters are set. Requesting a value which the GeodesicLine object is
252  * not capable of computing is not an error; the corresponding argument
253  * will not be altered.
254  *
255  * The following functions are overloaded versions of
256  * GeodesicLine::Position which omit some of the output parameters. Note,
257  * however, that the arc length is always computed and returned as the
258  * function value.
259  **********************************************************************/
260  double Position(double s12,
261  [System::Runtime::InteropServices::Out] double% lat2,
262  [System::Runtime::InteropServices::Out] double% lon2,
263  [System::Runtime::InteropServices::Out] double% azi2,
264  [System::Runtime::InteropServices::Out] double% m12,
265  [System::Runtime::InteropServices::Out] double% M12,
266  [System::Runtime::InteropServices::Out] double% M21,
267  [System::Runtime::InteropServices::Out] double% S12);
268 
269  /**
270  * See the documentation for GeodesicLine::Position.
271  **********************************************************************/
272  double Position(double s12,
273  [System::Runtime::InteropServices::Out] double% lat2,
274  [System::Runtime::InteropServices::Out] double% lon2);
275 
276  /**
277  * See the documentation for GeodesicLine::Position.
278  **********************************************************************/
279  double Position(double s12,
280  [System::Runtime::InteropServices::Out] double% lat2,
281  [System::Runtime::InteropServices::Out] double% lon2,
282  [System::Runtime::InteropServices::Out] double% azi2);
283 
284  /**
285  * See the documentation for GeodesicLine::Position.
286  **********************************************************************/
287  double Position(double s12,
288  [System::Runtime::InteropServices::Out] double% lat2,
289  [System::Runtime::InteropServices::Out] double% lon2,
290  [System::Runtime::InteropServices::Out] double% azi2,
291  [System::Runtime::InteropServices::Out] double% m12);
292 
293  /**
294  * See the documentation for GeodesicLine::Position.
295  **********************************************************************/
296  double Position(double s12,
297  [System::Runtime::InteropServices::Out] double% lat2,
298  [System::Runtime::InteropServices::Out] double% lon2,
299  [System::Runtime::InteropServices::Out] double% azi2,
300  [System::Runtime::InteropServices::Out] double% M12,
301  [System::Runtime::InteropServices::Out] double% M21);
302 
303  /**
304  * See the documentation for GeodesicLine::Position.
305  **********************************************************************/
306  double Position(double s12,
307  [System::Runtime::InteropServices::Out] double% lat2,
308  [System::Runtime::InteropServices::Out] double% lon2,
309  [System::Runtime::InteropServices::Out] double% azi2,
310  [System::Runtime::InteropServices::Out] double% m12,
311  [System::Runtime::InteropServices::Out] double% M12,
312  [System::Runtime::InteropServices::Out] double% M21);
313 
314  ///@}
315 
316  /** \name Position in terms of arc length
317  **********************************************************************/
318  ///@{
319 
320  /**
321  * Compute the position of point 2 which is an arc length \e a12 (degrees)
322  * from point 1.
323  *
324  * @param[in] a12 arc length between point 1 and point 2 (degrees); it can
325  * be negative.
326  * @param[out] lat2 latitude of point 2 (degrees).
327  * @param[out] lon2 longitude of point 2 (degrees); requires that the
328  * GeodesicLine object was constructed with \e caps |=
329  * NETGeographicLib::Mask::LONGITUDE.
330  * @param[out] azi2 (forward) azimuth at point 2 (degrees).
331  * @param[out] s12 distance between point 1 and point 2 (meters); requires
332  * that the GeodesicLine object was constructed with \e caps |=
333  * NETGeographicLib::Mask::DISTANCE.
334  * @param[out] m12 reduced length of geodesic (meters); requires that the
335  * GeodesicLine object was constructed with \e caps |=
336  * NETGeographicLib::Mask::REDUCEDLENGTH.
337  * @param[out] M12 geodesic scale of point 2 relative to point 1
338  * (dimensionless); requires that the GeodesicLine object was constructed
339  * with \e caps |= NETGeographicLib::Mask::GEODESICSCALE.
340  * @param[out] M21 geodesic scale of point 1 relative to point 2
341  * (dimensionless); requires that the GeodesicLine object was constructed
342  * with \e caps |= NETGeographicLib::Mask::GEODESICSCALE.
343  * @param[out] S12 area under the geodesic (meters<sup>2</sup>); requires
344  * that the GeodesicLine object was constructed with \e caps |=
345  * NETGeographicLib::Mask::AREA.
346  *
347  * The values of \e lon2 and \e azi2 returned are in the range
348  * [&minus;180&deg;, 180&deg;).
349  *
350  * Requesting a value which the GeodesicLine object is not capable of
351  * computing is not an error; the corresponding argument will not be
352  * altered.
353  *
354  * The following functions are overloaded versions of
355  * GeodesicLine::ArcPosition which omit some of the output parameters.
356  **********************************************************************/
357  void ArcPosition(double a12,
358  [System::Runtime::InteropServices::Out] double% lat2,
359  [System::Runtime::InteropServices::Out] double% lon2,
360  [System::Runtime::InteropServices::Out] double% azi2,
361  [System::Runtime::InteropServices::Out] double% s12,
362  [System::Runtime::InteropServices::Out] double% m12,
363  [System::Runtime::InteropServices::Out] double% M12,
364  [System::Runtime::InteropServices::Out] double% M21,
365  [System::Runtime::InteropServices::Out] double% S12);
366 
367  /**
368  * See the documentation for GeodesicLine::ArcPosition.
369  **********************************************************************/
370  void ArcPosition(double a12,
371  [System::Runtime::InteropServices::Out] double% lat2,
372  [System::Runtime::InteropServices::Out] double% lon2);
373 
374  /**
375  * See the documentation for GeodesicLine::ArcPosition.
376  **********************************************************************/
377  void ArcPosition(double a12,
378  [System::Runtime::InteropServices::Out] double% lat2,
379  [System::Runtime::InteropServices::Out] double% lon2,
380  [System::Runtime::InteropServices::Out] double% azi2);
381 
382  /**
383  * See the documentation for GeodesicLine::ArcPosition.
384  **********************************************************************/
385  void ArcPosition(double a12,
386  [System::Runtime::InteropServices::Out] double% lat2,
387  [System::Runtime::InteropServices::Out] double% lon2,
388  [System::Runtime::InteropServices::Out] double% azi2,
389  [System::Runtime::InteropServices::Out] double% s12);
390 
391  /**
392  * See the documentation for GeodesicLine::ArcPosition.
393  **********************************************************************/
394  void ArcPosition(double a12,
395  [System::Runtime::InteropServices::Out] double% lat2,
396  [System::Runtime::InteropServices::Out] double% lon2,
397  [System::Runtime::InteropServices::Out] double% azi2,
398  [System::Runtime::InteropServices::Out] double% s12,
399  [System::Runtime::InteropServices::Out] double% m12);
400 
401  /**
402  * See the documentation for GeodesicLine::ArcPosition.
403  **********************************************************************/
404  void ArcPosition(double a12,
405  [System::Runtime::InteropServices::Out] double% lat2,
406  [System::Runtime::InteropServices::Out] double% lon2,
407  [System::Runtime::InteropServices::Out] double% azi2,
408  [System::Runtime::InteropServices::Out] double% s12,
409  [System::Runtime::InteropServices::Out] double% M12,
410  [System::Runtime::InteropServices::Out] double% M21);
411 
412  /**
413  * See the documentation for GeodesicLine::ArcPosition.
414  **********************************************************************/
415  void ArcPosition(double a12,
416  [System::Runtime::InteropServices::Out] double% lat2,
417  [System::Runtime::InteropServices::Out] double% lon2,
418  [System::Runtime::InteropServices::Out] double% azi2,
419  [System::Runtime::InteropServices::Out] double% s12,
420  [System::Runtime::InteropServices::Out] double% m12,
421  [System::Runtime::InteropServices::Out] double% M12,
422  [System::Runtime::InteropServices::Out] double% M21);
423  ///@}
424 
425  /** \name The general position function.
426  **********************************************************************/
427  ///@{
428 
429  /**
430  * The general position function. GeodesicLine::Position and
431  * GeodesicLine::ArcPosition are defined in terms of this function.
432  *
433  * @param[in] arcmode boolean flag determining the meaning of the second
434  * parameter; if arcmode is false, then the GeodesicLine object must have
435  * been constructed with \e caps |= GeodesicLine::DISTANCE_IN.
436  * @param[in] s12_a12 if \e arcmode is false, this is the distance between
437  * point 1 and point 2 (meters); otherwise it is the arc length between
438  * point 1 and point 2 (degrees); it can be negative.
439  * @param[in] outmask a bitor'ed combination of GeodesicLine::mask values
440  * specifying which of the following parameters should be set.
441  * @param[out] lat2 latitude of point 2 (degrees).
442  * @param[out] lon2 longitude of point 2 (degrees); requires that the
443  * GeodesicLine object was constructed with \e caps |=
444  * GeodesicLine::LONGITUDE.
445  * @param[out] azi2 (forward) azimuth at point 2 (degrees).
446  * @param[out] s12 distance between point 1 and point 2 (meters); requires
447  * that the GeodesicLine object was constructed with \e caps |=
448  * GeodesicLine::DISTANCE.
449  * @param[out] m12 reduced length of geodesic (meters); requires that the
450  * GeodesicLine object was constructed with \e caps |=
451  * GeodesicLine::REDUCEDLENGTH.
452  * @param[out] M12 geodesic scale of point 2 relative to point 1
453  * (dimensionless); requires that the GeodesicLine object was constructed
454  * with \e caps |= GeodesicLine::GEODESICSCALE.
455  * @param[out] M21 geodesic scale of point 1 relative to point 2
456  * (dimensionless); requires that the GeodesicLine object was constructed
457  * with \e caps |= GeodesicLine::GEODESICSCALE.
458  * @param[out] S12 area under the geodesic (meters<sup>2</sup>); requires
459  * that the GeodesicLine object was constructed with \e caps |=
460  * GeodesicLine::AREA.
461  * @return \e a12 arc length of between point 1 and point 2 (degrees).
462  *
463  * The GeodesicLine::mask values possible for \e outmask are
464  * - \e outmask |= GeodesicLine::LATITUDE for the latitude \e lat2;
465  * - \e outmask |= GeodesicLine::LONGITUDE for the latitude \e lon2;
466  * - \e outmask |= GeodesicLine::AZIMUTH for the latitude \e azi2;
467  * - \e outmask |= GeodesicLine::DISTANCE for the distance \e s12;
468  * - \e outmask |= GeodesicLine::REDUCEDLENGTH for the reduced length \e
469  * m12;
470  * - \e outmask |= GeodesicLine::GEODESICSCALE for the geodesic scales \e
471  * M12 and \e M21;
472  * - \e outmask |= GeodesicLine::AREA for the area \e S12;
473  * - \e outmask |= GeodesicLine::ALL for all of the above;
474  * - \e outmask |= GeodesicLine::LONG_UNROLL to unroll \e lon2 instead of
475  * wrapping it into the range [&minus;180&deg;, 180&deg;).
476  * .
477  * Requesting a value which the GeodesicLine object is not capable of
478  * computing is not an error; the corresponding argument will not be
479  * altered. Note, however, that the arc length is always computed and
480  * returned as the function value.
481  *
482  * With the LONG_UNROLL bit set, the quantity \e lon2 &minus; \e lon1
483  * indicates how many times and in what sense the geodesic encircles
484  * the ellipsoid.
485  **********************************************************************/
486  double GenPosition(bool arcmode, double s12_a12,
487  GeodesicLine::mask outmask,
488  [System::Runtime::InteropServices::Out] double% lat2,
489  [System::Runtime::InteropServices::Out] double% lon2,
490  [System::Runtime::InteropServices::Out] double% azi2,
491  [System::Runtime::InteropServices::Out] double% s12,
492  [System::Runtime::InteropServices::Out] double% m12,
493  [System::Runtime::InteropServices::Out] double% M12,
494  [System::Runtime::InteropServices::Out] double% M21,
495  [System::Runtime::InteropServices::Out] double% S12);
496 
497  ///@}
498 
499  /** \name Setting point 3
500  **********************************************************************/
501  ///@{
502 
503  /**
504  * Specify position of point 3 in terms of distance.
505  *
506  * @param[in] s13 the distance from point 1 to point 3 (meters); it
507  * can be negative.
508  *
509  * This is only useful if the GeodesicLine object has been constructed
510  * with \e caps |= GeodesicLine::DISTANCE_IN.
511  **********************************************************************/
512  void SetDistance(double s13);
513 
514  /**
515  * Specify position of point 3 in terms of arc length.
516  *
517  * @param[in] a13 the arc length from point 1 to point 3 (degrees); it
518  * can be negative.
519  *
520  * The distance \e s13 is only set if the GeodesicLine object has been
521  * constructed with \e caps |= GeodesicLine::DISTANCE.
522  **********************************************************************/
523  void SetArc(double a13);
524 
525  /**
526  * Specify position of point 3 in terms of either distance or arc length.
527  *
528  * @param[in] arcmode boolean flag determining the meaning of the second
529  * parameter; if \e arcmode is false, then the GeodesicLine object must
530  * have been constructed with \e caps |= GeodesicLine::DISTANCE_IN.
531  * @param[in] s13_a13 if \e arcmode is false, this is the distance from
532  * point 1 to point 3 (meters); otherwise it is the arc length from
533  * point 1 to point 3 (degrees); it can be negative.
534  **********************************************************************/
535  void GenSetDistance(bool arcmode, double s13_a13);
536  ///@}
537 
538  /** \name Trigonometric accessor functions
539  **********************************************************************/
540  ///@{
541  /**
542  * The sine and cosine of \e azi1.
543  *
544  * @param[out] sazi1 the sine of \e azi1.
545  * @param[out] cazi1 the cosine of \e azi1.
546  **********************************************************************/
547  void AzimuthSinCos([System::Runtime::InteropServices::Out] double% sazi1,
548  [System::Runtime::InteropServices::Out] double% cazi1);
549 
550  /**
551  * The sine and cosine of \e azi0.
552  *
553  * @param[out] sazi0 the sine of \e azi0.
554  * @param[out] cazi0 the cosine of \e azi0.
555  **********************************************************************/
557  [System::Runtime::InteropServices::Out] double% sazi0,
558  [System::Runtime::InteropServices::Out] double% cazi0);
559 
560  /**
561  * The distance or arc length to point 3.
562  *
563  * @param[in] arcmode boolean flag determining the meaning of returned
564  * value.
565  * @return \e s13 if \e arcmode is false; \e a13 if \e arcmode is true.
566  **********************************************************************/
567  double GenDistance(bool arcmode);
568  ///@}
569 
570  /** \name Inspector functions
571  **********************************************************************/
572  ///@{
573 
574  /**
575  * @return \e lat1 the latitude of point 1 (degrees).
576  **********************************************************************/
577  property double Latitude { double get(); }
578 
579  /**
580  * @return \e lon1 the longitude of point 1 (degrees).
581  **********************************************************************/
582  property double Longitude { double get(); }
583 
584  /**
585  * @return \e azi1 the azimuth (degrees) of the geodesic line at point 1.
586  **********************************************************************/
587  property double Azimuth { double get(); }
588 
589  /**
590  * @return \e azi0 the azimuth (degrees) of the geodesic line as it crosses
591  * the equator in a northward direction.
592  **********************************************************************/
593  property double EquatorialAzimuth { double get(); }
594 
595  /**
596  * @return \e a1 the arc length (degrees) between the northward equatorial
597  * crossing and point 1.
598  **********************************************************************/
599  property double EquatorialArc { double get(); }
600 
601  /**
602  * @return \e a the equatorial radius of the ellipsoid (meters). This is
603  * the value inherited from the Geodesic object used in the constructor.
604  **********************************************************************/
605  property double EquatorialRadius { double get(); }
606 
607  /**
608  * @return \e f the flattening of the ellipsoid. This is the value
609  * inherited from the Geodesic object used in the constructor.
610  **********************************************************************/
611  property double Flattening { double get(); }
612 
613  /**
614  * @return \e s13, the distance to point 3 (meters).
615  **********************************************************************/
616  property double Distance { double get(); }
617 
618  /**
619  * @return \e a13, the arc length to point 3 (degrees).
620  **********************************************************************/
621  property double Arc { double get(); }
622 
623  /**
624  * @return \e caps the computational capabilities that this object was
625  * constructed with. LATITUDE and AZIMUTH are always included.
626  **********************************************************************/
628 
629  /**
630  * @param[in] testcaps a set of bitor'ed GeodesicLine::mask values.
631  * @return true if the GeodesicLine object has all these capabilities.
632  **********************************************************************/
633  bool Capabilities(GeodesicLine::mask testcaps);
634  ///@}
635  };
636 } // namespace NETGeographicLib
Header for NETGeographicLib::NETGeographicLib objects.
NETGeographicLib::Mask Capabilities()
void EquatorialAzimuthSinCos([System::Runtime::InteropServices::Out] double% sazi0, [System::Runtime::InteropServices::Out] double% cazi0)
double GenDistance(bool arcmode)
.NET wrapper for GeographicLib::GeodesicLine.
Definition: GeodesicLine.h:75
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)
.NET wrapper for GeographicLib::Geodesic.
Definition: Geodesic.h:170
GeodesicLine(Geodesic^ g, double lat1, double lon1, double azi1, NETGeographicLib::Mask caps)
void GenSetDistance(bool arcmode, double s13_a13)
double GenPosition(bool arcmode, double s12_a12, GeodesicLine::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)
void AzimuthSinCos([System::Runtime::InteropServices::Out] double% sazi1, [System::Runtime::InteropServices::Out] double% cazi1)
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)