Optimal Terminal Guidance with Constraints at Final Time