	program smei_pos_tst

	include		'planet.h'

	real*8		rx,ry,rz
	integer		t1(2)
	integer		t2(2)
	integer		dt(2)
	integer		Time2Str
	integer		Time2Differ
	real*8		doy, d1, d2
	character	cstr*80
	logical		Time2eph_smei

	iyr = 2003
	t1(1) = 38
	t1(2) = 0

	call Time2YDoy(1,t1,iyr,t1)

	iyr = 2005
	t2(1) = 38
	t2(2) = 0

	call Time2YDoy(1,t2,iyr,t2)

	id1 = d1
	id2 = d2

	dt(1) = 0
	dt(2) = 60000

	do while (Time2Differ(t2,t1) .gt. 0)

	    if (Time2eph_smei(t1, rr)) continue
	    j = Time2Str('YDOY',t1,cstr)
	    write (*,'(A,4F12.5)') cstr(:itrim(cstr)), rr(1),rr(2),rr(3),
     &		dsqrt(rr(1)*rr(1)+rr(2)*rr(2)+rr(3)*rr(3))-PLANET__REARTH_MEAN

	    call Time2Add(t1,dt,t1)

	end do

	!doy = 100.0d0

	!call Time2Day8(1,t1,doy)
	!call Time2YDoy(1,t1,iyr,t1)

	!i = Time2Str('YYYY/DOY hh:mm:ss',t1,cstr)
	!call smei_position(t1, rx,ry,rz)
	!print *, cstr(:itrim(cstr)), rx,ry,rz, dsqrt(rx*rx+ry*ry+rz*rz)-PLANET__EARTH_RADIUS
	!call smei_position(tt, rx,ry,rz)
	!print *, cstr(:itrim(cstr)), rx,ry,rz, dsqrt(rx*rx+ry*ry+rz*rz)-PLANET__EARTH_RADIUS

	end
	

