Class SunPosition
- All Implemented Interfaces:
Serializable,EquatorialCoordinates
Contains methods for calculating the position of the sun.
The position refers to the gemometric center of the sun.
- Since:
- 3.38/4.33
- Author:
- Meno Hochschild
- See Also:
- Serialized Form
-
Method Summary
Modifier and TypeMethodDescriptionstatic SunPositionat(Moment moment, GeoLocation location)Calculates the position of sun at given moment and geographical location.booleandoubleObtains the azimuth of sun in degrees (compass orientation).doubleObtains the declination in degrees.doubleObtains the elevation of sun relative to the horizon in degrees.doubleObtains the right ascension in degrees.doublegetShadowLength(double objectHeight)Determines the length of shadow casted by an object of given height.inthashCode()static Zodiac.EventinConstellationOf(Zodiac zodiac)Determines the event when the sun enters or exits given zodiac constellation.static Zodiac.EventDetermines the event when the sun enters or exits given zodiac sign (for horoscope purpose).toString()Methods inherited from interface net.time4j.calendar.astro.EquatorialCoordinates
getRightAscensionHMS
-
Method Details
-
at
Calculates the position of sun at given moment and geographical location.
- Parameters:
moment- the time when the position of sun is to be determinedlocation- geographical location of observer- Returns:
- sun position
-
inConstellationOf
Determines the event when the sun enters or exits given zodiac constellation.
- Parameters:
zodiac- the astronomical zodiac constellation defined by IAU- Returns:
- event when the sun enters or leaves the zodiac constellation
- Since:
- 4.37
-
inSignOf
Determines the event when the sun enters or exits given zodiac sign (for horoscope purpose).
- Parameters:
zodiac- the astronomical zodiac sign- Returns:
- event when the sun enters or leaves the zodiac sign
- Throws:
IllegalArgumentException- if the zodiac isZodiac.OPHIUCHUS- Since:
- 4.37
-
getRightAscension
public double getRightAscension()Description copied from interface:EquatorialCoordinatesObtains the right ascension in degrees.
- Specified by:
getRightAscensionin interfaceEquatorialCoordinates- Returns:
- double in range 0-360
-
getDeclination
public double getDeclination()Description copied from interface:EquatorialCoordinatesObtains the declination in degrees.
- Specified by:
getDeclinationin interfaceEquatorialCoordinates- Returns:
- double
-
getAzimuth
public double getAzimuth()Obtains the azimuth of sun in degrees (compass orientation).
The azimuth is the result of a coordinate transformation of right ascension and declination to the horizon system.
- Returns:
- azimuth in degrees measured from the north (compass orientation)
-
getElevation
public double getElevation()Obtains the elevation of sun relative to the horizon in degrees.
The elevation is the result of a coordinate transformation of right ascension and declination to the horizon system.
- Returns:
- elevation in degrees (positive if above the horizon and negative if below the horizon)
-
getShadowLength
public double getShadowLength(double objectHeight)Determines the length of shadow casted by an object of given height.
If the sun is at or below the horizon then the length of shadow is positive infinity.
- Parameters:
objectHeight- the height of object in meters- Returns:
- length of shadow in meters (or positive infinity)
- Throws:
IllegalArgumentException- if the object height is not finite and positive- Since:
- 3.40/4.35
-
equals
-
hashCode
public int hashCode() -
toString
-