35 static void adjust_lat(
double *);
38 static void adjust_lon(
double *);
42 double TAN_A, TAN1, TAN2, L;
82 st->TAN1 = tan(
M_PI_4 + lat1 / 2.0);
83 st->TAN2 = tan(
M_PI_4 + lat2 / 2.0);
84 st->TAN_A = (lon2 - lon1) / (log(st->TAN2) - log(st->TAN1));
107 return Degrees(2 * atan(exp((lon - st->L) / st->TAN_A) * st->TAN1) -
M_PI_2);
112 static void adjust_lon(
double *lon)
116 while (*lon < -180.0)
122 static void adjust_lat(
double *lat)
int G_begin_rhumbline_equation(double lon1, double lat1, double lon2, double lat2)
Start rhumbline calculations.
double G_rhumbline_lat_from_lon(double lon)
Calculates rhumbline latitude.