if(TimeBuff[0]%4==0&&TimeBuff[0]/100!=0||TimeBuff[0]%400==0)
h=29;
else
h=28;
switch(TimeBuff[1])
{
case 1: n=TimeBuff[2]; break;
case 2: n=31+TimeBuff[2]; break;
case 3: n=31+h+TimeBuff[2]; break;
case 4: n=31*2+h+TimeBuff[2]; break;
case 5: n=31*2+h+30+TimeBuff[2]; break;
case 6: n=31*3+h+30+TimeBuff[2]; break;
case 7: n=31*3+h+30*2+TimeBuff[2];break;
case 8: n=31*4+h+30*2+TimeBuff[2];break;
case 9: n=31*5+h+30*2+TimeBuff[2];break;
case 10: n=31*5+h+30*3+TimeBuff[2];break;
case 11: n=31*6+h+30*3+TimeBuff[2];break;
case 12: n=31*6+h+30*4+TimeBuff[2];break;
}
while(1)
{
r=(pi/180)*36.083;
m=(2*pi*(n-1)/365)*pi/180;
c=0.070257*sin(m)-0.399912*cos(m)+0.000907*sin(2*m)-0.006758*cos(2*m)+0.00148*sin(3*m)-0.002679*cos(3*m)+0.006918;
t=(0.001868*cos(m)-0.032077*sin(m)-0.014615*cos(2*m)-0.04089*sin(2*m)+0.000075)*229.18;
s=TimeBuff[4]+t/60;
d=(15*(s-12))*pi/180;
a=asin(sin(r)*sin(c)+cos(r)*cos(c)*cos(d));
b=asin(cos(c)*sin(d)/cos(a));