binary distance and heading