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
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)
void geod_directline(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, double s12, unsigned caps)
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)
Scalar * b
Definition: benchVecAdd.cpp:17
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)
static const double lat
int n
double lon
Definition: geodesic.h:208
void geod_polygon_addedge(const struct geod_geodesic *g, struct geod_polygon *p, double azi, double s)
unsigned num
Definition: geodesic.h:217
void geod_position(const struct geod_geodesicline *l, double s12, double *plat2, double *plon2, double *pazi2)
double f
Definition: geodesic.h:170
void geod_lineinit(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, unsigned caps)
void g(const string &key, int i)
Definition: testBTree.cpp:41
void geod_setdistance(struct geod_geodesicline *l, double s13)
unsigned caps
Definition: geodesic.h:198
static const Line3 l(Rot3(), 1, 1)
const double lat0
void geod_inverseline(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, unsigned caps)
EIGEN_DEVICE_FUNC const SignReturnType sign() const
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)
void geod_polygon_addpoint(const struct geod_geodesic *g, struct geod_polygon *p, double lat, double lon)
RealScalar s
const double lon0
void geod_polygon_clear(struct geod_polygon *p)
void geod_polygon_init(struct geod_polygon *p, int polylinep)
void geod_direct(const struct geod_geodesic *g, double lat1, double lon1, double azi1, double s12, double *plat2, double *plon2, double *pazi2)
unsigned geod_polygon_compute(const struct geod_geodesic *g, const struct geod_polygon *p, int reverse, int sign, double *pA, double *pP)
void geod_polygonarea(const struct geod_geodesic *g, double lats[], double lons[], int n, double *pA, double *pP)
void geod_gensetdistance(struct geod_geodesicline *l, unsigned flags, double s13_a13)
double a
Definition: geodesic.h:169
Point2 pA(size_t i)
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)
void reverse(const MatrixType &m)
Point2 f1(const Point3 &p, OptionalJacobian< 2, 3 > H)
geod_flags
Definition: geodesic.h:900
geod_mask
Definition: geodesic.h:883
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)
float * p
static const double lon
void geod_inverse(const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, double *ps12, double *pazi1, double *pazi2)
void geod_init(struct geod_geodesic *g, double a, double f)
double lat
Definition: geodesic.h:207


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:17