astro
Interface SolarPosition

All Known Implementing Classes:
SimpleSol, SunPosition

public interface SolarPosition

The interface describing conversion methods of Date objects into celestial position of our Sun. Per definition, the calculated solar position is valid for the center of the Earth. In most applications, this will not matter, but for very special occasions this may be a necessary definition.

To make the use of this interface more convenient, all the methods returning positional data of the Sun are called argumentless, requiring first the setDate method to be called. Concrete classes implementing this interface should throw a IllegalStateException, if one of the positional methods is called prior to setDate.


Nested Class Summary
static class SolarPosition.Plato
          Calculates the overlap between night time and target-above-horizon for a full year.
static class SolarPosition.Test
          Test purpose.
 
Method Summary
 double getDec()
          Returns the declination of the Sun, in radians.
 double getEclipticalLongitude()
          Returns the ecliptical longitude of the Sun, in radians.
 double getRa()
          Returns the right ascension of the Sun, in radians.
 void setDate(Date time)
          Sets the date at which the Sun's position should be evaluated.
 

Method Detail

setDate

void setDate(Date time)
Sets the date at which the Sun's position should be evaluated. If one of the positional methods is called prior to this method, An IllegalStateException should be thrown.

Parameters:
Date - The date for which the solar position should be derived.

getEclipticalLongitude

double getEclipticalLongitude()
Returns the ecliptical longitude of the Sun, in radians. The returned argument should be between zero and 2 pi.


getRa

double getRa()
Returns the right ascension of the Sun, in radians. The returned argument should be between zero and 2 pi.


getDec

double getDec()
Returns the declination of the Sun, in radians. The returned argument should be between -pi/2 and pi/2.