| 20 | } |
| 21 | |
| 22 | void 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 | } |
no test coverage detected