def _rhumb3(self, other): '''(INTERNAL) Rhumb_ helper function. @param other: The other point (spherical C{LatLon}). ''' self.others(other) a1, b1 = self.to2ab() a2, b2 = other.to2ab() # if |db| > 180 take shorter rhumb # line across the anti-meridian db = wrapPI(b2 - b1) dp = log(tanPI_2_2(a2) / tanPI_2_2(a1)) return (a2 - a1), db, dp
def _xb(a1, b1, end, a, b, wrap): # difference between the bearing to (a, b) and the given # bearing is negative if both are in opposite directions r = bearing_(a1, b1, radians(a), radians(b), wrap=wrap) return PI_2 - abs(wrapPI(r - radians(end)))