|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.itc.idv.math.SunriseSunsetCollector
public class SunriseSunsetCollector
Helper class for calculating sunsrise/sunset pairs. The sunset/sunrise times are calculated geometrically; the influence of the atmosphere as well as the diameter of the sun are not taken into account.
The times calculated are in utc and converted to Calendar objects; the Calendar objects use "GMT+0" as timezone, no daylight savings.
Constructor Summary | |
---|---|
SunriseSunsetCollector(java.util.List<java.util.Calendar> dates)
Initialize the SunriseSunsetCollector with a list of dates to calculate the sunsrise/sunset pairs for. |
Method Summary | |
---|---|
java.util.List<java.util.Calendar> |
calculate(double lat,
double lon)
Calculate sunrise and sunset times at the location (Lat, lon) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SunriseSunsetCollector(java.util.List<java.util.Calendar> dates)
dates
- The initial dates; The only information extracted from the
Calendar objects is the d-m-y fields, time and timezone are not consideredMethod Detail |
---|
public java.util.List<java.util.Calendar> calculate(double lat, double lon)
The calculation of the sunrise/sunset pairs is done based on the following logic: if the list contains 1 date, or more than 2 dates then for each date the pair is calculated. If the list contains 2 dates, they are considered the begin and end date of a range and sunrise/sunset pairs are calculated for both dates as well as for all dates in between.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |