Optimization of Dynamic Soaring at Ridges