32 double t1, t2, t3, t4, t1r, t2r;
53 st->boa = sqrt(1 - e2);
55 st->ff64 =
st->f *
st->f / 64;
85 double stm, ctm, sdtm, cdtm;
90 tm = (
st->t1r +
st->t2r) / 2;
91 dtm = (
st->t2r -
st->t1r) / 2;
99 st->t1 =
st->t1 *
st->t1 * 2;
102 st->t2 =
st->t2 *
st->t2 * 2;
104 st->t3 = sdtm * sdtm;
105 st->t4 = cdtm * cdtm - stm * stm;
124 q, sd, sdlmr,
t, u, v,
x, y;
126 sdlmr = sin(
Radians(lon2 - lon1) / 2);
129 if (sdlmr == 0.0 &&
st->t1r ==
st->t2r)
132 q =
st->t3 + sdlmr * sdlmr *
st->t4;
158 sd = 2 * sqrt(q - q * q);
159 if (q != 0.0 && cd == 1.0)
167 u =
st->t1 / (1 - q);
176 (
t -
st->f / 4 * (
t *
x - y) +
177 st->ff64 * (
x * (a + (
t - (a + e) / 2) *
x) + y * (-2 * d + e * y) +
void G_set_geodesic_distance_lat2(double lat2)
Sets geodesic distance lat2.
void G_set_geodesic_distance_lat1(double lat1)
Sets geodesic distance lat1.
double G_geodesic_distance(double lon1, double lat1, double lon2, double lat2)
Calculates geodesic distance.
double G_geodesic_distance_lon_to_lon(double lon1, double lon2)
Calculates geodesic distance.
void G_begin_geodesic_distance(double a, double e2)
Begin geodesic distance.