An Automated Trajectory Control for Drilling Operations