Sufficient optimality conditions for a bang-bang trajectory