Exemple #1
0
def apparent_longitude(t=None):
    """Returns the apparent longitude of the Sun."""
    T = util.julian_centuries(t)
    omega = 259.18 - 1934.142 * T
    true_long = true_longitude(t)
    result = true_long - 0.00569 - 0.00479 * math.sin(np.radians(omega))
    return result
Exemple #2
0
def mean_anomaly(t=None):
    """Returns the mean anomaly (the angle through which the Sun has moved
    assuming a circular orbit) as a function of time."""
    T = util.julian_centuries(t)
    result = 358.475830 + 35999.049750 * T - 0.0001500 * T ** 2 - 0.00000330 * T ** 3
    result = result % 360.0
    return result
Exemple #3
0
def equation_of_center(t=None):
    """Returns the Sun's equation of center (in degrees)"""
    T = util.julian_centuries(t)
    mna = mean_anomaly(t) 
    result = ((1.9194600 - 0.0047890 * T - 0.0000140 * T
    ** 2) * np.sin(np.radians(mna) + (0.0200940 - 0.0001000 * T) *
    np.sin(np.radians(2 * mna)) + 0.0002930 * np.sin(np.radians(3 * mna))))
    return result
Exemple #4
0
def solar_north(t=None):
    """Returns the position of the Solar north pole in degrees."""
    T = util.julian_centuries(t)
    ob1 = true_obliquity_of_ecliptic(t)
    # in degrees
    i = 7.25
    k = 74.3646 + 1.395833 * T
    lamda = true_longitude(t) - 0.00569
    omega = apparent_longitude(t)
    lamda2 = lamda - 0.00479 * math.sin(np.radians(omega))
    diff = np.radians(lamda - k)
    x = np.degrees(math.atan(-math.cos(np.radians(lamda2) * math.tan(np.radians(ob1)))))
    y = np.degrees(math.atan(-math.cos(diff) * math.tan(np.radians(i))))
    result = x + y
    return result
Exemple #5
0
def heliographic_solar_center(t=None):
    """Returns the position of the solar center in heliographic coordinates."""
    jd = util.julian_day(t)
    T = util.julian_centuries(t)
    # Heliographic coordinates in degrees
    theta = (jd - 2398220) * 360 / 25.38
    i = 7.25
    k = 74.3646 + 1.395833 * T
    lamda = true_longitude(t) - 0.00569
    omega = apparent_longitude(t)
    lamda2 = lamda - 0.00479 * math.sin(np.radians(omega))
    diff = np.radians(lamda - k)
    # Latitude at center of disk (deg):
    he_lat = np.degrees(math.asin(math.sin(diff) * math.sin(np.radians(i))))
    # Longitude at center of disk (deg):
    y = -math.sin(diff) * math.cos(np.radians(i))
    x = -math.cos(diff)
    rpol = cmath.polar(complex(x, y))
    he_lon = np.degrees(rpol[1]) - theta
    he_lon = he_lon % 360
    if he_lon < 0:
        he_lon = he_lon + 360.0

    return [he_lon, he_lat]
Exemple #6
0
def mean_ecliptic_longitude(t=None):
    """Returns the mean ecliptic longitude."""
    T = util.julian_centuries(t)
    result = 279.696680 + 36000.76892 * T + 0.0003025 * T ** 2
    result = result % 360.0
    return result
Exemple #7
0
def eccentricity_SunEarth_orbit(t=None):
    """Returns the eccentricity of the Sun Earth Orbit."""
    T = util.julian_centuries(t)
    result = 0.016751040 - 0.00004180 * T - 0.0000001260 * T ** 2
    return result
Exemple #8
0
def true_obliquity_of_ecliptic(t=None):
    T = util.julian_centuries(t)
    result = 23.452294 - 0.0130125 * T - 0.00000164 * T ** 2 + 0.000000503 * T ** 3
    return result
Exemple #9
0
def geometric_mean_longitude(t=None):
    """Returns the geometric mean longitude (in degrees)"""
    T = util.julian_centuries(t)
    result = 279.696680 + 36000.76892 * T + 0.0003025 * T ** 2
    result = result % 360.0
    return result