def angleDifferenceB(double b1, double b2) { ((b2 - b1) % 360.0 - 540.0) % 360.0 + 180.0 }