# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0
# 
# Path: skyfield/constants.py
# C_AUDAY = C * DAY_S / AU_M
# 
# Path: skyfield/functions.py
# def length_of(xyz):
#     """Given a 3-element array |xyz|, return its length.
# 
#     The three elements can be simple scalars, or the array can be two
#     dimensions and offer three whole series of x, y, and z coordinates.
# 
#     """
#     return sqrt((xyz * xyz).sum(axis=0))
# 
# def _reconcile(a, b):
#     """Coerce two NumPy generics-or-arrays to the same number of dimensions."""
#     an = getattr(a, 'ndim', 0)
#     bn = getattr(b, 'ndim', 0)
#     difference = bn - an
#     if difference > 0:
#         if an:
#             a.shape += (1,) * difference
#         else:
#             a = full_like(b, a)
#     elif difference < 0:
#         if bn:
#             b.shape += (1,) * -difference
#         else:
#             b = full_like(a, b)
#     return a, b


from numpy import array, max
from skyfield.api import load
from skyfield.constants import C_AUDAY
from skyfield.functions import length_of, _reconcile
            tposition = tposition + offset
            tvelocity = tvelocity + offset
        return tposition, tvelocity, gcrs_position, message
    return wrapper

# The original.

def _correct_for_light_travel_time(observer, target):
    """Return a light-time corrected astrometric position and velocity.

    Given an `observer` that is a `Barycentric` position somewhere in
    the solar system, compute where in the sky they will see the body
    `target`, by computing the light-time between them and figuring out
    where `target` was back when the light was leaving it that is now
    reaching the eyes or instruments of the `observer`.

    """
    t = observer.t
    ts = t.ts
    whole = t.whole
    tdb_fraction = t.tdb_fraction

    cposition = observer.position.au
    cvelocity = observer.velocity.au_per_d

    tposition, tvelocity, gcrs_position, message = target._at(t)

    distance = length_of(tposition - cposition)
    light_time0 = 0.0
    for i in range(10):

# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0
# 
# Path: skyfield/constants.py
# C_AUDAY = C * DAY_S / AU_M
# 
# Path: skyfield/functions.py
# def length_of(xyz):
#     """Given a 3-element array |xyz|, return its length.
# 
#     The three elements can be simple scalars, or the array can be two
#     dimensions and offer three whole series of x, y, and z coordinates.
# 
#     """
#     return sqrt((xyz * xyz).sum(axis=0))
# 
# def _reconcile(a, b):
#     """Coerce two NumPy generics-or-arrays to the same number of dimensions."""
#     an = getattr(a, 'ndim', 0)
#     bn = getattr(b, 'ndim', 0)
#     difference = bn - an
#     if difference > 0:
#         if an:
#             a.shape += (1,) * difference
#         else:
#             a = full_like(b, a)
#     elif difference < 0:
#         if bn:
#             b.shape += (1,) * -difference
#         else:
#             b = full_like(a, b)
#     return a, b


# Path: design/broadcasting.py
from numpy import array, max
from skyfield.api import load
from skyfield.constants import C_AUDAY
from skyfield.functions import length_of, _reconcile

            tposition = tposition + offset
            tvelocity = tvelocity + offset
        return tposition, tvelocity, gcrs_position, message
    return wrapper

# The original.

def _correct_for_light_travel_time(observer, target):
    """Return a light-time corrected astrometric position and velocity.

    Given an `observer` that is a `Barycentric` position somewhere in
    the solar system, compute where in the sky they will see the body
    `target`, by computing the light-time between them and figuring out
    where `target` was back when the light was leaving it that is now
    reaching the eyes or instruments of the `observer`.

    """
    t = observer.t
    ts = t.ts
    whole = t.whole
    tdb_fraction = t.tdb_fraction

    cposition = observer.position.au
    cvelocity = observer.velocity.au_per_d

    tposition, tvelocity, gcrs_position, message = target._at(t)

    distance = length_of(tposition - cposition)
    light_time0 = 0.0
    for i in range(10):

        light_time = distance / C_AUDAY