Annotation of researchv10no/cmd/map/libmap/polyconic.c, revision 1.1

1.1     ! root        1: #include "map.h"
        !             2: 
        !             3: int
        !             4: Xpolyconic(struct place *place, double *x, double *y)
        !             5: {
        !             6:        double r, alpha;
        !             7:        double lat2, lon2;
        !             8:        if(fabs(place->nlat.l) > .01) {
        !             9:                r = place->nlat.c / place->nlat.s;
        !            10:                alpha = place->wlon.l * place->nlat.s;
        !            11:                *y = place->nlat.l + r*(1 - cos(alpha));
        !            12:                *x = - r*sin(alpha);
        !            13:        } else {
        !            14:                lon2 = place->wlon.l * place->wlon.l;
        !            15:                lat2 = place->nlat.l * place->nlat.l;
        !            16:                *y = place->nlat.l * (1+(lon2/2)*(1-(8+lon2)*lat2/12));
        !            17:                *x = - place->wlon.l * (1-lat2*(3+lon2)/6);
        !            18:        }
        !            19:        return(1);
        !            20: }
        !            21: 
        !            22: proj
        !            23: polyconic(void)
        !            24: {
        !            25:        return(Xpolyconic);
        !            26: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.