The maximum principle of Pontryagin is applied to systems where the drift vector field is the geodesic spray corresponding to an affine connection. The result is a second-order differential equation whose right-hand side is the ``adjoint Jacobi equation.'' This latter relates the Hamiltonian geometry of the maximum principle to the affine differential geometry of the system's affine connection.
No online version avaliable (but check this out).