KosherJava Zmanim Homepage

net.sourceforge.zmanim.util
Class JSuntimeCalculator

java.lang.Object
  extended by net.sourceforge.zmanim.util.AstronomicalCalculator
      extended by net.sourceforge.zmanim.util.JSuntimeCalculator
All Implemented Interfaces:
Cloneable

Deprecated. This class is based on the NOAA algorithm but does not return calculations that match the NOAA algorithm JavaScript implementation. The calculations are about 2 minutes off. This call has been replaced by the NOAACalculator class.

public class JSuntimeCalculator
extends AstronomicalCalculator

Implementation of sunrise and sunset methods to calculate astronomical times. This calculator uses the Java algorithm written by Jonathan Stott that is based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Jonathan's implementation was released under the GPL. Added to the algorithm is an adjustment of the zenith to account for elevation.

Version:
1.1
Author:
Jonathan Stott 2000 - 2004, © Eliyahu Hershfeld 2004 - 2011
See Also:
NOAACalculator

Constructor Summary
JSuntimeCalculator()
          Deprecated.  
 
Method Summary
 String getCalculatorName()
          Deprecated. This class is based on the NOAA algorithm but does not return calculations that match the NOAA algorithm JavaScript implementation. The calculations are about 2 minutes off. This call has been replaced by the NOAACalculator class.
 double getUTCSunrise(AstronomicalCalendar astronomicalCalendar, double zenith, boolean adjustForElevation)
          Deprecated. This class is based on the NOAA algorithm but does not return calculations that match the NOAA algorithm JavaScript implementation. The calculations are about 2 minutes off. This call has been replaced by the NOAACalculator class.
 double getUTCSunset(AstronomicalCalendar astronomicalCalendar, double zenith, boolean adjustForElevation)
          Deprecated. This class is based on the NOAA algorithm but does not return calculations that match the NOAAA algorithm JavaScript implementation. The calculations are about 2 minutes off. This call has been replaced by the NOAACalculator class.
 
Methods inherited from class net.sourceforge.zmanim.util.AstronomicalCalculator
adjustZenith, clone, getDefault, getElevationAdjustment, getRefraction, getSolarRadius, setRefraction, setSolarRadius
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSuntimeCalculator

public JSuntimeCalculator()
Deprecated. 
Method Detail

getCalculatorName

public String getCalculatorName()
Deprecated. This class is based on the NOAA algorithm but does not return calculations that match the NOAA algorithm JavaScript implementation. The calculations are about 2 minutes off. This call has been replaced by the NOAACalculator class.

Specified by:
getCalculatorName in class AstronomicalCalculator
Returns:
the descriptive name of the algorithm.
See Also:
NOAACalculator.getCalculatorName()

getUTCSunrise

public double getUTCSunrise(AstronomicalCalendar astronomicalCalendar,
                            double zenith,
                            boolean adjustForElevation)
Deprecated. This class is based on the NOAA algorithm but does not return calculations that match the NOAA algorithm JavaScript implementation. The calculations are about 2 minutes off. This call has been replaced by the NOAACalculator class.

Description copied from class: AstronomicalCalculator
A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise. This abstract method is implemented by the classes that extend this class.

Specified by:
getUTCSunrise in class AstronomicalCalculator
Parameters:
astronomicalCalendar - Used to calculate day of year.
zenith - the azimuth below the vertical zenith of 90 degrees. for sunrise typically the zenith used for the calculation uses geometric zenith of 90° and adjusts this slightly to account for solar refraction and the sun's radius. Another example would be AstronomicalCalendar.getBeginNauticalTwilight() that passes AstronomicalCalendar.NAUTICAL_ZENITH to this method.
Returns:
The UTC time of sunrise in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in the calculation (expected behavior for some locations such as near the poles, Double.NaN will be returned.
Throws:
ZmanimException - if the year entered == 2000. This calculator can't properly deal with the year 2000. It can properly calculate times for years <> 2000.
See Also:
NOAACalculator.getUTCSunrise(AstronomicalCalendar, double, boolean), AstronomicalCalculator.getUTCSunrise(AstronomicalCalendar, double, boolean)

getUTCSunset

public double getUTCSunset(AstronomicalCalendar astronomicalCalendar,
                           double zenith,
                           boolean adjustForElevation)
Deprecated. This class is based on the NOAA algorithm but does not return calculations that match the NOAAA algorithm JavaScript implementation. The calculations are about 2 minutes off. This call has been replaced by the NOAACalculator class.

Description copied from class: AstronomicalCalculator
A method that calculates UTC sunset as well as any time based on an angle above or below sunset. This abstract method is implemented by the classes that extend this class.

Specified by:
getUTCSunset in class AstronomicalCalculator
Parameters:
astronomicalCalendar - Used to calculate day of year.
zenith - the azimuth below the vertical zenith of 90°. For sunset typically the zenith used for the calculation uses geometric zenith of 90° and adjusts this slightly to account for solar refraction and the sun's radius. Another example would be AstronomicalCalendar.getEndNauticalTwilight() that passes AstronomicalCalendar.NAUTICAL_ZENITH to this method.
Returns:
The UTC time of sunset in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in the calculation (expected behavior for some locations such as near the poles, Double.NaN will be returned.
Throws:
ZmanimException - if the year entered == 2000. This calculator can't properly deal with the year 2000. It can properly calculate times for years <> 2000.
See Also:
NOAACalculator.getUTCSunset(AstronomicalCalendar, double, boolean), AstronomicalCalculator.getUTCSunset(AstronomicalCalendar, double, boolean)

KosherJava Zmanim Homepage

Copyright © 2004 - 2011 Eliyahu Hershfeld. All Rights Reserved. Released under the GPL 2 license