|
|
1.1 root 1: #include "map.h"
2:
3: static double scale;
4:
5: static int
6: Xgall(struct place *place, double *x, double *y)
7: {
8: /* two ways to compute tan(place->nlat.l/2) */
9: if(fabs(place->nlat.s)<.1)
10: *y = sin(place->nlat.l/2)/cos(place->nlat.l/2);
11: else
12: *y = (1-place->nlat.c)/place->nlat.s;
13: *x = -scale*place->wlon.l;
14: return 1;
15: }
16:
17: proj
18: gall(double par)
19: {
20: double coshalf;
21: if(fabs(par)>80)
22: return 0;
23: par *= RAD;
24: coshalf = cos(par/2);
25: scale = cos(par)/(2*coshalf*coshalf);
26: return Xgall;
27: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.