public class SunRelativePosition extends Object
|
The approximations used in these programs are very good for years between 1800 and 2100. Results should still be sufficiently accurate for the range from -1000 to 3000. Outside of this range, results will be given, but the potential for error is higher.
Modifier and Type | Field and Description |
---|---|
static double |
ASTRONOMICAL_TWILIGHT
Elevation angle of astronomical twilight, in degrees.
|
static double |
CIVIL_TWILIGHT
Elevation angle of civil twilight, in degrees.
|
static double |
NAUTICAL_TWILIGHT
Elevation angle of nautical twilight, in degrees.
|
Constructor and Description |
---|
SunRelativePosition()
Constructs a sun relative position calculator.
|
SunRelativePosition(double twilight)
Constructs a sun relative position calculator with the specified value for the sun elevation at twilight.
|
Modifier and Type | Method and Description |
---|---|
double |
getAzimuth()
Retourne l'azimuth en degrés.
|
Point2D |
getCoordinate()
|
Date |
getDate()
|
double |
getElevation()
Retourne l'élévation en degrés.
|
Date |
getNoonDate()
Retourne la date à laquelle le soleil est au plus haut dans la journée.
|
long |
getNoonTime()
Retourne l'heure à laquelle le soleil est au plus haut.
|
double |
getTwilight()
Returns the sun's elevation angle at twilight, in degrees.
|
static void |
main(String[] args)
Affiche la position du soleil à la date et coordonnées spécifiée.
|
void |
setCoordinate(double longitude,
double latitude)
|
void |
setCoordinate(Point2D point)
|
void |
setDate(Date date)
|
void |
setTwilight(double twilight)
Set the sun's elevation angle at twilight, in degrees.
|
public static final double ASTRONOMICAL_TWILIGHT
public static final double NAUTICAL_TWILIGHT
public static final double CIVIL_TWILIGHT
public SunRelativePosition()
public SunRelativePosition(double twilight) throws IllegalArgumentException
twilight
- The new sun elevation at twilight, or Double.NaN
if no twilight value
should be taken in account.IllegalArgumentException
- if the twilight value is illegal.public void setCoordinate(double longitude, double latitude)
longitude
- The longitude in degrees. Positive values are East; negative values are
West.latitude
- The latitude in degrees. Positive values are North, negative values are
South.public void setCoordinate(Point2D point)
point
- The geographic coordinates in degrees of longitude and latitude.public Point2D getCoordinate()
setCoordinate(...)
method.public void setDate(Date date)
date
- The date and time.public Date getDate()
setDate(java.util.Date)
.public void setTwilight(double twilight) throws IllegalArgumentException
CIVIL_TWILIGHT
.twilight
- The new sun elevation at twilight, or Double.NaN
if no twilight value
should be taken in account.IllegalArgumentException
- if the twilight value is illegal.public double getTwilight()
setTwilight(double)
.public double getAzimuth()
public double getElevation()
public long getNoonTime()
public Date getNoonDate()
getNoonTime()
mais inclue le jour de la date qui avait été spécifiée à
la méthode compute()
.public static void main(String[] args) throws ParseException
SunRelativePosition [longitude] [latitude] [date]où date est un argument optionel spécifiant la date et l'heure. Si cet argument est omis, la date et heure actuelles seront utilisées.
ParseException
Copyright © 1996–2019 Geotools. All rights reserved.