Optimal three dimensional reentry trajectories for Apollo-type vehicles