An algorithm for orbital feedback linearization of single-input control affine systems