pe_geographic_coordinate

Finds the point at some distance and azimuth from a point along a geodesic, loxodrome, or great elliptic

Usage syntax

void pe_geographic_coordinate (double a, double e2, double lam1, double phi1, double distance, double az12, double *lam2, double *phi2, int geographic_linetype);

Parameters
a Semimajor axis of the spheroid
e2 Eccentricity squared of the spheroid
lam1 Longitude value of the first point
phi1 Latitude value of the first point
distance Geodesic distance
az12 Azimuth from from the first to the second point
lam2 Longitude value of the new point
phi2 Latitude value of the new point
geographic_linetype Type of the line to use
Description

The pe_geographic_coordinate function takes a spheroid, point, distance, and azimuth and calculates the target point. The geographic_linetype parameter specifies the type of line to use: geodesic, loxodrome, or great elliptic. A geodesic is the shortest distance between two points on a spheroid. A loxodrome is a line of equal bearing (a straight line in a Mercator projection). A great elliptic is the line created by the intersection of the spheroid surface with a plane formed by the center of the spheroid and two points on its surface. The valid line type values are:

PE_LINETYPE_GEODESIC 0
PE_LINETYPE_LOXODROME 1
PE_LINETYPE_GREAT_ELLIPTIC 2

Set e2 to zero to calculate distances on a sphere. The geographic coordinates and the azimuth are in radians. The azimuth value range is -π ≤ azimuth ≤ +π. An azimuth is measured positive clockwise with North equal to a zero azimuth. The semimajor axis (a) and the distance are usually given in meters. You can use any linear unit of measure as long as both values use the same unit of measure.
Returns

Longitude and latitude (in radians) of the new point