/** * Find the ecliptic longitude of the Sun * @return The ecliptic longitude of the Sun */ double SunEphemeris::FNsun (double d) { // mean longitude of the Sun L = FNrange(280.461 * DEG_TO_RAD + .9856474 * DEG_TO_RAD * d); // mean anomaly of the Sun g = FNrange(357.528 * DEG_TO_RAD + .9856003 * DEG_TO_RAD * d); // Ecliptic longitude of the Sun return FNrange(L + 1.915 * DEG_TO_RAD * sin(g) + .02 * DEG_TO_RAD * sin(2 * g)); }
double FNsun (double d) { // mean longitude of the Sun L = FNrange(280.461 * rads + .9856474 * rads * d); // mean anomaly of the Sun g = FNrange(357.528 * rads + .9856003 * rads * d); // Ecliptic longitude of the Sun return FNrange(L + 1.915 * rads * sin(g) + .02 * rads * sin(2 * g)); };