Astro-Sunrise
view release on metacpan or search on metacpan
lib/Astro/Sunrise.pm view on Meta::CPAN
# time of the day..
#
#
# _RETURN
#
# Sidtime
#
sub GMST0 {
my ($d) = @_;
my $sidtim0 = revolution( ( 180.0 + 356.0470 + 282.9404 )
+ ( 0.9856002585 + 4.70935E-5 ) * $d );
return $sidtim0;
}
#
#
# FUNCTIONAL SEQUENCE for sun_RA_dec
#
# _GIVEN
lib/Astro/Sunrise.pm view on Meta::CPAN
# Mean anomaly of the Sun
# Mean longitude of perihelion
# Note: Sun's mean longitude = M + w
# Eccentricity of Earth's orbit
# Eccentric anomaly
# x, y coordinates in orbit
# True anomaly
# Compute mean elements
my $Mean_anomaly_of_sun = revolution( 356.0470 + 0.9856002585 * $d );
my $Mean_longitude_of_perihelion = 282.9404 + 4.70935E-5 * $d;
my $Eccentricity_of_Earth_orbit = 0.016709 - 1.151E-9 * $d;
# Compute true longitude and radius vector
my $Eccentric_anomaly = $Mean_anomaly_of_sun
+ $Eccentricity_of_Earth_orbit * $RADEG
* sind($Mean_anomaly_of_sun)
* ( 1.0 + $Eccentricity_of_Earth_orbit * cosd($Mean_anomaly_of_sun) );
my $x = cosd($Eccentric_anomaly) - $Eccentricity_of_Earth_orbit;
( run in 1.669 second using v1.01-cache-2.11-cpan-39bf76dae61 )