def computeSuntransitAndDayLenghtForDayTs(ts, lat, lon, elevation):
    ts = rmGetStartOfDayUtc(ts)
    n = julianDayFromTimestamp(ts)
    J = __computeMeanSolarNoon(n, lon)
    M = __computeSolarMeanAnomay(J)
    C = __equationOfTheCenter(M)
    L = __computeEclipticLongitude(M, C)
    Jtr = computeSolarTransit(J, M, L)
    delta = __computeSinSunDeclination(L)
    w0 = computeHourAngle(lat, delta, elevation)
    return Jtr, w0