Interface LocationParameter<T>
- Type Parameters:
T- Type of the final builder
- All Known Subinterfaces:
MoonIllumination.Parameters,MoonPosition.Parameters,MoonTimes.Parameters,SunPosition.Parameters,SunTimes.Parameters
- All Known Implementing Classes:
BaseBuilder
public interface LocationParameter<T>
Location based parameters.
Use them to give information about the geolocation of the observer. If ommitted, the coordinates of Null Island are used.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Tat(double[] coords) Sets the geolocation.default Tat(double lat, double lng) Sets the geolocation.elevation(double h) Sets the elevation.default TelevationFt(double ft) Sets the elevation, in foot.default Theight(double h) Deprecated.default TheightFt(double ft) Deprecated.UseelevationFt(double)instead.latitude(double lat) Sets the latitude.default Tlatitude(int d, int m, double s) Sets the latitude.longitude(double lng) Sets the longitude.default Tlongitude(int d, int m, double s) Sets the longitude.Uses the same location as given in theLocationParameterat this moment.
-
Method Details
-
latitude
Sets the latitude.- Parameters:
lat- Latitude, in degrees.- Returns:
- itself
-
longitude
Sets the longitude.- Parameters:
lng- Longitude, in degrees.- Returns:
- itself
-
elevation
Sets the elevation.- Parameters:
h- Elevation, in meters above sea level. Default: 0.0 m. Negative values are silently changed to the acceptable minimum of 0.0 m.- Returns:
- itself
- Since:
- 3.9
- See Also:
-
elevationFt
Sets the elevation, in foot.- Parameters:
ft- Elevation, in foot above sea level. Default: 0.0 ft. Negative values are silently changed to the acceptable minimum of 0.0 ft.- Returns:
- itself
- Since:
- 3.9
- See Also:
-
height
Deprecated.Useelevation(double)instead.Sets the height.- Parameters:
h- Height, in meters above sea level. Default: 0.0 m. Negative values are silently changed to the acceptable minimum of 0.0 m.- Returns:
- itself
-
heightFt
Deprecated.UseelevationFt(double)instead.Sets the height, in foot.- Parameters:
ft- Height, in foot above sea level. Default: 0.0 ft. Negative values are silently changed to the acceptable minimum of 0.0 ft.- Returns:
- itself
- Since:
- 3.8
-
at
Sets the geolocation.- Parameters:
lat- Latitude, in degrees.lng- Longitude, in degrees.- Returns:
- itself
-
at
Sets the geolocation. In the given array, index 0 must contain the latitude, and index 1 must contain the longitude. An optional index 2 may contain the elevation, in meters.This call is meant to be used for coordinates stored in constants.
- Parameters:
coords- Array containing the latitude and longitude, in degrees.- Returns:
- itself
-
latitude
Sets the latitude.- Parameters:
d- Degreesm- Minutess- Seconds (and fraction of seconds)- Returns:
- itself
-
longitude
Sets the longitude.- Parameters:
d- Degreesm- Minutess- Seconds (and fraction of seconds)- Returns:
- itself
-
sameLocationAs
Uses the same location as given in theLocationParameterat this moment.Changes to the source parameter will not affect this parameter, though.
- Parameters:
l-LocationParameterto be used.- Returns:
- itself
-
elevation(double)instead.