Go to the documentation of this file.
4 static float raddeg = 180. /
PI;
6 int ll2vec(
float *ll,
float *vec)
34 if ((*ll > 90.) || (*ll < -90.)) {
41 lonr = *(ll + 1) / raddeg;
45 *vec = cos(lonr) * cos(latr);
46 *(vec + 1) = sin(lonr) * cos(latr);
47 *(vec + 2) = sin(latr);
79 float lonr, latr, vls, vlen;
81 vls = pow(*vec, 2.) + pow(*(vec + 1), 2.) + pow(*(vec + 2), 2.);
91 latr = asin(*(vec + 2) / vlen);
92 lonr = atan2(*(vec + 1) / vlen, *vec / vlen);
95 *(ll + 1) = lonr * raddeg;
int ll2vec(float *ll, float *vec)
int vec2ll(float *vec, float *ll)