function Helio() { 
  with (Math) {
	var V = 172.74 + 0.00111588*d;
	sV = sin (V*PI/180);
	cV = cos (V*PI/180);
	N = (20.020 + 0.0830853*d + 0.329 * sV) * PI/180;
	B = 5.555 * sin(N) + 0.168 * sin(2*N);
	r = 5.20872 - 0.25208 * cos(N) - 0.00611 * cos(2*N);
	lambda = 34.35 + 0.083091 * d + 0.329 * sV + B;
	}

}



function Geoz() { 
  with (Math) {

	var J = 66.115 + 0.9025179 * d + 0.329 * sV; // synodische Länge
	K = (J - B)* PI/180  + Cs;
	delta = sqrt( r*r + Rerde*Rerde - 2*r*Rerde*cos(K));

        phi = asin(Rerde * sin(K)/delta);
        
        lgeoz = lambda*PI/180 - phi; 

        beta = 1.30 * sin((lambda-100.5)*PI/180); // geoz

        bgeoz = beta*PI/180;
	var x = cos(lgeoz);
	var y = cos(EKL) * sin(lgeoz) - tan(bgeoz) * sin(EKL);
	var z = sin(EKL) * cos(bgeoz) * sin(lgeoz) + cos(EKL) * sin(bgeoz); 
	alphaju = atan(y/x); if (x<0) alphaju = alphaju + PI
	deltaju = asin(z);
	}

}


function Phys() { 
  with (Math) {

	Ds = 3.12 *  sin((lambda + 42.8)*PI/180);
	De = Ds - 2.22 * sin(phi) * cos((lambda + 22)*PI/180) - 1.3 * (r-delta)* sin((lambda-100.5)*PI/180)/delta;
	Du = 98.47 * 2 / delta;
	mv = -8.93 + 5 * log(r*delta) * LOG10E;
	phasendefekt=Du*0.5*(1-cos(phi));
	}


}


function Zm() {

	var korr = 57.3 * Math.sin(phi/2) * Math.sin(phi/2); // sichtbare Scheibe  
        if (Math.sin(K)>0) korr = -1 * korr
	var w = 210.98 + 877.8169088 * (d - delta/173) + phi*180/Math.PI - B;
        w = w/360; w = w - Math.floor(w); 
	zm1 = w*360; // + korr;
	w = 187.23 + 870.1869088 * (d - delta/173) + phi*180/Math.PI - B;
        w = w/360; w = w - Math.floor(w); 
	zm2 = w*360; // + korr;

}







