
Geo::Sun - Calculates the Geodetic Position of the Sun over the Surface of the Earth

use Geo::Sun; my $gs=Geo::Sun->new; my $point=$gs->set_datetime(DateTime->now)->point; #Full OO interface my $point=$gs->point_dt(DateTime->now); #Old interface printf "Latitude: %s, Longitude: %s\n", $point->latlon; printf "Point isa %s\n", ref($point); #GPS::Point

The Geo::Sun package calculates the position of the Sun over the Earth. The user method point_dt takes a DateTime object as a parameter and returns a GPS::Point which is the point on the earth where the Sun is directly over at the given time.
The Geo::Sun package is a wrapper around Astro::Coord::ECI::Sun with a user friendly interface.

use Geo::Sun; my $gs=Geo::Sun->new;

my $gs=Geo::Sun->new;


Returns a GPS::Point for the location of the sun at the current datetime.
my $point=$gs->point; my $point=$gs->set_datetime(DateTime->now)->point;
Set the current datetime and returns a GPS::Point
my $point=$gs->point_dt(DateTime->now);
Implemented as
my $point=$gs->set_datetime(DateTime->now)->point;
Sets or returns the current datetime which is a DateTime object. The default is DateTime->now.
Sets datetime returns self

Returns the bearing from the station to the Sun.
Sets or returns station. Station must be a valid point argument for GSP::Point distance method.
Sets station returns self

Sets or returns the Astro::Coord::ECI::Sun object.
my $sun=$gs->sun;
Set or returns the Geo::Ellipsoids object.
my $ellipsoid=$gs->ellipsoid; #WGS84

Please send to the geo-perl email list.

Try the geo-perl email list.

Calculations are only good to about 3 decimal places.

Michael R. Davis
CPAN ID: MRDVT
STOP, LLC
domain=>stopllc,tld=>com,account=>mdavis
http://www.stopllc.com/

This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
