import math


def transit_bearing(px: float, py: float, ox: float, oy: float) -> float:
    """Given an object at position px, py and an observer as ox, oy this returns the
    the bearing p -> o of the transit line in degrees."""
    b = math.atan2(oy - py, ox - px)
    return math.degrees(b)