Move calculation of apparent wind into functions