MCPcopy Create free account
hub / github.com/OSGeo/PROJ / geod_inv

Function geod_inv

src/apps/geod_interface.cpp:22–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void geod_inv(void) {
23 double lat1 = phi1 / DEG_TO_RAD, lon1 = lam1 / DEG_TO_RAD,
24 lat2 = phi2 / DEG_TO_RAD, lon2 = lam2 / DEG_TO_RAD, azi1, azi2, s12;
25 geod_inverse(&GlobalGeodesic, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2);
26 /* Compute back azimuth
27 * map +/-0 -> -/+180; +/-180 -> -/+0
28 * this depends on abs(azi2) <= 180 */
29 azi2 = copysign(azi2 + copysign(180.0, -azi2), -azi2);
30 al12 = azi1 * DEG_TO_RAD;
31 al21 = azi2 * DEG_TO_RAD;
32 geod_S = s12;
33}

Callers 2

processFunction · 0.85
geod_setFunction · 0.85

Calls 1

geod_inverseFunction · 0.85

Tested by

no test coverage detected