Skip to content

Commit feecf7a

Browse files
authored
Add getSolarAzimuth and getSolarElevation to the AstronomicalCalculator
I am unaware of any implementations of this abstract class besides the two included with this library.
1 parent 860f193 commit feecf7a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,36 @@ public abstract double getUTCSunset(Calendar calendar, GeoLocation geoLocation,
179179
* @return the time in minutes from zero UTC
180180
*/
181181
public abstract double getUTCMidnight(Calendar calendar, GeoLocation geoLocation);
182+
183+
/**
184+
* Return the <a href="https://en.wikipedia.org/wiki/Celestial_coordinate_system">Solar Elevation</a> for the
185+
* horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the
186+
* horizon. Not corrected for altitude.
187+
*
188+
* @param calendar
189+
* time of calculation
190+
* @param geoLocation
191+
* The location information
192+
* @return solar elevation in degrees. The horizon (calculated in a vacuum using the solar radius as the point)
193+
* is 090&deg;, civil twilight is -690&deg; etc. This means that sunrise and sunset that do use
194+
* refraction and are calculated from the upper limb of the sun will return about 0.83390&deg;.
195+
*/
196+
public abstract double getSolarElevation(Calendar calendar, GeoLocation geoLocation);
197+
198+
/**
199+
* Return the <a href="https://en.wikipedia.org/wiki/Celestial_coordinate_system">Solar Azimuth</a> for the
200+
* horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 180
201+
* degrees.
202+
*
203+
* @param calendar
204+
* time of calculation
205+
* @param geoLocation
206+
* The location information
207+
* @return the solar azimuth in degrees. Astronomical midday would be 180 in the norther hemosphere and 0 in the
208+
* southern hemosphere. Depending on the location and time of year, sunrise will have an azimuth of about
209+
* 90&deg; and sunset about 27090&deg;.
210+
*/
211+
public abstract double getSolarAzimuth(Calendar calendar, GeoLocation geoLocation);
182212

183213
/**
184214
* Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher

0 commit comments

Comments
 (0)