Copter: fix up some casting issues for wp_distance