subroutine orbit read_parameters # get parameters from param file OAL_odfInfo # get StartTime, EndTime of file open_outfile # open FITS output file addTable # create new table foreach column # create 7 new columns: time, x, y, z, Vx, Vy, Vz addColumn next for start_time to stop_time, step sampling_interval OAL_getPosition # return position and velocity vectors from ODF foreach column # time, x, y, z, Vx, Vy, Vz fill_column_temp_pointer if (column_temp_pointer(i) not defined) column_temp_pointer(i) = HUGE end if next next OAL_proposalInfo # get basic info to write as keywords write_attributes_to_outfile # add proposal info as keywords release Table # close FITS extension release Set # close FITS file OAL_releaseMemory # close ODF files close_outfile end subroutine orbit