|
|
1.1 ! root 1: #include "map.h" ! 2: ! 3: Xpolyconic(place, x, y) ! 4: struct place *place; ! 5: float *x, *y; ! 6: { ! 7: double r, alpha; ! 8: float lat2, lon2; ! 9: if(fabs(place->nlat.l) > .01) { ! 10: r = place->nlat.c / place->nlat.s; ! 11: alpha = place->wlon.l * place->nlat.s; ! 12: *y = place->nlat.l + r*(1 - cos(alpha)); ! 13: *x = - r*sin(alpha); ! 14: } else { ! 15: lon2 = place->wlon.l * place->wlon.l; ! 16: lat2 = place->nlat.l * place->nlat.l; ! 17: *y = place->nlat.l * (1+(lon2/2)*(1-(8+lon2)*lat2/12)); ! 18: *x = - place->wlon.l * (1-lat2*(3+lon2)/6); ! 19: } ! 20: return(1); ! 21: } ! 22: ! 23: int (*polyconic())() ! 24: { ! 25: return(Xpolyconic); ! 26: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.