# Path: tecs/sat/datum.py
# C20 = -1082.63e-6


from math import sqrt
from tecs.sat import datum
    x0 = eph[0] * 1000
    vX = eph[1] * 1000
    aX = eph[2] * 1000

    y0 = eph[4] * 1000
    vY = eph[5] * 1000
    aY = eph[6] * 1000

    z0 = eph[8] * 1000
    vZ = eph[9] * 1000
    aZ = eph[10] * 1000

    if dt == 0:
        return x0, y0, z0

    r = sqrt(x0 ** 2 + y0 ** 2 + z0 ** 2)

    # - GLONASS ICD ver 5.1, 2008.
    first_sd = -(datum.mu / r ** 3)
    second_sd = 3 / 2. * datum.J0sqd * datum.mu * datum.ae ** 2 / r ** 5

    # - x, y, z
    # noinspection PyPep8
    fx = lambda x, z: (first_sd * x - second_sd * x *
                       (1 - 5 * z ** 2 / r ** 2) +
                       datum.omega ** 2 * x + 2 * datum.omega * vY + aX)

    # noinspection PyPep8
    fy = lambda y, z: (first_sd * y - second_sd * y *
                       (1 - 5 * z ** 2 / r ** 2) +

# Path: tecs/sat/datum.py
# C20 = -1082.63e-6


# Path: tecs/sat/glonass.py
from math import sqrt
from tecs.sat import datum

    x0 = eph[0] * 1000
    vX = eph[1] * 1000
    aX = eph[2] * 1000

    y0 = eph[4] * 1000
    vY = eph[5] * 1000
    aY = eph[6] * 1000

    z0 = eph[8] * 1000
    vZ = eph[9] * 1000
    aZ = eph[10] * 1000

    if dt == 0:
        return x0, y0, z0

    r = sqrt(x0 ** 2 + y0 ** 2 + z0 ** 2)

    # - GLONASS ICD ver 5.1, 2008.
    first_sd = -(datum.mu / r ** 3)
    second_sd = 3 / 2. * datum.J0sqd * datum.mu * datum.ae ** 2 / r ** 5

    # - x, y, z
    # noinspection PyPep8
    fx = lambda x, z: (first_sd * x - second_sd * x *
                       (1 - 5 * z ** 2 / r ** 2) +
                       datum.omega ** 2 * x + 2 * datum.omega * vY + aX)

    # noinspection PyPep8
    fy = lambda y, z: (first_sd * y - second_sd * y *
                       (1 - 5 * z ** 2 / r ** 2) +

                       datum.omega ** 2 * y - 2 * datum.omega * vX + aY)