00001 #pragma once 00002 /** 00003 * \file NETGeographicLib/GeodesicExact.h 00004 * \brief Header for NETGeographicLib::GeodesicExact class 00005 * 00006 * NETGeographicLib is copyright (c) Scott Heiman (2013) 00007 * GeographicLib is Copyright (c) Charles Karney (2010-2012) 00008 * <charles@karney.com> and licensed under the MIT/X11 License. 00009 * For more information, see 00010 * http://geographiclib.sourceforge.net/ 00011 **********************************************************************/ 00012 #include "NETGeographicLib.h" 00013 00014 namespace NETGeographicLib 00015 { 00016 ref class GeodesicLineExact; 00017 /*! 00018 \brief .NET wrapper for GeographicLib::GeodesicExact. 00019 00020 This class allows .NET applications to access GeographicLib::GeodesicExact. 00021 */ 00022 /** 00023 * \brief .NET wrapper for GeographicLib::GeodesicExact. 00024 * 00025 * This class allows .NET applications to access GeographicLib::GeodesicExact. 00026 * 00027 * The equations for geodesics on an ellipsoid can be expressed in terms of 00028 * incomplete elliptic integrals. The Geodesic class expands these integrals 00029 * in a series in the flattening \e f and this provides an accurate solution 00030 * for \e f &isin [-0.01, 0.01]. The GeodesicExact class computes the 00031 * ellitpic integrals directly and so provides a solution which is valid for 00032 * all \e f. However, in practice, its use should be limited to about \e 00033 * b/\e a ∈ [0.01, 100] or \e f ∈ [-99, 0.99]. 00034 * 00035 * For the WGS84 ellipsoid, these classes are 2--3 times \e slower than the 00036 * series solution and 2--3 times \e less \e accurate (because it's less easy 00037 * to control round-off errors with the elliptic integral formulation); i.e., 00038 * the error is about 40 nm (40 nanometers) instead of 15 nm. However the 00039 * error in the series solution scales as <i>f</i><sup>7</sup> while the 00040 * error in the elliptic integral solution depends weakly on \e f. If the 00041 * quarter meridian distance is 10000 km and the ratio \e b/\e a = 1 − 00042 * \e f is varied then the approximate maximum error (expressed as a 00043 * distance) is <pre> 00044 * 1 - f error (nm) 00045 * 1/128 387 00046 * 1/64 345 00047 * 1/32 269 00048 * 1/16 210 00049 * 1/8 115 00050 * 1/4 69 00051 * 1/2 36 00052 * 1 15 00053 * 2 25 00054 * 4 96 00055 * 8 318 00056 * 16 985 00057 * 32 2352 00058 * 64 6008 00059 * 128 19024 00060 * </pre> 00061 * 00062 * The computation of the area in these classes is via a 30th order series. 00063 * This gives accurate results for \e b/\e a ∈ [1/2, 2]; the accuracy is 00064 * about 8 decimal digits for \e b/\e a ∈ [1/4, 4]. 00065 * 00066 * See \ref geodellip for the formulation. See the documentation on the 00067 * Geodesic class for additional information on the geodesics problems. 00068 * 00069 * C# Example: 00070 * \include example-GeodesicExact.cs 00071 * Managed C++ Example: 00072 * \include example-GeodesicExact.cpp 00073 * Visual Basic Example: 00074 * \include example-GeodesicExact.vb 00075 * 00076 * <B>INTERFACE DIFFERENCES:</B><BR> 00077 * A default constructor is provided that assumes WGS84 parameters. 00078 * 00079 * The MajorRadius, Flattening, and EllipsoidArea functions are 00080 * implemented as properties. 00081 * 00082 * The GenDirect, GenInverse, and Line functions accept the 00083 * "capabilities mask" as a NETGeographicLib::Mask rather than an 00084 * unsigned. 00085 **********************************************************************/ 00086 public ref class GeodesicExact 00087 { 00088 private: 00089 // pointer to the unmanaged GeographicLib::GeodesicExact. 00090 const GeographicLib::GeodesicExact* m_pGeodesicExact; 00091 00092 // the finalizer deletes the unmanaged memory. 00093 !GeodesicExact(); 00094 public: 00095 /** \name Constructor 00096 **********************************************************************/ 00097 ///@{ 00098 /** 00099 * Constructor for a WGS84 ellipsoid 00100 **********************************************************************/ 00101 GeodesicExact(); 00102 00103 /** 00104 * Constructor for a ellipsoid with 00105 * 00106 * @param[in] a equatorial radius (meters). 00107 * @param[in] f flattening of ellipsoid. Setting \e f = 0 gives a sphere. 00108 * Negative \e f gives a prolate ellipsoid. If \e f > 1, set flattening 00109 * to 1/\e f. 00110 * @exception GeographicErr if \e a or (1 − \e f ) \e a is not 00111 * positive. 00112 **********************************************************************/ 00113 GeodesicExact(double a, double f); 00114 ///@} 00115 00116 /** 00117 * The desstructor calls the finalizer. 00118 **********************************************************************/ 00119 ~GeodesicExact() 00120 { this->!GeodesicExact(); } 00121 00122 /** \name Direct geodesic problem specified in terms of distance. 00123 **********************************************************************/ 00124 ///@{ 00125 /** 00126 * Perform the direct geodesic calculation where the length of the geodesic 00127 * is specified in terms of distance. 00128 * 00129 * @param[in] lat1 latitude of point 1 (degrees). 00130 * @param[in] lon1 longitude of point 1 (degrees). 00131 * @param[in] azi1 azimuth at point 1 (degrees). 00132 * @param[in] s12 distance between point 1 and point 2 (meters); it can be 00133 * signed. 00134 * @param[out] lat2 latitude of point 2 (degrees). 00135 * @param[out] lon2 longitude of point 2 (degrees). 00136 * @param[out] azi2 (forward) azimuth at point 2 (degrees). 00137 * @param[out] m12 reduced length of geodesic (meters). 00138 * @param[out] M12 geodesic scale of point 2 relative to point 1 00139 * (dimensionless). 00140 * @param[out] M21 geodesic scale of point 1 relative to point 2 00141 * (dimensionless). 00142 * @param[out] S12 area under the geodesic (meters<sup>2</sup>). 00143 * @return \e a12 arc length of between point 1 and point 2 (degrees). 00144 * 00145 * \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e 00146 * azi1 should be in the range [−540°, 540°). The values of 00147 * \e lon2 and \e azi2 returned are in the range [−180°, 00148 * 180°). 00149 * 00150 * If either point is at a pole, the azimuth is defined by keeping the 00151 * longitude fixed, writing \e lat = ±(90° − ε), 00152 * and taking the limit ε → 0+. An arc length greater that 00153 * 180° signifies a geodesic which is not a shortest path. (For a 00154 * prolate ellipsoid, an additional condition is necessary for a shortest 00155 * path: the longitudinal extent must not exceed of 180°.) 00156 * 00157 * The following functions are overloaded versions of GeodesicExact::Direct 00158 * which omit some of the output parameters. Note, however, that the arc 00159 * length is always computed and returned as the function value. 00160 **********************************************************************/ 00161 double Direct(double lat1, double lon1, double azi1, double s12, 00162 [System::Runtime::InteropServices::Out] double% lat2, 00163 [System::Runtime::InteropServices::Out] double% lon2, 00164 [System::Runtime::InteropServices::Out] double% azi2, 00165 [System::Runtime::InteropServices::Out] double% m12, 00166 [System::Runtime::InteropServices::Out] double% M12, 00167 [System::Runtime::InteropServices::Out] double% M21, 00168 [System::Runtime::InteropServices::Out] double% S12); 00169 00170 /** 00171 * See the documentation for GeodesicExact::Direct. 00172 **********************************************************************/ 00173 double Direct(double lat1, double lon1, double azi1, double s12, 00174 [System::Runtime::InteropServices::Out] double% lat2, 00175 [System::Runtime::InteropServices::Out] double% lon2); 00176 00177 /** 00178 * See the documentation for GeodesicExact::Direct. 00179 **********************************************************************/ 00180 double Direct(double lat1, double lon1, double azi1, double s12, 00181 [System::Runtime::InteropServices::Out] double% lat2, 00182 [System::Runtime::InteropServices::Out] double% lon2, 00183 [System::Runtime::InteropServices::Out] double% azi2); 00184 00185 /** 00186 * See the documentation for GeodesicExact::Direct. 00187 **********************************************************************/ 00188 double Direct(double lat1, double lon1, double azi1, double s12, 00189 [System::Runtime::InteropServices::Out] double% lat2, 00190 [System::Runtime::InteropServices::Out] double% lon2, 00191 [System::Runtime::InteropServices::Out] double% azi2, 00192 [System::Runtime::InteropServices::Out] double% m12); 00193 00194 /** 00195 * See the documentation for GeodesicExact::Direct. 00196 **********************************************************************/ 00197 double Direct(double lat1, double lon1, double azi1, double s12, 00198 [System::Runtime::InteropServices::Out] double% lat2, 00199 [System::Runtime::InteropServices::Out] double% lon2, 00200 [System::Runtime::InteropServices::Out] double% azi2, 00201 [System::Runtime::InteropServices::Out] double% M12, 00202 [System::Runtime::InteropServices::Out] double% M21); 00203 00204 /** 00205 * See the documentation for GeodesicExact::Direct. 00206 **********************************************************************/ 00207 double Direct(double lat1, double lon1, double azi1, double s12, 00208 [System::Runtime::InteropServices::Out] double% lat2, 00209 [System::Runtime::InteropServices::Out] double% lon2, 00210 [System::Runtime::InteropServices::Out] double% azi2, 00211 [System::Runtime::InteropServices::Out] double% m12, 00212 [System::Runtime::InteropServices::Out] double% M12, 00213 [System::Runtime::InteropServices::Out] double% M21); 00214 ///@} 00215 00216 /** \name Direct geodesic problem specified in terms of arc length. 00217 **********************************************************************/ 00218 ///@{ 00219 /** 00220 * Perform the direct geodesic calculation where the length of the geodesic 00221 * is specified in terms of arc length. 00222 * 00223 * @param[in] lat1 latitude of point 1 (degrees). 00224 * @param[in] lon1 longitude of point 1 (degrees). 00225 * @param[in] azi1 azimuth at point 1 (degrees). 00226 * @param[in] a12 arc length between point 1 and point 2 (degrees); it can 00227 * be signed. 00228 * @param[out] lat2 latitude of point 2 (degrees). 00229 * @param[out] lon2 longitude of point 2 (degrees). 00230 * @param[out] azi2 (forward) azimuth at point 2 (degrees). 00231 * @param[out] s12 distance between point 1 and point 2 (meters). 00232 * @param[out] m12 reduced length of geodesic (meters). 00233 * @param[out] M12 geodesic scale of point 2 relative to point 1 00234 * (dimensionless). 00235 * @param[out] M21 geodesic scale of point 1 relative to point 2 00236 * (dimensionless). 00237 * @param[out] S12 area under the geodesic (meters<sup>2</sup>). 00238 * 00239 * \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e 00240 * azi1 should be in the range [−540°, 540°). The values of 00241 * \e lon2 and \e azi2 returned are in the range [−180°, 00242 * 180°). 00243 * 00244 * If either point is at a pole, the azimuth is defined by keeping the 00245 * longitude fixed, writing \e lat = ±(90° − ε), 00246 * and taking the limit ε → 0+. An arc length greater that 00247 * 180° signifies a geodesic which is not a shortest path. (For a 00248 * prolate ellipsoid, an additional condition is necessary for a shortest 00249 * path: the longitudinal extent must not exceed of 180°.) 00250 * 00251 * The following functions are overloaded versions of GeodesicExact::Direct 00252 * which omit some of the output parameters. 00253 **********************************************************************/ 00254 void ArcDirect(double lat1, double lon1, double azi1, double a12, 00255 [System::Runtime::InteropServices::Out] double% lat2, 00256 [System::Runtime::InteropServices::Out] double% lon2, 00257 [System::Runtime::InteropServices::Out] double% azi2, 00258 [System::Runtime::InteropServices::Out] double% s12, 00259 [System::Runtime::InteropServices::Out] double% m12, 00260 [System::Runtime::InteropServices::Out] double% M12, 00261 [System::Runtime::InteropServices::Out] double% M21, 00262 [System::Runtime::InteropServices::Out] double% S12); 00263 00264 /** 00265 * See the documentation for GeodesicExact::ArcDirect. 00266 **********************************************************************/ 00267 void ArcDirect(double lat1, double lon1, double azi1, double a12, 00268 [System::Runtime::InteropServices::Out] double% lat2, 00269 [System::Runtime::InteropServices::Out] double% lon2); 00270 00271 /** 00272 * See the documentation for GeodesicExact::ArcDirect. 00273 **********************************************************************/ 00274 void ArcDirect(double lat1, double lon1, double azi1, double a12, 00275 [System::Runtime::InteropServices::Out] double% lat2, 00276 [System::Runtime::InteropServices::Out] double% lon2, 00277 [System::Runtime::InteropServices::Out] double% azi2); 00278 00279 /** 00280 * See the documentation for GeodesicExact::ArcDirect. 00281 **********************************************************************/ 00282 void ArcDirect(double lat1, double lon1, double azi1, double a12, 00283 [System::Runtime::InteropServices::Out] double% lat2, 00284 [System::Runtime::InteropServices::Out] double% lon2, 00285 [System::Runtime::InteropServices::Out] double% azi2, 00286 [System::Runtime::InteropServices::Out] double% s12); 00287 00288 /** 00289 * See the documentation for GeodesicExact::ArcDirect. 00290 **********************************************************************/ 00291 void ArcDirect(double lat1, double lon1, double azi1, double a12, 00292 [System::Runtime::InteropServices::Out] double% lat2, 00293 [System::Runtime::InteropServices::Out] double% lon2, 00294 [System::Runtime::InteropServices::Out] double% azi2, 00295 [System::Runtime::InteropServices::Out] double% s12, 00296 [System::Runtime::InteropServices::Out] double% m12); 00297 00298 /** 00299 * See the documentation for GeodesicExact::ArcDirect. 00300 **********************************************************************/ 00301 void ArcDirect(double lat1, double lon1, double azi1, double a12, 00302 [System::Runtime::InteropServices::Out] double% lat2, 00303 [System::Runtime::InteropServices::Out] double% lon2, 00304 [System::Runtime::InteropServices::Out] double% azi2, 00305 [System::Runtime::InteropServices::Out] double% s12, 00306 [System::Runtime::InteropServices::Out] double% M12, 00307 [System::Runtime::InteropServices::Out] double% M21); 00308 00309 /** 00310 * See the documentation for GeodesicExact::ArcDirect. 00311 **********************************************************************/ 00312 void ArcDirect(double lat1, double lon1, double azi1, double a12, 00313 [System::Runtime::InteropServices::Out] double% lat2, 00314 [System::Runtime::InteropServices::Out] double% lon2, 00315 [System::Runtime::InteropServices::Out] double% azi2, 00316 [System::Runtime::InteropServices::Out] double% s12, 00317 [System::Runtime::InteropServices::Out] double% m12, 00318 [System::Runtime::InteropServices::Out] double% M12, 00319 [System::Runtime::InteropServices::Out] double% M21); 00320 ///@} 00321 00322 /** \name General version of the direct geodesic solution. 00323 **********************************************************************/ 00324 ///@{ 00325 00326 /** 00327 * The general direct geodesic calculation. GeodesicExact::Direct and 00328 * GeodesicExact::ArcDirect are defined in terms of this function. 00329 * 00330 * @param[in] lat1 latitude of point 1 (degrees). 00331 * @param[in] lon1 longitude of point 1 (degrees). 00332 * @param[in] azi1 azimuth at point 1 (degrees). 00333 * @param[in] arcmode boolean flag determining the meaning of the second 00334 * parameter. 00335 * @param[in] s12_a12 if \e arcmode is false, this is the distance between 00336 * point 1 and point 2 (meters); otherwise it is the arc length between 00337 * point 1 and point 2 (degrees); it can be signed. 00338 * @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask values 00339 * specifying which of the following parameters should be set. 00340 * @param[out] lat2 latitude of point 2 (degrees). 00341 * @param[out] lon2 longitude of point 2 (degrees). 00342 * @param[out] azi2 (forward) azimuth at point 2 (degrees). 00343 * @param[out] s12 distance between point 1 and point 2 (meters). 00344 * @param[out] m12 reduced length of geodesic (meters). 00345 * @param[out] M12 geodesic scale of point 2 relative to point 1 00346 * (dimensionless). 00347 * @param[out] M21 geodesic scale of point 1 relative to point 2 00348 * (dimensionless). 00349 * @param[out] S12 area under the geodesic (meters<sup>2</sup>). 00350 * @return \e a12 arc length of between point 1 and point 2 (degrees). 00351 * 00352 * The NETGeographicLib::Mask values possible for \e outmask are 00353 * - \e outmask |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2; 00354 * - \e outmask |= NETGeographicLib::Mask::LONGITUDE for the latitude \e lon2; 00355 * - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2; 00356 * - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12; 00357 * - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e 00358 * m12; 00359 * - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e 00360 * M12 and \e M21; 00361 * - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12; 00362 * - \e outmask |= NETGeographicLib::Mask::ALL for all of the above. 00363 * . 00364 * The function value \e a12 is always computed and returned and this 00365 * equals \e s12_a12 is \e arcmode is true. If \e outmask includes 00366 * GeodesicExact::DISTANCE and \e arcmode is false, then \e s12 = \e 00367 * s12_a12. It is not necessary to include NETGeographicLib::Mask::DISTANCE_IN in 00368 * \e outmask; this is automatically included is \e arcmode is false. 00369 **********************************************************************/ 00370 double GenDirect(double lat1, double lon1, double azi1, 00371 bool arcmode, double s12_a12, NETGeographicLib::Mask outmask, 00372 [System::Runtime::InteropServices::Out] double% lat2, 00373 [System::Runtime::InteropServices::Out] double% lon2, 00374 [System::Runtime::InteropServices::Out] double% azi2, 00375 [System::Runtime::InteropServices::Out] double% s12, 00376 [System::Runtime::InteropServices::Out] double% m12, 00377 [System::Runtime::InteropServices::Out] double% M12, 00378 [System::Runtime::InteropServices::Out] double% M21, 00379 [System::Runtime::InteropServices::Out] double% S12); 00380 ///@} 00381 00382 /** \name Inverse geodesic problem. 00383 **********************************************************************/ 00384 ///@{ 00385 /** 00386 * Perform the inverse geodesic calculation. 00387 * 00388 * @param[in] lat1 latitude of point 1 (degrees). 00389 * @param[in] lon1 longitude of point 1 (degrees). 00390 * @param[in] lat2 latitude of point 2 (degrees). 00391 * @param[in] lon2 longitude of point 2 (degrees). 00392 * @param[out] s12 distance between point 1 and point 2 (meters). 00393 * @param[out] azi1 azimuth at point 1 (degrees). 00394 * @param[out] azi2 (forward) azimuth at point 2 (degrees). 00395 * @param[out] m12 reduced length of geodesic (meters). 00396 * @param[out] M12 geodesic scale of point 2 relative to point 1 00397 * (dimensionless). 00398 * @param[out] M21 geodesic scale of point 1 relative to point 2 00399 * (dimensionless). 00400 * @param[out] S12 area under the geodesic (meters<sup>2</sup>). 00401 * @return \e a12 arc length of between point 1 and point 2 (degrees). 00402 * 00403 * \e lat1 and \e lat2 should be in the range [−90°, 90°]; \e 00404 * lon1 and \e lon2 should be in the range [−540°, 540°). 00405 * The values of \e azi1 and \e azi2 returned are in the range 00406 * [−180°, 180°). 00407 * 00408 * If either point is at a pole, the azimuth is defined by keeping the 00409 * longitude fixed, writing \e lat = ±(90° − ε), 00410 * and taking the limit ε → 0+. 00411 * 00412 * The following functions are overloaded versions of GeodesicExact::Inverse 00413 * which omit some of the output parameters. Note, however, that the arc 00414 * length is always computed and returned as the function value. 00415 **********************************************************************/ 00416 double Inverse(double lat1, double lon1, double lat2, double lon2, 00417 [System::Runtime::InteropServices::Out] double% s12, 00418 [System::Runtime::InteropServices::Out] double% azi1, 00419 [System::Runtime::InteropServices::Out] double% azi2, 00420 [System::Runtime::InteropServices::Out] double% m12, 00421 [System::Runtime::InteropServices::Out] double% M12, 00422 [System::Runtime::InteropServices::Out] double% M21, 00423 [System::Runtime::InteropServices::Out] double% S12); 00424 00425 /** 00426 * See the documentation for GeodesicExact::Inverse. 00427 **********************************************************************/ 00428 double Inverse(double lat1, double lon1, double lat2, double lon2, 00429 [System::Runtime::InteropServices::Out] double% s12); 00430 00431 /** 00432 * See the documentation for GeodesicExact::Inverse. 00433 **********************************************************************/ 00434 double Inverse(double lat1, double lon1, double lat2, double lon2, 00435 [System::Runtime::InteropServices::Out] double% azi1, 00436 [System::Runtime::InteropServices::Out] double% azi2); 00437 00438 /** 00439 * See the documentation for GeodesicExact::Inverse. 00440 **********************************************************************/ 00441 double Inverse(double lat1, double lon1, double lat2, double lon2, 00442 [System::Runtime::InteropServices::Out] double% s12, 00443 [System::Runtime::InteropServices::Out] double% azi1, 00444 [System::Runtime::InteropServices::Out] double% azi2); 00445 00446 /** 00447 * See the documentation for GeodesicExact::Inverse. 00448 **********************************************************************/ 00449 double Inverse(double lat1, double lon1, double lat2, double lon2, 00450 [System::Runtime::InteropServices::Out] double% s12, 00451 [System::Runtime::InteropServices::Out] double% azi1, 00452 [System::Runtime::InteropServices::Out] double% azi2, 00453 [System::Runtime::InteropServices::Out] double% m12); 00454 00455 /** 00456 * See the documentation for GeodesicExact::Inverse. 00457 **********************************************************************/ 00458 double Inverse(double lat1, double lon1, double lat2, double lon2, 00459 [System::Runtime::InteropServices::Out] double% s12, 00460 [System::Runtime::InteropServices::Out] double% azi1, 00461 [System::Runtime::InteropServices::Out] double% azi2, 00462 [System::Runtime::InteropServices::Out] double% M12, 00463 [System::Runtime::InteropServices::Out] double% M21); 00464 00465 /** 00466 * See the documentation for GeodesicExact::Inverse. 00467 **********************************************************************/ 00468 double Inverse(double lat1, double lon1, double lat2, double lon2, 00469 [System::Runtime::InteropServices::Out] double% s12, 00470 [System::Runtime::InteropServices::Out] double% azi1, 00471 [System::Runtime::InteropServices::Out] double% azi2, 00472 [System::Runtime::InteropServices::Out] double% m12, 00473 [System::Runtime::InteropServices::Out] double% M12, 00474 [System::Runtime::InteropServices::Out] double% M21); 00475 ///@} 00476 00477 /** \name General version of inverse geodesic solution. 00478 **********************************************************************/ 00479 ///@{ 00480 /** 00481 * The general inverse geodesic calculation. GeodesicExact::Inverse is 00482 * defined in terms of this function. 00483 * 00484 * @param[in] lat1 latitude of point 1 (degrees). 00485 * @param[in] lon1 longitude of point 1 (degrees). 00486 * @param[in] lat2 latitude of point 2 (degrees). 00487 * @param[in] lon2 longitude of point 2 (degrees). 00488 * @param[in] outmask a bitor'ed combination of NETGeographicLib::Mask values 00489 * specifying which of the following parameters should be set. 00490 * @param[out] s12 distance between point 1 and point 2 (meters). 00491 * @param[out] azi1 azimuth at point 1 (degrees). 00492 * @param[out] azi2 (forward) azimuth at point 2 (degrees). 00493 * @param[out] m12 reduced length of geodesic (meters). 00494 * @param[out] M12 geodesic scale of point 2 relative to point 1 00495 * (dimensionless). 00496 * @param[out] M21 geodesic scale of point 1 relative to point 2 00497 * (dimensionless). 00498 * @param[out] S12 area under the geodesic (meters<sup>2</sup>). 00499 * @return \e a12 arc length of between point 1 and point 2 (degrees). 00500 * 00501 * The NETGeographicLib::Mask values possible for \e outmask are 00502 * - \e outmask |= NETGeographicLib::Mask::DISTANCE for the distance \e s12; 00503 * - \e outmask |= NETGeographicLib::Mask::AZIMUTH for the latitude \e azi2; 00504 * - \e outmask |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e 00505 * m12; 00506 * - \e outmask |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e 00507 * M12 and \e M21; 00508 * - \e outmask |= NETGeographicLib::Mask::AREA for the area \e S12; 00509 * - \e outmask |= NETGeographicLib::Mask::ALL for all of the above. 00510 * . 00511 * The arc length is always computed and returned as the function value. 00512 **********************************************************************/ 00513 double GenInverse(double lat1, double lon1, double lat2, double lon2, 00514 NETGeographicLib::Mask outmask, 00515 [System::Runtime::InteropServices::Out] double% s12, 00516 [System::Runtime::InteropServices::Out] double% azi1, 00517 [System::Runtime::InteropServices::Out] double% azi2, 00518 [System::Runtime::InteropServices::Out] double% m12, 00519 [System::Runtime::InteropServices::Out] double% M12, 00520 [System::Runtime::InteropServices::Out] double% M21, 00521 [System::Runtime::InteropServices::Out] double% S12); 00522 ///@} 00523 00524 /** \name Interface to GeodesicLineExact. 00525 **********************************************************************/ 00526 ///@{ 00527 00528 /** 00529 * Set up to compute several points on a single geodesic. 00530 * 00531 * @param[in] lat1 latitude of point 1 (degrees). 00532 * @param[in] lon1 longitude of point 1 (degrees). 00533 * @param[in] azi1 azimuth at point 1 (degrees). 00534 * @param[in] caps bitor'ed combination of NETGeographicLib::Mask values 00535 * specifying the capabilities the GeodesicLineExact object should 00536 * possess, i.e., which quantities can be returned in calls to 00537 * GeodesicLineExact::Position. 00538 * @return a GeodesicLineExact object. 00539 * 00540 * \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e 00541 * azi1 should be in the range [−540°, 540°). 00542 * 00543 * The GeodesicExact::mask values are 00544 * - \e caps |= NETGeographicLib::Mask::LATITUDE for the latitude \e lat2; this is 00545 * added automatically; 00546 * - \e caps |= NETGeographicLib::Mask::LONGITUDE for the latitude \e lon2; 00547 * - \e caps |= NETGeographicLib::Mask::AZIMUTH for the azimuth \e azi2; this is 00548 * added automatically; 00549 * - \e caps |= NETGeographicLib::Mask::DISTANCE for the distance \e s12; 00550 * - \e caps |= NETGeographicLib::Mask::REDUCEDLENGTH for the reduced length \e m12; 00551 * - \e caps |= NETGeographicLib::Mask::GEODESICSCALE for the geodesic scales \e M12 00552 * and \e M21; 00553 * - \e caps |= NETGeographicLib::Mask::AREA for the area \e S12; 00554 * - \e caps |= NETGeographicLib::Mask::DISTANCE_IN permits the length of the 00555 * geodesic to be given in terms of \e s12; without this capability the 00556 * length can only be specified in terms of arc length; 00557 * - \e caps |= GeodesicExact::ALL for all of the above. 00558 * . 00559 * The default value of \e caps is GeodesicExact::ALL which turns on all 00560 * the capabilities. 00561 * 00562 * If the point is at a pole, the azimuth is defined by keeping \e lon1 00563 * fixed, writing \e lat1 = ±(90 − ε), and taking the 00564 * limit ε → 0+. 00565 **********************************************************************/ 00566 GeodesicLineExact^ Line(double lat1, double lon1, double azi1, 00567 NETGeographicLib::Mask caps ); 00568 00569 ///@} 00570 00571 /** \name Inspector functions. 00572 **********************************************************************/ 00573 ///@{ 00574 00575 /** 00576 * @return \e a the equatorial radius of the ellipsoid (meters). This is 00577 * the value used in the constructor. 00578 **********************************************************************/ 00579 property double MajorRadius { double get(); } 00580 00581 /** 00582 * @return \e f the flattening of the ellipsoid. This is the 00583 * value used in the constructor. 00584 **********************************************************************/ 00585 property double Flattening { double get(); } 00586 00587 /** 00588 * @return total area of ellipsoid in meters<sup>2</sup>. The area of a 00589 * polygon encircling a pole can be found by adding 00590 * GeodesicExact::EllipsoidArea()/2 to the sum of \e S12 for each side of 00591 * the polygon. 00592 **********************************************************************/ 00593 property double EllipsoidArea { double get(); } 00594 ///@} 00595 00596 /** 00597 * @return A pointer to the unmanaged GeographicLib::GeodesicExact. 00598 * 00599 * This function is for internal use only. 00600 **********************************************************************/ 00601 System::IntPtr^ GetUnmanaged(); 00602 }; 00603 } // namespace NETGeographicLib