|
|
1.1 ! root 1: #include "map.h" ! 2: ! 3: static struct coord stdpar0, stdpar1; ! 4: static double k; ! 5: static double yeq; ! 6: ! 7: static int ! 8: Xtrapezoidal(struct place *place, double *x, double *y) ! 9: { ! 10: *y = yeq + place->nlat.l; ! 11: *x = *y*k*place->wlon.l; ! 12: return 1; ! 13: } ! 14: ! 15: proj ! 16: trapezoidal(double par0, double par1) ! 17: { ! 18: if(fabs(fabs(par0)-fabs(par1))<.1) ! 19: return rectangular(par0); ! 20: deg2rad(par0,&stdpar0); ! 21: deg2rad(par1,&stdpar1); ! 22: if(fabs(par1-par0) < .1) ! 23: k = stdpar1.s; ! 24: else ! 25: k = (stdpar1.c-stdpar0.c)/(stdpar0.l-stdpar1.l); ! 26: yeq = -stdpar1.l - stdpar1.c/k; ! 27: return Xtrapezoidal; ! 28: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.