# File: lltprn1
#
# Writes limb tracker status data to log file

program "@(#) MODULE: lltprn1.src RELEASE: 2.3 CREATED: 04/15/94 18:30:40"
source "/mdisw/cfl/sim/src/lltprn1.src"
descr " lltprn1 - Prints ISS offsets and gains to log file"

if !GS7 <> "CLOSED" then		## front door open

# write offsets & gains to log file
  write  !GS9 "X offset: %3.2xx  " getint(mkltxofs)
  write  !GS9 "X avgerr: %4.2f  " getreal(multxave)
  write  !GS9 "Phdiode1: %4.2f  " getreal(multdio1)
  write  !GS9 "PZTA ofs: %3.2xx  " getint(mkltaos)
  writen !GS9 "PZTA pos: %4.2f  " getreal(multpzt1)

  write  !GS9 "Y offset: %3.2xx  " getint(mkltyofs)
  write  !GS9 "Y avgerr: %4.2f  " getreal(multyave)
  write  !GS9 "Phdiode2: %4.2f  " getreal(multdio2)
  write  !GS9 "PZTB ofs: %3.2xx  " getint(mkltbos)
  writen !GS9 "PZTB pos: %4.2f  " getreal(multpzt2)

  write  !GS9 "  X gain: %3.2xx  " getint(mkltxgn)
  write  !GS9 "X maxerr: %4.2f  " getreal(multxmax)
  write  !GS9 "Phdiode3: %4.2f  " getreal(multdio3)
  write  !GS9 "PZTC ofs: %3.2xx  " getint(mkltcos)
  writen !GS9 "PZTC pos: %4.2f  " getreal(multpzt3)

  write  !GS9 "  Y gain: %3.2xx  " getint(mkltygn)
  write  !GS9 "Y maxerr: %4.2f  " getreal(multymax)
  write  !GS9 "Phdiode4: %4.2f  " getreal(multdio4)
  write  !GS9 "LEG1 pos: %5.1f " getreal(mxam1pos)
  writen !GS9 "LEG2 pos: %5.1f " getreal(mxam2pos)
  writen !GS9 " "

else

# write PZT offsets to log file
  write  !GS9 " X offset  Y Offset "
  write  !GS9 " PZTA ofs  PZTB ofs  PZTC ofs "
  writen !GS9 " PZTA pos  PZTB pos  PZTC pos"

  write  !GS9 "   %3.2xx   " getint(mkltxofs)
  write  !GS9 "   %3.2xx   " getint(mkltyofs)
  write  !GS9 "   %3.2xx   " getint(mkltaos)
  write  !GS9 "   %3.2xx   " getint(mkltbos)
  write  !GS9 "   %3.2xx   " getint(mkltcos)
  write  !GS9 "  %5.2f   " getreal(multpzt1)
  write  !GS9 "  %5.2f   " getreal(multpzt2)
  writen !GS9 "  %5.2f   " getreal(multpzt3)
  writen !GS9 " "

end if
