1 subroutine lladjust(tilt,roll,pitch,yaw,senz,xlon,ylat)
7 real senz(1968),xlon(1968),ylat(1968)
8 real vll(3),vecn(3),veco(3),dvo(3),dvy(3)
9 real*8 th,tmp1,tmp2,sini
11 data orbadj/0.046/,yawadj/0.18/
14 common /gconst/
pi,radeg,
re,rem,
f,
omf2,omegae
20 dowhile(senz(i).lt.szm)
28 sini = sin(xincl/radeg)
29 cosi = cos(xincl/radeg)
34 tmp2 = dsin(tmp1)/sini
35 if (tmp2.gt.1.d0)
then
37 else if (tmp2.lt.(-1.d0))
then
40 th = radeg*dasin(tmp2)
44 xlnn = xlon(i) - radeg*atan(tan(th/radeg)*cosi)
47 veco(1) = sini*sin(xlnn/radeg)
48 veco(2) = -sini*cos(xlnn/radeg)
53 if ((tilt+pitch).gt.0)
then
54 tal = senz(i) - tilt - pitch
56 tal = -senz(i) - tilt - pitch
61 vecn(1) = cos(th/radeg)*cos(xlnn/radeg)
62 * - sin(th/radeg)*cosi*sin(xlnn/radeg)
63 vecn(2) = sin(th/radeg)*cosi*cos(xlnn/radeg)
64 * + cos(th/radeg)*sin(xlnn/radeg)
65 vecn(3) = sin(th/radeg)*sini
69 vecn(i) = vecn(i)*yawadj/radeg
70 veco(i) = veco(i)*orbadj/radeg
79 vll(1) = cos(xlon(i)/radeg)*cos(ylat(i)/radeg)
80 vll(2) = sin(xlon(i)/radeg)*cos(ylat(i)/radeg)
82 vll(3) = sin(ylat(i)/radeg)
90 vll(j) = vll(j) + dvy(j) + dvo(j)
94 xlon(i) = radeg*atan2(vll(2),vll(1))
95 ylat(i) = radeg*asin(vll(3))