Dynamics and stability of lateral plane locomotion on variable inclines