00001 /** 00002 * \file GeodesicLineExact.hpp 00003 * \brief Header for GeographicLib::GeodesicLineExact class 00004 * 00005 * Copyright (c) Charles Karney (2012) <charles@karney.com> and licensed under 00006 * the MIT/X11 License. For more information, see 00007 * http://geographiclib.sourceforge.net/ 00008 **********************************************************************/ 00009 00010 #if !defined(GEOGRAPHICLIB_GEODESICLINEEXACT_HPP) 00011 #define GEOGRAPHICLIB_GEODESICLINEEXACT_HPP 1 00012 00013 #include <GeographicLib/Constants.hpp> 00014 #include <GeographicLib/GeodesicExact.hpp> 00015 #include <GeographicLib/EllipticFunction.hpp> 00016 00017 namespace GeographicLib { 00018 00019 /** 00020 * \brief An exact geodesic line 00021 * 00022 * GeodesicLineExact facilitates the determination of a series of points on a 00023 * single geodesic. This is a companion to the GeodesicExact class. For 00024 * additional information on this class see the documentation on the 00025 * GeodesicLine class. 00026 * 00027 * Example of use: 00028 * \include example-GeodesicLineExact.cpp 00029 * 00030 * <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility 00031 * providing access to the functionality of GeodesicExact and 00032 * GeodesicLineExact (via the -E option). 00033 **********************************************************************/ 00034 00035 class GEOGRAPHICLIB_EXPORT GeodesicLineExact { 00036 private: 00037 typedef Math::real real; 00038 friend class GeodesicExact; 00039 static const int nC4_ = GeodesicExact::nC4_; 00040 00041 real tiny_; 00042 real _lat1, _lon1, _azi1; 00043 real _a, _f, _b, _c2, _f1, _e2, _salp0, _calp0, _k2, 00044 _salp1, _calp1, _ssig1, _csig1, _dn1, _stau1, _ctau1, 00045 _somg1, _comg1, _cchi1, 00046 _A4, _B41, _E0, _D0, _H0, _E1, _D1, _H1; 00047 real _C4a[nC4_]; // all the elements of _C4a are used 00048 EllipticFunction _E; 00049 unsigned _caps; 00050 00051 enum captype { 00052 CAP_NONE = GeodesicExact::CAP_NONE, 00053 CAP_E = GeodesicExact::CAP_E, 00054 CAP_D = GeodesicExact::CAP_D, 00055 CAP_H = GeodesicExact::CAP_H, 00056 CAP_C4 = GeodesicExact::CAP_C4, 00057 CAP_ALL = GeodesicExact::CAP_ALL, 00058 OUT_ALL = GeodesicExact::OUT_ALL, 00059 }; 00060 public: 00061 00062 /** 00063 * Bit masks for what calculations to do. They signify to the 00064 * GeodesicLineExact::GeodesicLineExact constructor and to 00065 * GeodesicExact::Line what capabilities should be included in the 00066 * GeodesicLineExact object. This is merely a duplication of 00067 * GeodesicExact::mask. 00068 **********************************************************************/ 00069 enum mask { 00070 /** 00071 * No capabilities, no output. 00072 * @hideinitializer 00073 **********************************************************************/ 00074 NONE = GeodesicExact::NONE, 00075 /** 00076 * Calculate latitude \e lat2. (It's not necessary to include this as a 00077 * capability to GeodesicLineExact because this is included by default.) 00078 * @hideinitializer 00079 **********************************************************************/ 00080 LATITUDE = GeodesicExact::LATITUDE, 00081 /** 00082 * Calculate longitude \e lon2. 00083 * @hideinitializer 00084 **********************************************************************/ 00085 LONGITUDE = GeodesicExact::LONGITUDE, 00086 /** 00087 * Calculate azimuths \e azi1 and \e azi2. (It's not necessary to 00088 * include this as a capability to GeodesicLineExact because this is 00089 * included by default.) 00090 * @hideinitializer 00091 **********************************************************************/ 00092 AZIMUTH = GeodesicExact::AZIMUTH, 00093 /** 00094 * Calculate distance \e s12. 00095 * @hideinitializer 00096 **********************************************************************/ 00097 DISTANCE = GeodesicExact::DISTANCE, 00098 /** 00099 * Allow distance \e s12 to be used as input in the direct geodesic 00100 * problem. 00101 * @hideinitializer 00102 **********************************************************************/ 00103 DISTANCE_IN = GeodesicExact::DISTANCE_IN, 00104 /** 00105 * Calculate reduced length \e m12. 00106 * @hideinitializer 00107 **********************************************************************/ 00108 REDUCEDLENGTH = GeodesicExact::REDUCEDLENGTH, 00109 /** 00110 * Calculate geodesic scales \e M12 and \e M21. 00111 * @hideinitializer 00112 **********************************************************************/ 00113 GEODESICSCALE = GeodesicExact::GEODESICSCALE, 00114 /** 00115 * Calculate area \e S12. 00116 * @hideinitializer 00117 **********************************************************************/ 00118 AREA = GeodesicExact::AREA, 00119 /** 00120 * All capabilities, calculate everything. 00121 * @hideinitializer 00122 **********************************************************************/ 00123 ALL = GeodesicExact::ALL, 00124 }; 00125 00126 /** \name Constructors 00127 **********************************************************************/ 00128 ///@{ 00129 00130 /** 00131 * Constructor for a geodesic line staring at latitude \e lat1, longitude 00132 * \e lon1, and azimuth \e azi1 (all in degrees). 00133 * 00134 * @param[in] g A GeodesicExact object used to compute the necessary 00135 * information about the GeodesicLineExact. 00136 * @param[in] lat1 latitude of point 1 (degrees). 00137 * @param[in] lon1 longitude of point 1 (degrees). 00138 * @param[in] azi1 azimuth at point 1 (degrees). 00139 * @param[in] caps bitor'ed combination of GeodesicLineExact::mask values 00140 * specifying the capabilities the GeodesicLineExact object should 00141 * possess, i.e., which quantities can be returned in calls to 00142 * GeodesicLine::Position. 00143 * 00144 * \e lat1 should be in the range [−90°, 90°]; \e lon1 and \e 00145 * azi1 should be in the range [−540°, 540°). 00146 * 00147 * The GeodesicLineExact::mask values are 00148 * - \e caps |= GeodesicLineExact::LATITUDE for the latitude \e lat2; this 00149 * is added automatically; 00150 * - \e caps |= GeodesicLineExact::LONGITUDE for the latitude \e lon2; 00151 * - \e caps |= GeodesicLineExact::AZIMUTH for the latitude \e azi2; this is 00152 * added automatically; 00153 * - \e caps |= GeodesicLineExact::DISTANCE for the distance \e s12; 00154 * - \e caps |= GeodesicLineExact::REDUCEDLENGTH for the reduced length \e 00155 m12; 00156 * - \e caps |= GeodesicLineExact::GEODESICSCALE for the geodesic scales \e 00157 * M12 and \e M21; 00158 * - \e caps |= GeodesicLineExact::AREA for the area \e S12; 00159 * - \e caps |= GeodesicLineExact::DISTANCE_IN permits the length of the 00160 * geodesic to be given in terms of \e s12; without this capability the 00161 * length can only be specified in terms of arc length; 00162 * - \e caps |= GeodesicLineExact::ALL for all of the above. 00163 * . 00164 * The default value of \e caps is GeodesicLineExact::ALL. 00165 * 00166 * If the point is at a pole, the azimuth is defined by keeping \e lon1 00167 * fixed, writing \e lat1 = ±(90° − ε), and taking 00168 * the limit ε → 0+. 00169 **********************************************************************/ 00170 GeodesicLineExact(const GeodesicExact& g, real lat1, real lon1, real azi1, 00171 unsigned caps = ALL); 00172 00173 /** 00174 * A default constructor. If GeodesicLineExact::Position is called on the 00175 * resulting object, it returns immediately (without doing any 00176 * calculations). The object can be set with a call to 00177 * GeodesicExact::Line. Use Init() to test whether object is still in this 00178 * uninitialized state. 00179 **********************************************************************/ 00180 GeodesicLineExact() : _caps(0U) {} 00181 ///@} 00182 00183 /** \name Position in terms of distance 00184 **********************************************************************/ 00185 ///@{ 00186 00187 /** 00188 * Compute the position of point 2 which is a distance \e s12 (meters) 00189 * from point 1. 00190 * 00191 * @param[in] s12 distance between point 1 and point 2 (meters); it can be 00192 * signed. 00193 * @param[out] lat2 latitude of point 2 (degrees). 00194 * @param[out] lon2 longitude of point 2 (degrees); requires that the 00195 * GeodesicLineExact object was constructed with \e caps |= 00196 * GeodesicLineExact::LONGITUDE. 00197 * @param[out] azi2 (forward) azimuth at point 2 (degrees). 00198 * @param[out] m12 reduced length of geodesic (meters); requires that the 00199 * GeodesicLineExact object was constructed with \e caps |= 00200 * GeodesicLineExact::REDUCEDLENGTH. 00201 * @param[out] M12 geodesic scale of point 2 relative to point 1 00202 * (dimensionless); requires that the GeodesicLineExact object was 00203 * constructed with \e caps |= GeodesicLineExact::GEODESICSCALE. 00204 * @param[out] M21 geodesic scale of point 1 relative to point 2 00205 * (dimensionless); requires that the GeodesicLineExact object was 00206 * constructed with \e caps |= GeodesicLineExact::GEODESICSCALE. 00207 * @param[out] S12 area under the geodesic (meters<sup>2</sup>); requires 00208 * that the GeodesicLineExact object was constructed with \e caps |= 00209 * GeodesicLineExact::AREA. 00210 * @return \e a12 arc length of between point 1 and point 2 (degrees). 00211 * 00212 * The values of \e lon2 and \e azi2 returned are in the range 00213 * [−180°, 180°). 00214 * 00215 * The GeodesicLineExact object \e must have been constructed with \e caps 00216 * |= GeodesicLineExact::DISTANCE_IN; otherwise Math::NaN() is returned and 00217 * no parameters are set. Requesting a value which the GeodesicLineExact 00218 * object is not capable of computing is not an error; the corresponding 00219 * argument will not be altered. 00220 * 00221 * The following functions are overloaded versions of 00222 * GeodesicLineExact::Position which omit some of the output parameters. 00223 * Note, however, that the arc length is always computed and returned as 00224 * the function value. 00225 **********************************************************************/ 00226 Math::real Position(real s12, 00227 real& lat2, real& lon2, real& azi2, 00228 real& m12, real& M12, real& M21, 00229 real& S12) const { 00230 real t; 00231 return GenPosition(false, s12, 00232 LATITUDE | LONGITUDE | AZIMUTH | 00233 REDUCEDLENGTH | GEODESICSCALE | AREA, 00234 lat2, lon2, azi2, t, m12, M12, M21, S12); 00235 } 00236 00237 /** 00238 * See the documentation for GeodesicLineExact::Position. 00239 **********************************************************************/ 00240 Math::real Position(real s12, real& lat2, real& lon2) const { 00241 real t; 00242 return GenPosition(false, s12, 00243 LATITUDE | LONGITUDE, 00244 lat2, lon2, t, t, t, t, t, t); 00245 } 00246 00247 /** 00248 * See the documentation for GeodesicLineExact::Position. 00249 **********************************************************************/ 00250 Math::real Position(real s12, real& lat2, real& lon2, 00251 real& azi2) const { 00252 real t; 00253 return GenPosition(false, s12, 00254 LATITUDE | LONGITUDE | AZIMUTH, 00255 lat2, lon2, azi2, t, t, t, t, t); 00256 } 00257 00258 /** 00259 * See the documentation for GeodesicLineExact::Position. 00260 **********************************************************************/ 00261 Math::real Position(real s12, real& lat2, real& lon2, 00262 real& azi2, real& m12) const { 00263 real t; 00264 return GenPosition(false, s12, 00265 LATITUDE | LONGITUDE | 00266 AZIMUTH | REDUCEDLENGTH, 00267 lat2, lon2, azi2, t, m12, t, t, t); 00268 } 00269 00270 /** 00271 * See the documentation for GeodesicLineExact::Position. 00272 **********************************************************************/ 00273 Math::real Position(real s12, real& lat2, real& lon2, 00274 real& azi2, real& M12, real& M21) 00275 const { 00276 real t; 00277 return GenPosition(false, s12, 00278 LATITUDE | LONGITUDE | 00279 AZIMUTH | GEODESICSCALE, 00280 lat2, lon2, azi2, t, t, M12, M21, t); 00281 } 00282 00283 /** 00284 * See the documentation for GeodesicLineExact::Position. 00285 **********************************************************************/ 00286 Math::real Position(real s12, 00287 real& lat2, real& lon2, real& azi2, 00288 real& m12, real& M12, real& M21) 00289 const { 00290 real t; 00291 return GenPosition(false, s12, 00292 LATITUDE | LONGITUDE | AZIMUTH | 00293 REDUCEDLENGTH | GEODESICSCALE, 00294 lat2, lon2, azi2, t, m12, M12, M21, t); 00295 } 00296 00297 ///@} 00298 00299 /** \name Position in terms of arc length 00300 **********************************************************************/ 00301 ///@{ 00302 00303 /** 00304 * Compute the position of point 2 which is an arc length \e a12 (degrees) 00305 * from point 1. 00306 * 00307 * @param[in] a12 arc length between point 1 and point 2 (degrees); it can 00308 * be signed. 00309 * @param[out] lat2 latitude of point 2 (degrees). 00310 * @param[out] lon2 longitude of point 2 (degrees); requires that the 00311 * GeodesicLineExact object was constructed with \e caps |= 00312 * GeodesicLineExact::LONGITUDE. 00313 * @param[out] azi2 (forward) azimuth at point 2 (degrees). 00314 * @param[out] s12 distance between point 1 and point 2 (meters); requires 00315 * that the GeodesicLineExact object was constructed with \e caps |= 00316 * GeodesicLineExact::DISTANCE. 00317 * @param[out] m12 reduced length of geodesic (meters); requires that the 00318 * GeodesicLineExact object was constructed with \e caps |= 00319 * GeodesicLineExact::REDUCEDLENGTH. 00320 * @param[out] M12 geodesic scale of point 2 relative to point 1 00321 * (dimensionless); requires that the GeodesicLineExact object was 00322 * constructed with \e caps |= GeodesicLineExact::GEODESICSCALE. 00323 * @param[out] M21 geodesic scale of point 1 relative to point 2 00324 * (dimensionless); requires that the GeodesicLineExact object was 00325 * constructed with \e caps |= GeodesicLineExact::GEODESICSCALE. 00326 * @param[out] S12 area under the geodesic (meters<sup>2</sup>); requires 00327 * that the GeodesicLineExact object was constructed with \e caps |= 00328 * GeodesicLineExact::AREA. 00329 * 00330 * The values of \e lon2 and \e azi2 returned are in the range 00331 * [−180°, 180°). 00332 * 00333 * Requesting a value which the GeodesicLineExact object is not capable of 00334 * computing is not an error; the corresponding argument will not be 00335 * altered. 00336 * 00337 * The following functions are overloaded versions of 00338 * GeodesicLineExact::ArcPosition which omit some of the output parameters. 00339 **********************************************************************/ 00340 void ArcPosition(real a12, real& lat2, real& lon2, real& azi2, 00341 real& s12, real& m12, real& M12, real& M21, 00342 real& S12) const { 00343 GenPosition(true, a12, 00344 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE | 00345 REDUCEDLENGTH | GEODESICSCALE | AREA, 00346 lat2, lon2, azi2, s12, m12, M12, M21, S12); 00347 } 00348 00349 /** 00350 * See the documentation for GeodesicLineExact::ArcPosition. 00351 **********************************************************************/ 00352 void ArcPosition(real a12, real& lat2, real& lon2) 00353 const { 00354 real t; 00355 GenPosition(true, a12, 00356 LATITUDE | LONGITUDE, 00357 lat2, lon2, t, t, t, t, t, t); 00358 } 00359 00360 /** 00361 * See the documentation for GeodesicLineExact::ArcPosition. 00362 **********************************************************************/ 00363 void ArcPosition(real a12, 00364 real& lat2, real& lon2, real& azi2) 00365 const { 00366 real t; 00367 GenPosition(true, a12, 00368 LATITUDE | LONGITUDE | AZIMUTH, 00369 lat2, lon2, azi2, t, t, t, t, t); 00370 } 00371 00372 /** 00373 * See the documentation for GeodesicLineExact::ArcPosition. 00374 **********************************************************************/ 00375 void ArcPosition(real a12, real& lat2, real& lon2, real& azi2, 00376 real& s12) const { 00377 real t; 00378 GenPosition(true, a12, 00379 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE, 00380 lat2, lon2, azi2, s12, t, t, t, t); 00381 } 00382 00383 /** 00384 * See the documentation for GeodesicLineExact::ArcPosition. 00385 **********************************************************************/ 00386 void ArcPosition(real a12, real& lat2, real& lon2, real& azi2, 00387 real& s12, real& m12) const { 00388 real t; 00389 GenPosition(true, a12, 00390 LATITUDE | LONGITUDE | AZIMUTH | 00391 DISTANCE | REDUCEDLENGTH, 00392 lat2, lon2, azi2, s12, m12, t, t, t); 00393 } 00394 00395 /** 00396 * See the documentation for GeodesicLineExact::ArcPosition. 00397 **********************************************************************/ 00398 void ArcPosition(real a12, real& lat2, real& lon2, real& azi2, 00399 real& s12, real& M12, real& M21) 00400 const { 00401 real t; 00402 GenPosition(true, a12, 00403 LATITUDE | LONGITUDE | AZIMUTH | 00404 DISTANCE | GEODESICSCALE, 00405 lat2, lon2, azi2, s12, t, M12, M21, t); 00406 } 00407 00408 /** 00409 * See the documentation for GeodesicLineExact::ArcPosition. 00410 **********************************************************************/ 00411 void ArcPosition(real a12, real& lat2, real& lon2, real& azi2, 00412 real& s12, real& m12, real& M12, real& M21) 00413 const { 00414 real t; 00415 GenPosition(true, a12, 00416 LATITUDE | LONGITUDE | AZIMUTH | 00417 DISTANCE | REDUCEDLENGTH | GEODESICSCALE, 00418 lat2, lon2, azi2, s12, m12, M12, M21, t); 00419 } 00420 ///@} 00421 00422 /** \name The general position function. 00423 **********************************************************************/ 00424 ///@{ 00425 00426 /** 00427 * The general position function. GeodesicLineExact::Position and 00428 * GeodesicLineExact::ArcPosition are defined in terms of this function. 00429 * 00430 * @param[in] arcmode boolean flag determining the meaning of the second 00431 * parameter; if arcmode is false, then the GeodesicLineExact object must 00432 * have been constructed with \e caps |= GeodesicLineExact::DISTANCE_IN. 00433 * @param[in] s12_a12 if \e arcmode is false, this is the distance between 00434 * point 1 and point 2 (meters); otherwise it is the arc length between 00435 * point 1 and point 2 (degrees); it can be signed. 00436 * @param[in] outmask a bitor'ed combination of GeodesicLineExact::mask 00437 * values specifying which of the following parameters should be set. 00438 * @param[out] lat2 latitude of point 2 (degrees). 00439 * @param[out] lon2 longitude of point 2 (degrees); requires that the 00440 * GeodesicLineExact object was constructed with \e caps |= 00441 * GeodesicLineExact::LONGITUDE. 00442 * @param[out] azi2 (forward) azimuth at point 2 (degrees). 00443 * @param[out] s12 distance between point 1 and point 2 (meters); requires 00444 * that the GeodesicLineExact object was constructed with \e caps |= 00445 * GeodesicLineExact::DISTANCE. 00446 * @param[out] m12 reduced length of geodesic (meters); requires that the 00447 * GeodesicLineExact object was constructed with \e caps |= 00448 * GeodesicLineExact::REDUCEDLENGTH. 00449 * @param[out] M12 geodesic scale of point 2 relative to point 1 00450 * (dimensionless); requires that the GeodesicLineExact object was 00451 * constructed with \e caps |= GeodesicLineExact::GEODESICSCALE. 00452 * @param[out] M21 geodesic scale of point 1 relative to point 2 00453 * (dimensionless); requires that the GeodesicLineExact object was 00454 * constructed with \e caps |= GeodesicLineExact::GEODESICSCALE. 00455 * @param[out] S12 area under the geodesic (meters<sup>2</sup>); requires 00456 * that the GeodesicLineExact object was constructed with \e caps |= 00457 * GeodesicLineExact::AREA. 00458 * @return \e a12 arc length of between point 1 and point 2 (degrees). 00459 * 00460 * The GeodesicLineExact::mask values possible for \e outmask are 00461 * - \e outmask |= GeodesicLineExact::LATITUDE for the latitude \e lat2; 00462 * - \e outmask |= GeodesicLineExact::LONGITUDE for the latitude \e lon2; 00463 * - \e outmask |= GeodesicLineExact::AZIMUTH for the latitude \e azi2; 00464 * - \e outmask |= GeodesicLineExact::DISTANCE for the distance \e s12; 00465 * - \e outmask |= GeodesicLineExact::REDUCEDLENGTH for the reduced length 00466 * \e m12; 00467 * - \e outmask |= GeodesicLineExact::GEODESICSCALE for the geodesic scales 00468 * \e M12 and \e M21; 00469 * - \e outmask |= GeodesicLineExact::AREA for the area \e S12; 00470 * - \e outmask |= GeodesicLine::ALL for all of the above. 00471 * . 00472 * Requesting a value which the GeodesicLineExact object is not capable of 00473 * computing is not an error; the corresponding argument will not be 00474 * altered. Note, however, that the arc length is always computed and 00475 * returned as the function value. 00476 **********************************************************************/ 00477 Math::real GenPosition(bool arcmode, real s12_a12, unsigned outmask, 00478 real& lat2, real& lon2, real& azi2, 00479 real& s12, real& m12, real& M12, real& M21, 00480 real& S12) const; 00481 00482 ///@} 00483 00484 /** \name Inspector functions 00485 **********************************************************************/ 00486 ///@{ 00487 00488 /** 00489 * @return true if the object has been initialized. 00490 **********************************************************************/ 00491 bool Init() const { return _caps != 0U; } 00492 00493 /** 00494 * @return \e lat1 the latitude of point 1 (degrees). 00495 **********************************************************************/ 00496 Math::real Latitude() const 00497 { return Init() ? _lat1 : Math::NaN(); } 00498 00499 /** 00500 * @return \e lon1 the longitude of point 1 (degrees). 00501 **********************************************************************/ 00502 Math::real Longitude() const 00503 { return Init() ? _lon1 : Math::NaN(); } 00504 00505 /** 00506 * @return \e azi1 the azimuth (degrees) of the geodesic line at point 1. 00507 **********************************************************************/ 00508 Math::real Azimuth() const 00509 { return Init() ? _azi1 : Math::NaN(); } 00510 00511 /** 00512 * @return \e azi0 the azimuth (degrees) of the geodesic line as it crosses 00513 * the equator in a northward direction. 00514 **********************************************************************/ 00515 Math::real EquatorialAzimuth() const { 00516 using std::atan2; 00517 return Init() ? 00518 atan2(_salp0, _calp0) / Math::degree() : Math::NaN(); 00519 } 00520 00521 /** 00522 * @return \e a1 the arc length (degrees) between the northward equatorial 00523 * crossing and point 1. 00524 **********************************************************************/ 00525 Math::real EquatorialArc() const { 00526 using std::atan2; 00527 return Init() ? 00528 atan2(_ssig1, _csig1) / Math::degree() : Math::NaN(); 00529 } 00530 00531 /** 00532 * @return \e a the equatorial radius of the ellipsoid (meters). This is 00533 * the value inherited from the GeodesicExact object used in the 00534 * constructor. 00535 **********************************************************************/ 00536 Math::real MajorRadius() const 00537 { return Init() ? _a : Math::NaN(); } 00538 00539 /** 00540 * @return \e f the flattening of the ellipsoid. This is the value 00541 * inherited from the GeodesicExact object used in the constructor. 00542 **********************************************************************/ 00543 Math::real Flattening() const 00544 { return Init() ? _f : Math::NaN(); } 00545 00546 /// \cond SKIP 00547 /** 00548 * <b>DEPRECATED</b> 00549 * @return \e r the inverse flattening of the ellipsoid. 00550 **********************************************************************/ 00551 Math::real InverseFlattening() const 00552 { return Init() ? 1/_f : Math::NaN(); } 00553 /// \endcond 00554 00555 /** 00556 * @return \e caps the computational capabilities that this object was 00557 * constructed with. LATITUDE and AZIMUTH are always included. 00558 **********************************************************************/ 00559 unsigned Capabilities() const { return _caps; } 00560 00561 /** 00562 * @param[in] testcaps a set of bitor'ed GeodesicLineExact::mask values. 00563 * @return true if the GeodesicLineExact object has all these capabilities. 00564 **********************************************************************/ 00565 bool Capabilities(unsigned testcaps) const { 00566 testcaps &= OUT_ALL; 00567 return (_caps & testcaps) == testcaps; 00568 } 00569 ///@} 00570 00571 }; 00572 00573 } // namespace GeographicLib 00574 00575 #endif // GEOGRAPHICLIB_GEODESICLINEEXACT_HPP