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

1.1     ! root        1: #include "map.h"
        !             2: 
        !             3: static struct coord stdpar;
        !             4: static double r0;
        !             5: 
        !             6: static
        !             7: Xbonne(struct place *place, double *x, double *y)
        !             8: {
        !             9:        double r, alpha;
        !            10:        r = r0 - place->nlat.l;
        !            11:        if(r<.001)
        !            12:                if(fabs(stdpar.c)<1e-10)
        !            13:                        alpha = place->wlon.l;
        !            14:                else if(fabs(place->nlat.c)==0)
        !            15:                        alpha = 0;
        !            16:                else 
        !            17:                        alpha = place->wlon.l/(1+
        !            18:                                stdpar.c*stdpar.c*stdpar.c/place->nlat.c/3);
        !            19:        else
        !            20:                alpha = place->wlon.l * place->nlat.c / r;
        !            21:        *x = - r*sin(alpha);
        !            22:        *y = - r*cos(alpha);
        !            23:        return(1);
        !            24: }
        !            25: 
        !            26: proj
        !            27: bonne(double par)
        !            28: {
        !            29:        if(fabs(par*RAD) < .01)
        !            30:                return(Xsinusoidal);
        !            31:        deg2rad(par, &stdpar);
        !            32:        r0 = stdpar.c/stdpar.s + stdpar.l;
        !            33:        return(Xbonne);
        !            34: }

unix.superglobalmegacorp.com

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