add bearing calculation (with go fmt)

Just the bearing calculation :)