pro yo_height,out_file, b_semiax=b_semiax, semiax=semiax,   $
        aincln=aincln, time=time, eccent=eccent,    $
        perigee=perige, apogee=apoge

fn = findfile('$DIR_GEN_ORBIT_SOL/orbit_*')
nfil = n_elements(fn)
print,' There are ',nfil,' orbit files',format='(a,i4,a)'

eccent = dblarr(nfil) & semiax = dblarr(nfil) & yyyy = dblarr(nfil)
dang = dblarr(nfil)
print,'  Reading the orbit files now ...'
for i=0,nfil-1 do begin
  rd_sol,fn(i),I_time,semi,ecc,yy,dang1
  semiax(i) = semi
  eccent(i) = ecc
  yyyy(i)   = yy  
  dang(i)   = dang1
  if i eq 0 then time = I_time else time = [time,I_time]
endfor

; --------------------------------
;  These next statements come mostly from the FORTRAN subroutine
;  ELMST4 in the file orbit3.f
; --------------------------------
  erad0 = 6378.142 
  eradi = 6378.164      ; Earth mean raidus
; semiax            ; LONG SEMI-AXIS LENGTH OF THE ORBIT IN KM.
; eccent            ; ECCENTRICITY OF THE ORBIT.
  J2 = 1.08264D-3
  aincln = dang/!radeg      ; INCLINATION OF THE ORBIT IN RADIAN.
; Browsler's Mean
  b_semiax = semiax/(1.-1.4d0*J2*(1-1.5D0*sin(AINCLN)^2)    $
           /(sqrt(1-ECCENT*ECCENT))^3/(semiax/erad0)^2 )
  PERIGE=b_SEMIAX*(1.0-ECCENT)-ERADI
  APOGE =b_SEMIAX*(1.0+ECCENT)-ERADI

if n_elements(out_file) ne 0 then begin
   openw,lun,out_file,/get_lun
   printf,lun,' Summary of Yohkoh Orbital Parameters'
   printf,lun,' This summary printed: ',fmt_tim(!stime)
   printf,lun,' '
   printf,lun,' SEMIAX:  Long semi-axis length of the orbit'
   printf,lun,' ECCENT:  Eccentricity of the orbit'
   printf,lun,' '
   printf,lun,' Epoch Time              SEMIAX   SEMIAX(B)  ECCENT    INCLN    PERIGEE APOGEE'
   printf,lun,'    (UT)                  (km)      (km)               (rad)     (km)    (km)'
   printf,lun,' '
   for i=0,n_elements(semiax)-1 do begin
     printf,lun,fmt_tim(time(i)),semiax(i),b_semiax(i),         $
            eccent(i),aincln(i),perige(i),apoge(i),     $
            format='(a,3x,2f10.3,2f10.6,2f8.2)'
   endfor
   free_lun,lun
   print,'  The summary is written to file = ',out_file
endif

if n_elements(out_file) ne 0 then begin
   input,'* Plot the average height?',ans, 'Y'
   ans = strmid(strupcase(ans),0,1)
endif else ans = 'Y'

if ans eq 'Y' then utplot,time,b_semiax-eradi,/ynoz,chars=1.5,  $
          title='YOHKOH ORBIT MEAN HEIGHT',ytitle='(km)',/year

end