Class Observatory
java.lang.Object
uk.ac.starlink.pal.Observatory
Observatory Data
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGet HeightgetId()Get identifierdoublegetLat()Get LatitudedoublegetLong()Get LongitudegetName()Get Namestatic intReturn the number of observatories availablestatic StringgetObservatoryID(int i) Get the short identifier of an observatorystatic StringgetObservatoryName(int i) Get the name of an observatoryGet the longitude, latitude and height as a stringprintPosition(int ndp) Get the longitude, latitude and height as a stringtoString()Get the name of the Observatory as a string
-
Method Details
-
getId
-
getName
-
getLong
public double getLong()Get Longitude- Returns:
- Longitude of Observatory
-
getLat
public double getLat()Get Latitude- Returns:
- Latitude of Observatory
-
getHeight
public double getHeight()Get Height- Returns:
- Height of Observatory in metres
-
printPosition
Get the longitude, latitude and height as a string- Returns:
- Longitude, latitude and height as a string of the form 'E dd mm ss.ss N dd mm ss.ss (Height: nn.nn m)'
-
printPosition
Get the longitude, latitude and height as a string- Parameters:
ndp- Number of decimal places in answer- Returns:
- Longitude, latitude and height as a string of the form 'E dd mm ss.f N dd mm ss.f (Height: nn.f m)' where f is to the required precision
-
toString
-
getObservatoryCount
public static int getObservatoryCount()Return the number of observatories available- Returns:
- the number of observatories available.
-
getObservatoryName
Get the name of an observatory- Parameters:
i- index of the observatory- Returns:
- name of the observatory, null if off limits
-
getObservatoryID
Get the short identifier of an observatory- Parameters:
i- index of the observatory- Returns:
- id of the observatory, null if off limits
-