	character*12 ac,dc
	character*30 dis
	pi=4.*atan(1.)
	cx=pi/12.
	cy=pi/180.
	write(*,*)
	write(*,*)'convert alpha delta to galactic coordination'
	write(*,*)
10	write(*,*)' alpha delta epoch (Ex 2:3:4.4 -3:12 1997.5)'
	read(*,'(a)')dis
	i=itohd(dis,alpha,delta,epoch)
	call toms(alpha,ac,1)
	call toms(delta,dc,0)
	write(*,*)ac,dc,epoch
	epoch1=1950.
        call astprs(alpha,delta,epoch,x,y,epoch1)
	call toms(x,ac,1)
	call toms(y,dc,0)
	write(*,*)ac,dc,epoch1
        call galactic(x,cx,y,cy,xa,xd)
	write(*,*)xa,xd,' both in degree'
	if(xa.lt.0)xa=xa+360
	call toms(xa,ac,2)
	call toms(xd,dc,0)
	write(*,*)ac,dc
	goto 10
	end	

        subroutine galactic(x,cx,y,cy,xl,xb)
	alpha=x*cx
	delta=y*cy
        a0=282.25*cy
        theta=62.6*cy
        Xl0=33.0*cy
        x1=cos(delta)*cos(alpha-a0)
        x2=cos(delta)*sin(alpha-a0)*cos(theta)+sin(delta)*sin(theta)
        xl=atan2(x2,x1)+xl0
        if(xl.lt.0.)xl=xl+2.0*pi
        xb=asin(sin(delta)*cos(theta)-
     *          cos(delta)*sin(alpha-a0)*sin(theta))
        xl=xl/cy
        xb=xb/cy
        end

