deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.utils
Class SunInfo

java.lang.Object
  extended by org.deegree.commons.utils.SunInfo

public class SunInfo
extends Object

The SunInfo supplies methods for the calculation of the sun position at a given time and latitude. The color of the sunlight may be requested as well.

Version:
$Revision: 18171 $, $Date: 2009-06-17 16:00:07 +0200 (Mi, 17 Jun 2009) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Constructor Summary
SunInfo()
          Constructs a sunposition at the current (local) time
SunInfo(Calendar calendar)
          Constructs a sunposition with the given Calendar
SunInfo(int year, int month, int day, int hour, int minute)
           
 
Method Summary
 float calcSunlightIntensity(float[] color, float cloudFactor)
           
 float[] calculateSunlight(double latitude)
          This method calculates the color of the sunlight for the current time and the given latitude.
 float[] getEucledianPosition(double latitude)
          Get the euclidean position of the sun.
 double getHorizontalSunPosition()
          calculates the horizontal angle of the sun depending only on hour and minute!
 double getVerticalSunposition(double latitude)
          calculates the solar altitude for given latitude, year, month, date, hour and minute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunInfo

public SunInfo()
Constructs a sunposition at the current (local) time


SunInfo

public SunInfo(Calendar calendar)
Constructs a sunposition with the given Calendar

Parameters:
calendar - a given Calendar

SunInfo

public SunInfo(int year,
               int month,
               int day,
               int hour,
               int minute)
Parameters:
year -
month -
day -
hour -
minute -
Method Detail

getVerticalSunposition

public double getVerticalSunposition(double latitude)
calculates the solar altitude for given latitude, year, month, date, hour and minute

Parameters:
latitude - latitude of the the viewers position
Returns:
the solar altitude in radians for the given latitude

getHorizontalSunPosition

public double getHorizontalSunPosition()
calculates the horizontal angle of the sun depending only on hour and minute!

Returns:
the horizontal angle in radians

getEucledianPosition

public float[] getEucledianPosition(double latitude)
Get the euclidean position of the sun.

Parameters:
latitude -
Returns:
the euclidean position of the sun.

calculateSunlight

public float[] calculateSunlight(double latitude)
This method calculates the color of the sunlight for the current time and the given latitude. This method is taken from deegree2, the values are undocumented.

Parameters:
latitude -
Returns:
a the color of the sunlight for the given latitude.

calcSunlightIntensity

public float calcSunlightIntensity(float[] color,
                                   float cloudFactor)
Parameters:
color - to calculate the intensity for.
cloudFactor - scale factor [0,1] describing percentage of clouds covering the sun
Returns:
the intensity of the sunlight

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>