ToolMap
Loading...
Searching...
No Matches
geodesic.h
Go to the documentation of this file.
1
119#if !defined(GEODESIC_H)
120#define GEODESIC_H 1
121
126#define GEODESIC_VERSION_MAJOR 1
131#define GEODESIC_VERSION_MINOR 32
136#define GEODESIC_VERSION_PATCH 0
137
138#if defined(__cplusplus)
139extern "C" {
140#endif
141
147 double a;
148 double f;
150 double f1, e2, ep2, n, b, c2, etol2;
151 double A3x[6], C3x[15], C4x[21];
153};
154
160 double lat1;
161 double lon1;
162 double azi1;
163 double a;
164 double f;
166 double b, c2, f1, salp0, calp0, k2, salp1, calp1, ssig1, csig1, dn1, stau1, ctau1, somg1, comg1, A1m1, A2m1, A3c,
167 B11, B21, B31, A4, B41;
168 double C1a[6 + 1], C1pa[6 + 1], C2a[6 + 1], C3a[6], C4a[6];
170 unsigned caps;
171};
172
179 double lat;
180 double lon;
182 double lat0;
183 double lon0;
184 double A[2];
185 double P[2];
186 int polyline;
187 int crossings;
189 unsigned num;
190};
191
199void geod_init(struct geod_geodesic* g, double a, double f);
200
238void geod_lineinit(struct geod_geodesicline* l, const struct geod_geodesic* g, double lat1, double lon1, double azi1,
239 unsigned caps);
240
278void geod_direct(const struct geod_geodesic* g, double lat1, double lon1, double azi1, double s12, double* plat2,
279 double* plon2, double* pazi2);
280
320void geod_inverse(const struct geod_geodesic* g, double lat1, double lon1, double lat2, double lon2, double* ps12,
321 double* pazi1, double* pazi2);
322
369void geod_position(const struct geod_geodesicline* l, double s12, double* plat2, double* plon2, double* pazi2);
370
405double geod_gendirect(const struct geod_geodesic* g, double lat1, double lon1, double azi1, int arcmode, double s12_a12,
406 double* plat2, double* plon2, double* pazi2, double* ps12, double* pm12, double* pM12,
407 double* pM21, double* pS12);
408
437double geod_geninverse(const struct geod_geodesic* g, double lat1, double lon1, double lat2, double lon2, double* ps12,
438 double* pazi1, double* pazi2, double* pm12, double* pM12, double* pM21, double* pS12);
439
499double geod_genposition(const struct geod_geodesicline* l, int arcmode, double s12_a12, double* plat2, double* plon2,
500 double* pazi2, double* ps12, double* pm12, double* pM12, double* pM21, double* pS12);
501
517void geod_polygon_init(struct geod_polygon* p, int polylinep);
518
538void geod_polygon_addpoint(const struct geod_geodesic* g, struct geod_polygon* p, double lat, double lon);
539
557void geod_polygon_addedge(const struct geod_geodesic* g, struct geod_polygon* p, double azi, double s);
558
598unsigned geod_polygon_compute(const struct geod_geodesic* g, const struct geod_polygon* p, int reverse, int sign,
599 double* pA, double* pP);
600
628unsigned geod_polygon_testpoint(const struct geod_geodesic* g, const struct geod_polygon* p, double lat, double lon,
629 int reverse, int sign, double* pA, double* pP);
630
658unsigned geod_polygon_testedge(const struct geod_geodesic* g, const struct geod_polygon* p, double azi, double s,
659 int reverse, int sign, double* pA, double* pP);
660
694void geod_polygonarea(const struct geod_geodesic* g, double lats[], double lons[], int n, double* pA, double* pP);
695
701 GEOD_LATITUDE = 1U << 7 | 0U,
702 GEOD_LONGITUDE = 1U << 8 | 1U << 3,
703 GEOD_AZIMUTH = 1U << 9 | 0U,
704 GEOD_DISTANCE = 1U << 10 | 1U << 0,
705 GEOD_DISTANCE_IN = 1U << 11 | 1U << 0 | 1U << 1,
706 GEOD_REDUCEDLENGTH = 1U << 12 | 1U << 0 | 1U << 2,
707 GEOD_GEODESICSCALE = 1U << 13 | 1U << 0 | 1U << 2,
708 GEOD_AREA = 1U << 14 | 1U << 4,
709 GEOD_ALL = 0x7F80U | 0x1FU
711
712#if defined(__cplusplus)
713}
714#endif
715
716#endif
void geod_lineinit(struct geod_geodesicline *l, const struct geod_geodesic *g, double lat1, double lon1, double azi1, unsigned caps)
geod_mask
Definition geodesic.h:699
@ GEOD_AZIMUTH
Definition geodesic.h:703
@ GEOD_REDUCEDLENGTH
Definition geodesic.h:706
@ GEOD_LONGITUDE
Definition geodesic.h:702
@ GEOD_LATITUDE
Definition geodesic.h:701
@ GEOD_ALL
Definition geodesic.h:709
@ GEOD_AREA
Definition geodesic.h:708
@ GEOD_GEODESICSCALE
Definition geodesic.h:707
@ GEOD_DISTANCE
Definition geodesic.h:704
@ GEOD_DISTANCE_IN
Definition geodesic.h:705
@ GEOD_NONE
Definition geodesic.h:700
void geod_polygon_addedge(const struct geod_geodesic *g, struct geod_polygon *p, double azi, double s)
void geod_inverse(const struct geod_geodesic *g, double lat1, double lon1, double lat2, double lon2, double *ps12, double *pazi1, double *pazi2)
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)
double geod_gendirect(const struct geod_geodesic *g, double lat1, double lon1, double azi1, int arcmode, double s12_a12, double *plat2, double *plon2, double *pazi2, double *ps12, double *pm12, double *pM12, double *pM21, double *pS12)
void geod_polygon_init(struct geod_polygon *p, int polylinep)
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_position(const struct geod_geodesicline *l, double s12, double *plat2, double *plon2, double *pazi2)
void geod_direct(const struct geod_geodesic *g, double lat1, double lon1, double azi1, double s12, double *plat2, double *plon2, double *pazi2)
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)
unsigned geod_polygon_compute(const struct geod_geodesic *g, const struct geod_polygon *p, int reverse, int sign, double *pA, double *pP)
double geod_genposition(const struct geod_geodesicline *l, int arcmode, double s12_a12, double *plat2, double *plon2, double *pazi2, double *ps12, double *pm12, double *pM12, double *pM21, double *pS12)
void geod_polygonarea(const struct geod_geodesic *g, double lats[], double lons[], int n, double *pA, double *pP)
void geod_init(struct geod_geodesic *g, double a, double f)
void geod_polygon_addpoint(const struct geod_geodesic *g, struct geod_polygon *p, double lat, double lon)
Definition geodesic.h:146
double f
Definition geodesic.h:148
double a
Definition geodesic.h:147
Definition geodesic.h:159
double lon1
Definition geodesic.h:161
double azi1
Definition geodesic.h:162
double a
Definition geodesic.h:163
double lat1
Definition geodesic.h:160
unsigned caps
Definition geodesic.h:170
double f
Definition geodesic.h:164
Definition geodesic.h:178
double lon
Definition geodesic.h:180
unsigned num
Definition geodesic.h:189
double lat
Definition geodesic.h:179