GeoLocation class

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 {@link AstronomicalCalculator} to see if elevation is calculated as part of the algorithm.

@author © Eliyahu Hershfeld 2004 - 2018 @version 1.1

Constructors

GeoLocation()
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.
GeoLocation.setLocation(String name, double latitude, double longitude, DateTime dateTime, [double elevation = 0])
GeoLocation constructor with parameters for all required fields. [...]

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

equals(Object object) bool
@see java.lang.Object#equals(Object)
getAntimeridianAdjustment() int
Adjust the date for antimeridian crossover. This is needed to deal with edge cases such as Samoa that use a different calendar date than expected based on their geographic location. [...]
getDateTime() DateTime
@return Returns the timeZone.
getElevation() double
Method to get the elevation in Meters. [...]
getGeodesicDistance(GeoLocation location) double
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 [...]
getGeodesicFinalBearing(GeoLocation location) double
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 [...]
getGeodesicInitialBearing(GeoLocation location) double
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 [...]
getLatitude() double
@return Returns the latitude.
getLocalMeanTimeOffset() double
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 {@link net.sourceforge.zmanim.AstronomicalCalendar#getSunTransit() noon} (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. [...]
getLocationName() String
@return Returns the location name.
getLongitude() double
@return Returns the longitude.
getRhumbLineBearing(GeoLocation location) double
Returns the rhumb line bearing from the current location to the GeoLocation passed in. [...]
getRhumbLineDistance(GeoLocation location) double
Returns the rhumb line distance from the current location to the GeoLocation passed in. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
setDateTime(DateTime dateTime) → void
Method to set the TimeZone. If this is ever set after the GeoLocation is set in the {@link net.sourceforge.zmanim.AstronomicalCalendar}, it is critical that {@link net.sourceforge.zmanim.AstronomicalCalendar#getCalendar()}. {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the AstronomicalCalendar to output times in the expected offset. This situation will arise if the AstronomicalCalendar is ever {@link net.sourceforge.zmanim.AstronomicalCalendar#clone() cloned}. [...]
setElevation(double elevation) → void
Method to set the elevation in Meters above sea level. [...]
setLatitude({int degrees, int minutes, double seconds, String direction, double latitude}) → void
Method to set the latitude in degrees, minutes and seconds. [...]
setLocationName(String name) → void
@param name The setter method for the display name.
setLongitude({int degrees, int minutes, double seconds, String direction, double longitude}) → void
Method to set the longitude in degrees, minutes and seconds. [...]
toString() String
Returns a string representation of this object.
inherited
vincentyFormula(GeoLocation location, int formula) double
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 [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited