Annotation of researchv8dc/cmd/map/libmap/mecca.c, revision 1.1

1.1     ! root        1: #include "map.h"
        !             2: 
        !             3: struct coord stdpar;
        !             4: 
        !             5: Xmecca(place, x, y)
        !             6: struct place *place;
        !             7: float *x, *y;
        !             8: {
        !             9:        *x = - place->wlon.l;
        !            10:        *y = -(place->nlat.c*stdpar.s -
        !            11:                place->nlat.s*stdpar.c*place->wlon.c)/stdpar.c;
        !            12:        if(fabs(place->wlon.l) > 0.01)
        !            13:                *y *= *x/sin(*x);
        !            14:        if(fabs(*y)>2.0)
        !            15:                return(0);
        !            16:        if(place->nlat.s*stdpar.s +
        !            17:           place->nlat.c*stdpar.c*place->wlon.c <0)
        !            18:                return(-1);
        !            19:        return(1);
        !            20: }
        !            21: 
        !            22: int (*mecca(par))()
        !            23: float par;
        !            24: {
        !            25:        if(fabs(par)>80.)
        !            26:                return(0);
        !            27:        deg2rad(par,&stdpar);
        !            28:        return(Xmecca);
        !            29: }

unix.superglobalmegacorp.com

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