geodesic.h
Go to the documentation of this file.
1 
118 #if !defined(GEODESIC_H)
119 #define GEODESIC_H 1
120 
125 #define GEODESIC_VERSION_MAJOR 1
126 
130 #define GEODESIC_VERSION_MINOR 49
131 
135 #define GEODESIC_VERSION_PATCH 0
136 
142 #define GEODESIC_VERSION_NUM(a,b,c) ((((a) * 10000 + (b)) * 100) + (c))
143 
155 #define GEODESIC_VERSION \
156  GEODESIC_VERSION_NUM(GEODESIC_VERSION_MAJOR, \
157  GEODESIC_VERSION_MINOR, \
158  GEODESIC_VERSION_PATCH)
159 
160 #if defined(__cplusplus)
161 extern "C" {
162 #endif
163 
168  struct geod_geodesic {
169  double a;
170  double f;
172  double f1, e2, ep2, n, b, c2, etol2;
173  double A3x[6], C3x[15], C4x[21];
175  };
176 
183  double lat1;
184  double lon1;
185  double azi1;
186  double a;
187  double f;
188  double salp1;
189  double calp1;
190  double a13;
191  double s13;
193  double b, c2, f1, salp0, calp0, k2,
194  ssig1, csig1, dn1, stau1, ctau1, somg1, comg1,
195  A1m1, A2m1, A3c, B11, B21, B31, A4, B41;
196  double C1a[6+1], C1pa[6+1], C2a[6+1], C3a[6], C4a[6];
198  unsigned caps;
199  };
200 
206  struct geod_polygon {
207  double lat;
208  double lon;
210  double lat0;
211  double lon0;
212  double A[2];
213  double P[2];
214  int polyline;
215  int crossings;
217  unsigned num;
218  };
219 
227  void geod_init(struct geod_geodesic* g, double a, double f);
228 
265  void geod_direct(const struct geod_geodesic* g,
266  double lat1, double lon1, double azi1, double s12,
267  double* plat2, double* plon2, double* pazi2);
268 
307  double geod_gendirect(const struct geod_geodesic* g,
308  double lat1, double lon1, double azi1,
309  unsigned flags, double s12_a12,
310  double* plat2, double* plon2, double* pazi2,
311  double* ps12, double* pm12, double* pM12, double* pM21,
312  double* pS12);
313 
352  void geod_inverse(const struct geod_geodesic* g,
353  double lat1, double lon1, double lat2, double lon2,
354  double* ps12, double* pazi1, double* pazi2);
355 
383  double geod_geninverse(const struct geod_geodesic* g,
384  double lat1, double lon1, double lat2, double lon2,
385  double* ps12, double* pazi1, double* pazi2,
386  double* pm12, double* pM12, double* pM21,
387  double* pS12);
388 
428  void geod_lineinit(struct geod_geodesicline* l,
429  const struct geod_geodesic* g,
430  double lat1, double lon1, double azi1, unsigned caps);
431 
453  void geod_directline(struct geod_geodesicline* l,
454  const struct geod_geodesic* g,
455  double lat1, double lon1, double azi1, double s12,
456  unsigned caps);
457 
484  const struct geod_geodesic* g,
485  double lat1, double lon1, double azi1,
486  unsigned flags, double s12_a12,
487  unsigned caps);
488 
509  void geod_inverseline(struct geod_geodesicline* l,
510  const struct geod_geodesic* g,
511  double lat1, double lon1, double lat2, double lon2,
512  unsigned caps);
513 
559  void geod_position(const struct geod_geodesicline* l, double s12,
560  double* plat2, double* plon2, double* pazi2);
561 
626  double geod_genposition(const struct geod_geodesicline* l,
627  unsigned flags, double s12_a12,
628  double* plat2, double* plon2, double* pazi2,
629  double* ps12, double* pm12,
630  double* pM12, double* pM21,
631  double* pS12);
632 
643  void geod_setdistance(struct geod_geodesicline* l, double s13);
644 
661  unsigned flags, double s13_a13);
662 
682  void geod_polygon_init(struct geod_polygon* p, int polylinep);
683 
689  void geod_polygon_clear(struct geod_polygon* p);
690 
709  void geod_polygon_addpoint(const struct geod_geodesic* g,
710  struct geod_polygon* p,
711  double lat, double lon);
712 
729  void geod_polygon_addedge(const struct geod_geodesic* g,
730  struct geod_polygon* p,
731  double azi, double s);
732 
776  unsigned geod_polygon_compute(const struct geod_geodesic* g,
777  const struct geod_polygon* p,
778  int reverse, int sign,
779  double* pA, double* pP);
780 
807  unsigned geod_polygon_testpoint(const struct geod_geodesic* g,
808  const struct geod_polygon* p,
809  double lat, double lon,
810  int reverse, int sign,
811  double* pA, double* pP);
812 
838  unsigned geod_polygon_testedge(const struct geod_geodesic* g,
839  const struct geod_polygon* p,
840  double azi, double s,
841  int reverse, int sign,
842  double* pA, double* pP);
843 
876  void geod_polygonarea(const struct geod_geodesic* g,
877  double lats[], double lons[], int n,
878  double* pA, double* pP);
879 
883  enum geod_mask {
885  GEOD_LATITUDE = 1U<<7 | 0U,
886  GEOD_LONGITUDE = 1U<<8 | 1U<<3,
887  GEOD_AZIMUTH = 1U<<9 | 0U,
888  GEOD_DISTANCE = 1U<<10 | 1U<<0,
889  GEOD_DISTANCE_IN = 1U<<11 | 1U<<0 | 1U<<1,
890  GEOD_REDUCEDLENGTH= 1U<<12 | 1U<<0 | 1U<<2,
891  GEOD_GEODESICSCALE= 1U<<13 | 1U<<0 | 1U<<2,
892  GEOD_AREA = 1U<<14 | 1U<<4,
893  GEOD_ALL = 0x7F80U| 0x1FU
894  };
895 
900  enum geod_flags {
902  GEOD_ARCMODE = 1U<<0,
904  };
905 
906 #if defined(__cplusplus)
907 }
908 #endif
909 
910 #endif
geod_geodesicline::f
double f
Definition: geodesic.h:187
geod_geodesicline::a13
double a13
Definition: geodesic.h:190
geod_inverseline
void geod_inverseline(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, unsigned caps)
geod_polygon::num
unsigned num
Definition: geodesic.h:217
geod_geodesicline::a
double a
Definition: geodesic.h:186
test_constructor::f1
auto f1
Definition: testHybridNonlinearFactor.cpp:56
geod_polygon_compute
unsigned geod_polygon_compute(const struct geod_geodesic *g, const struct geod_polygon *p, int reverse, int sign, double *pA, double *pP)
s
RealScalar s
Definition: level1_cplx_impl.h:126
geod_direct
void geod_direct(const struct geod_geodesic *g, double lat1, double lon1, double azi1, double s12, double *plat2, double *plon2, double *pazi2)
b
Scalar * b
Definition: benchVecAdd.cpp:17
GEOD_GEODESICSCALE
@ GEOD_GEODESICSCALE
Definition: geodesic.h:891
asiaCPTs::pA
ADT pA
Definition: testAlgebraicDecisionTree.cpp:153
geod_geodesic::f
double f
Definition: geodesic.h:170
GEOD_LONG_UNROLL
@ GEOD_LONG_UNROLL
Definition: geodesic.h:903
sign
const EIGEN_DEVICE_FUNC SignReturnType sign() const
Definition: ArrayCwiseUnaryOps.h:219
geod_polygon_testpoint
unsigned geod_polygon_testpoint(const struct geod_geodesic *g, const struct geod_polygon *p, double lat, double lon, int reverse, int sign, double *pA, double *pP)
GEOD_DISTANCE
@ GEOD_DISTANCE
Definition: geodesic.h:888
geod_mask
geod_mask
Definition: geodesic.h:883
GEOD_ARCMODE
@ GEOD_ARCMODE
Definition: geodesic.h:902
geod_geodesicline::lon1
double lon1
Definition: geodesic.h:184
geod_geodesic::a
double a
Definition: geodesic.h:169
GEOD_REDUCEDLENGTH
@ GEOD_REDUCEDLENGTH
Definition: geodesic.h:890
geod_polygon_addedge
void geod_polygon_addedge(const struct geod_geodesic *g, struct geod_polygon *p, double azi, double s)
geod_geodesic
Definition: geodesic.h:168
n
int n
Definition: BiCGSTAB_simple.cpp:1
geod_lineinit
void geod_lineinit(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, unsigned caps)
geod_init
void geod_init(struct geod_geodesic *g, double a, double f)
geod_setdistance
void geod_setdistance(struct geod_geodesicline *l, double s13)
A
Definition: test_numpy_dtypes.cpp:298
geod_position
void geod_position(const struct geod_geodesicline *l, double s12, double *plat2, double *plon2, double *pazi2)
example::lat0
const double lat0
Definition: testGPSFactor.cpp:41
GEOD_DISTANCE_IN
@ GEOD_DISTANCE_IN
Definition: geodesic.h:889
geod_geodesicline
Definition: geodesic.h:182
example::lon0
const double lon0
Definition: testGPSFactor.cpp:41
geod_geninverse
double geod_geninverse(const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, double *ps12, double *pazi1, double *pazi2, double *pm12, double *pM12, double *pM21, double *pS12)
geod_polygon_clear
void geod_polygon_clear(struct geod_polygon *p)
geod_polygon_addpoint
void geod_polygon_addpoint(const struct geod_geodesic *g, struct geod_polygon *p, double lat, double lon)
l
static const Line3 l(Rot3(), 1, 1)
geod_polygon::lon
double lon
Definition: geodesic.h:208
geod_gensetdistance
void geod_gensetdistance(struct geod_geodesicline *l, unsigned flags, double s13_a13)
geod_polygon::lat
double lat
Definition: geodesic.h:207
GEOD_NONE
@ GEOD_NONE
Definition: geodesic.h:884
g
void g(const string &key, int i)
Definition: testBTree.cpp:41
GEOD_AREA
@ GEOD_AREA
Definition: geodesic.h:892
GEOD_NOFLAGS
@ GEOD_NOFLAGS
Definition: geodesic.h:901
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
geod_polygon_testedge
unsigned geod_polygon_testedge(const struct geod_geodesic *g, const struct geod_polygon *p, double azi, double s, int reverse, int sign, double *pA, double *pP)
geod_directline
void geod_directline(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, double s12, unsigned caps)
geod_genposition
double geod_genposition(const struct geod_geodesicline *l, unsigned flags, double s12_a12, double *plat2, double *plon2, double *pazi2, double *ps12, double *pm12, double *pM12, double *pM21, double *pS12)
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
geod_flags
geod_flags
Definition: geodesic.h:900
geod_gendirectline
void geod_gendirectline(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, unsigned flags, double s12_a12, unsigned caps)
geod_inverse
void geod_inverse(const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, double *ps12, double *pazi1, double *pazi2)
geod_polygon_init
void geod_polygon_init(struct geod_polygon *p, int polylinep)
geod_polygonarea
void geod_polygonarea(const struct geod_geodesic *g, double lats[], double lons[], int n, double *pA, double *pP)
GEOD_ALL
@ GEOD_ALL
Definition: geodesic.h:893
p
float * p
Definition: Tutorial_Map_using.cpp:9
c2
static double c2
Definition: airy.c:55
P
static double P[]
Definition: ellpe.c:68
geod_gendirect
double geod_gendirect(const struct geod_geodesic *g, double lat1, double lon1, double azi1, unsigned flags, double s12_a12, double *plat2, double *plon2, double *pazi2, double *ps12, double *pm12, double *pM12, double *pM21, double *pS12)
U
@ U
Definition: testDecisionTree.cpp:342
reverse
void reverse(const MatrixType &m)
Definition: array_reverse.cpp:16
lon
static const double lon
Definition: testGeographicLib.cpp:34
geod_geodesicline::salp1
double salp1
Definition: geodesic.h:188
geod_polygon
Definition: geodesic.h:206
GEOD_LONGITUDE
@ GEOD_LONGITUDE
Definition: geodesic.h:886
A4
static const double A4[]
Definition: expn.h:9
geod_geodesicline::s13
double s13
Definition: geodesic.h:191
geod_geodesicline::azi1
double azi1
Definition: geodesic.h:185
geod_geodesicline::caps
unsigned caps
Definition: geodesic.h:198
geod_geodesicline::lat1
double lat1
Definition: geodesic.h:183
geod_geodesicline::calp1
double calp1
Definition: geodesic.h:189
GEOD_AZIMUTH
@ GEOD_AZIMUTH
Definition: geodesic.h:887
GEOD_LATITUDE
@ GEOD_LATITUDE
Definition: geodesic.h:885
lat
static const double lat
Definition: testGeographicLib.cpp:34


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:36