new sail controller algorithm