Dynamic replanning of sailplane trajectories for autonomous thermal soaring