Interface LocationParameter<T>
- Type Parameters:
T
- Type of the final builder
- All Known Subinterfaces:
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, a latitude and longitude of 0° is used.
-
Method Summary
Modifier and TypeMethodDescriptionat
(double[] coords) Sets the geolocation.at
(double lat, double lng) Sets the geolocation.height
(double h) Sets the height.latitude
(double lat) Sets the latitude.latitude
(int d, int m, double s) Sets the latitude.longitude
(double lng) Sets the longitude.longitude
(int d, int m, double s) Sets the longitude.Uses the same location as given in theLocationParameter
at this moment.
-
Method Details
-
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 height, 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:
lat
- Latitude, in degrees.- Returns:
- itself
-
longitude
Sets the longitude.- Parameters:
lng
- 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
-
height
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
-
sameLocationAs
Uses the same location as given in theLocationParameter
at this moment.Changes to the source parameter will not affect this parameter, though.
- Parameters:
l
-LocationParameter
to be used.- Returns:
- itself
- Since:
- 2.8
-