LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Private Attributes | List of all members
lsst::afw::coord::Observatory Class Reference

Store information about an observatory ... lat/long, elevation. More...

#include <Observatory.h>

Public Member Functions

 Observatory (lsst::afw::geom::Angle const longitude, lsst::afw::geom::Angle const latitude, double const elevation)
 Constructor for the observatory with lat/long as afwGeom::Angles. More...
 
 Observatory (std::string const longitude, std::string const latitude, double const elevation)
 
void setLatitude (lsst::afw::geom::Angle const latitude)
 Set the latitude. More...
 
void setLongitude (lsst::afw::geom::Angle const longitude)
 Set the longitude. More...
 
void setElevation (double const elevation)
 Set the Elevation. More...
 
lsst::afw::geom::Angle getLatitude () const
 The main access method for the longitudinal coordinate. More...
 
lsst::afw::geom::Angle getLongitude () const
 The main access method for the longitudinal coordinate. More...
 
double getElevation () const
 
std::string getLatitudeStr () const
 Allow quick access to the longitude coordinate as a string. More...
 
std::string getLongitudeStr () const
 Allow quick access to the longitudinal coordinate as a string. More...
 
bool operator== (Observatory const &rhs) const
 
bool operator!= (Observatory const &rhs) const
 

Private Attributes

lsst::afw::geom::Angle _latitude
 
lsst::afw::geom::Angle _longitude
 
double _elevation
 

Detailed Description

Store information about an observatory ... lat/long, elevation.

Definition at line 48 of file Observatory.h.

Constructor & Destructor Documentation

lsst::afw::coord::Observatory::Observatory ( lsst::afw::geom::Angle const  longitude,
lsst::afw::geom::Angle const  latitude,
double const  elevation 
)

Constructor for the observatory with lat/long as afwGeom::Angles.

Parameters
longitudeobservatory longitude (+ve E of Greenwich)
latitudeobservatory latitude
elevationobservatory elevation

Definition at line 53 of file Observatory.cc.

57  :
58  _latitude(latitude),
59  _longitude(longitude),
60  _elevation(elevation) {
61 }
lsst::afw::geom::Angle _latitude
Definition: Observatory.h:76
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:77
lsst::afw::coord::Observatory::Observatory ( std::string const  longitude,
std::string const  latitude,
double const  elevation 
)
Parameters
longitudeobservatory longitude
latitudeobservatory latitude
elevationobservatory elevation

Definition at line 71 of file Observatory.cc.

75  :
76  _latitude(dmsStringToAngle(latitude)),
77  _longitude(dmsStringToAngle(longitude)),
78  _elevation(elevation) {
79 }
lsst::afw::geom::Angle _latitude
Definition: Observatory.h:76
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:77
lsst::afw::geom::Angle dmsStringToAngle(std::string const dms)
Convert a dd:mm:ss string to Angle.
Definition: Coord.cc:344

Member Function Documentation

double lsst::afw::coord::Observatory::getElevation ( ) const
inline

Definition at line 60 of file Observatory.h.

60 { return _elevation; }
afwGeom::Angle lsst::afw::coord::Observatory::getLatitude ( ) const

The main access method for the longitudinal coordinate.

Note
There's no reason to want a latitude in hours, so that unit will cause an exception to be thrown

Definition at line 99 of file Observatory.cc.

99  {
100  return _latitude;
101 }
lsst::afw::geom::Angle _latitude
Definition: Observatory.h:76
std::string lsst::afw::coord::Observatory::getLatitudeStr ( ) const

Allow quick access to the longitude coordinate as a string.

Note
There's no reason to want a latitude string in radians or hours, so the units can not be explicitly requested.

Definition at line 151 of file Observatory.cc.

151  {
152  return angleToDmsString(_latitude);
153 }
lsst::afw::geom::Angle _latitude
Definition: Observatory.h:76
std::string angleToDmsString(lsst::afw::geom::Angle const deg)
a Function to convert a coordinate in decimal degrees to a string with form dd:mm:ss ...
Definition: Coord.cc:293
afwGeom::Angle lsst::afw::coord::Observatory::getLongitude ( ) const

The main access method for the longitudinal coordinate.

Definition at line 88 of file Observatory.cc.

88  {
89  return _longitude;
90 }
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:77
std::string lsst::afw::coord::Observatory::getLongitudeStr ( ) const

Allow quick access to the longitudinal coordinate as a string.

Note
There's no reason to want a longitude string in radians, so that unit will cause an exception to be thrown

Definition at line 141 of file Observatory.cc.

141  {
143 }
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:77
std::string angleToDmsString(lsst::afw::geom::Angle const deg)
a Function to convert a coordinate in decimal degrees to a string with form dd:mm:ss ...
Definition: Coord.cc:293
bool lsst::afw::coord::Observatory::operator!= ( Observatory const &  rhs) const
inline

Definition at line 71 of file Observatory.h.

71  {
72  return !(*this == rhs);
73  }
bool lsst::afw::coord::Observatory::operator== ( Observatory const &  rhs) const
inline

Definition at line 65 of file Observatory.h.

65  {
66  return
67  ((_latitude - rhs._latitude) == 0.0) &&
68  ((_longitude - rhs._longitude) == 0.0) &&
69  ((_elevation - rhs._elevation) == 0.0);
70  }
lsst::afw::geom::Angle _latitude
Definition: Observatory.h:76
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:77
void lsst::afw::coord::Observatory::setElevation ( double const  elevation)

Set the Elevation.

Parameters
elevationthe elevation

Definition at line 126 of file Observatory.cc.

128  {
129  _elevation = elevation;
130 }
void lsst::afw::coord::Observatory::setLatitude ( lsst::afw::geom::Angle const  latitude)

Set the latitude.

Parameters
latitudethe latitude

Definition at line 107 of file Observatory.cc.

109  {
110  _latitude = latitude;
111 }
lsst::afw::geom::Angle _latitude
Definition: Observatory.h:76
void lsst::afw::coord::Observatory::setLongitude ( lsst::afw::geom::Angle const  longitude)

Set the longitude.

Parameters
longitudethe longitude

Definition at line 116 of file Observatory.cc.

118  {
119  _longitude = longitude;
120 }
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:77

Member Data Documentation

double lsst::afw::coord::Observatory::_elevation
private

Definition at line 78 of file Observatory.h.

lsst::afw::geom::Angle lsst::afw::coord::Observatory::_latitude
private

Definition at line 76 of file Observatory.h.

lsst::afw::geom::Angle lsst::afw::coord::Observatory::_longitude
private

Definition at line 77 of file Observatory.h.


The documentation for this class was generated from the following files: