41 double *lat,
double *lon,
double *hgt)
43 double p, u, su,cu,bee2,ae2,aob,slat;
51 u = atan((efg[
GEO_G]/p) * aob);
56 *lat = atan((efg[
GEO_G] + bee2 *
cube(su) ) /
57 ( p - ae2 *
cube(cu) ) );
60 *hgt = p / cos(*lat) - ( GEO_WGS84_a / (sqrt(1.0 -
GEO_WGS84_e2 *
sqr(slat))));
61 *lon = atan2(efg[GEO_F],efg[GEO_E]);
117 double *lat,
double *lon,
double *hgt)
123 *lon = atan2(efg[GEO_F],efg[GEO_E]);
133 *hgt = (p / cos(*lat)) - n;
140 double lat, lon, hgt;
152 double lat, lon, hgt;
163 double lat, lon, hgt;
189 double *lat,
double *lon,
double *hgt)
194 *lon = atan2(efg[GEO_F],efg[GEO_E]);
208 *hgt = (p / cos(*lat)) - n;
209 *lat=atan(tmp / (1.0 - (
GEO_WGS84_e2 * ( n / (n + *hgt)) ) ) );
216 double lat, lon, hgt;
228 double lat, lon, hgt;
239 double lat, lon, hgt;
265 double *lat,
double *lon,
double *hgt)
267 double tmp,
n,b0,
p,slat,clat,ee2b,ae2;
271 p = sqrt(
sqr(efg[GEO_E])+
sqr(efg[GEO_F]));
285 *lat = atan((efg[
GEO_G]+ ee2b *
cube(slat) ) /
286 (p - ae2 *
cube(clat) ) );
291 *hgt = (p / cos(*lat)) - n;
298 double lat, lon, hgt;
310 double lat, lon, hgt;
321 double lat, lon, hgt;
348 double *lat,
double *lon,
double *hgt)
356 p = sqrt(
sqr(efg[GEO_E]) +
sqr(efg[GEO_F]));
365 *hgt = p / cos(*lat) -
n;
372 double lat, lon, hgt;
384 double lat, lon, hgt;
395 double lat, lon, hgt;
421 double *lat,
double *lon,
double *hgt)
423 double a,b,r,e,f,
p,q,d,v,g,t,sign,bg,samb,sqrtd,sqre,ar;
440 if(efg[
GEO_G] < 0.0) sign = -1.0;
445 r = efg[
GEO_E] / cos(*lon);
447 e = (bg - samb) / ar;
449 f = (bg + samb) / ar;
450 p = 4.0/3.0*(e*f+1.0);
451 q = 2.0 * (sqre-
sqr(f));
455 v = 2.0 * sqrt(-p) * cos(acos(q/pow(-p,3.0/2.0))/3.0);
457 v = pow((sqrtd - q),1.0/3.0) - pow((sqrtd + q),1.0/3.0);
458 g = (sqrt(sqre+v) + e ) / 2.0;
459 t = sqrt(
sqr(g)+((f-v*g)/(2.0*g-e))) - g;
460 *lat = atan(a*(1.0-
sqr(t))/(2.0*b*t));
462 *hgt = (r - a*t) * cos(*lat) + (efg[
GEO_G]-b)*sin(*lat);
469 double lat, lon, hgt;
481 double lat, lon, hgt;
492 double lat, lon, hgt;
518 double *lat,
double *lon,
double *hgt)
520 double fr,a2,x2,y2,z2,d2,e4,
p,q,r,s,t,u,v,w,
k,d,sqrtx2py2,sqrtd2pz2;
530 sqrtx2py2 = sqrt(x2+y2);
537 s = e4 * (p*q)/(4.0*
cube(r));
538 t = pow(1.0+s+sqrt(s*(2.0+s)),1.0/3.0);
539 u = r*(1.0+t+(1.0/t));
540 v = sqrt(
sqr(u)+e4*q);
542 k = sqrt(u+v+
sqr(w)) - w;
545 sqrtd2pz2 = sqrt(d2+z2);
547 *lon = 2.0 * atan(efg[GEO_F]/(efg[GEO_E] + sqrtx2py2));
548 *lat = 2.0 * atan(efg[GEO_G]/(d + sqrtd2pz2));
556 double lat, lon, hgt;
568 double lat, lon, hgt;
579 double lat, lon, hgt;