File:  [Research Unix] / researchv8dc / cmd / map / libmap / polyconic.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv8, HEAD
researchv8 Dan Cross

#include "map.h"

Xpolyconic(place, x, y)
struct place *place;
float *x, *y;
{
	double r, alpha;
	float lat2, lon2;
	if(fabs(place->nlat.l) > .01) {
		r = place->nlat.c / place->nlat.s;
		alpha = place->wlon.l * place->nlat.s;
		*y = place->nlat.l + r*(1 - cos(alpha));
		*x = - r*sin(alpha);
	} else {
		lon2 = place->wlon.l * place->wlon.l;
		lat2 = place->nlat.l * place->nlat.l;
		*y = place->nlat.l * (1+(lon2/2)*(1-(8+lon2)*lat2/12));
		*x = - place->wlon.l * (1-lat2*(3+lon2)/6);
	}
	return(1);
}

int (*polyconic())()
{
	return(Xpolyconic);
}

unix.superglobalmegacorp.com

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