LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
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 49 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:77
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:78
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:77
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:78
lsst::afw::geom::Angle dmsStringToAngle(std::string const dms)
Convert a dd:mm:ss string to Angle.
Definition: Coord.cc:343

Member Function Documentation

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

Definition at line 61 of file Observatory.h.

61 { 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:77
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: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:292
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:78
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:78
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:292
bool lsst::afw::coord::Observatory::operator!= ( Observatory const &  rhs) const
inline

Definition at line 72 of file Observatory.h.

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

Definition at line 66 of file Observatory.h.

66  {
67  return
68  ((_latitude - rhs._latitude) == 0.0) &&
69  ((_longitude - rhs._longitude) == 0.0) &&
70  ((_elevation - rhs._elevation) == 0.0);
71  }
lsst::afw::geom::Angle _latitude
Definition: Observatory.h:77
lsst::afw::geom::Angle _longitude
Definition: Observatory.h:78
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:77
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:78

Member Data Documentation

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

Definition at line 79 of file Observatory.h.

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

Definition at line 77 of file Observatory.h.

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

Definition at line 78 of file Observatory.h.


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