Geo Location
A class that contains location information such as latitude and longitude required for astronomical calculations. The elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for specific implementations of the AstronomicalCalculator to see if elevation is calculated as part of the algorithm.
Author
Eliyahu Hershfeld 2004 - 2022
Constructors
GeoLocation constructor with parameters for all required fields.
GeoLocation constructor with parameters for all required fields.
Default GeoLocation constructor will set location to the Prime Meridian at Greenwich, England and a TimeZone of GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the Royal Observatory, Greenwich. No daylight savings time will be used.
Types
An implementation of the Object.clone method that creates a deep copy of the object. Note: If the TimeZone in the clone will be changed from the original, it is critical that com.kosherjava.zmanim.AstronomicalCalendar.getCalendar. java.util.Calendar.setTimeZone is called after cloning in order for the AstronomicalCalendar to output times in the expected offset.
Properties
Adjust the date for antimeridian crossover. This is needed to deal with edge cases such as Samoa that use a different LocalDate date than expected based on their geographic location.
A method that will return the location's local mean time offset in milliseconds from local standard time. The globe is split into 360, with 15 per hour of the day. For a local that is at a longitude that is evenly divisible by 15 (longitude % 15 == 0), at solar com.kosherjava.zmanim.AstronomicalCalendar.getSunTransit (with adjustment for the equation of time) the sun should be directly overhead, so a user who is 1 west of this will have noon at 4 minutes after standard time noon, and conversely, a user who is 1 east of the 15 longitude will have noon at 11:56 AM. Lakewood, N.J., whose longitude is -74.2094, is 0.7906 away from the closest multiple of 15 at -75. This is multiplied by 4 to yield 3 minutes and 10 seconds earlier than standard time. The offset returned does not account for the Daylight saving time offset since this class is unaware of dates.
If this is ever set after the GeoLocation is set in the com.kosherjava.zmanim.AstronomicalCalendar, it is critical that com.kosherjava.zmanim.AstronomicalCalendar.localDateTime.java.util.Calendar.setTimeZone be called in order for the AstronomicalCalendar to output times in the expected offset. This situation will arise if the AstronomicalCalendar is ever com.kosherjava.zmanim.AstronomicalCalendar.clone.
Functions
Calculate geodesic distance in Meters between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid * with application of nested equations", Survey Review, vol XXII no 176, 1975
Calculate the final geodesic bearing between this Object and a second Object passed to this method using Thaddeus * Vincenty's inverse formula See T Vincenty, "Direct and * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975
Calculate the initial geodesic bearing between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid * with application of nested equations", Survey Review, vol XXII no 176, 1975
Returns the rhumb line bearing from the current location to the GeoLocation passed in.
Returns the rhumb line distance from the current location to the GeoLocation passed in.
Method to set the latitude in degrees, minutes and seconds.
Method to set the longitude in degrees, minutes and seconds.