|
CARMA C++
|
Location specifies a location (observatory if you wish) on planet earth, as longitude, latitude, and altitude above sea-level. More...
#include <carma/services/Location.h>
Public Member Functions | |
| Length | getAltitude () const |
| Angle | getLatitude () const |
| Angle | getLongitude () const |
| std::string | getName () const |
| Location () | |
| default constructor, longitude = 0, latitude = 0, altitude = 0. More... | |
| Location (const Angle &longitude, const Angle &latitude, const Length &altitude) | |
| Full constructor where longitude, latitude and altitude are specified. More... | |
| Location (const std::string &observatory, const std::string &position=REFERENCE) | |
| Constructor using a name from the Observatory.cat catalog that should live in CARMA/conf/catalogs/Observatory.cat Examples are "carma", "ovro", "wsrt" etc.etc. More... | |
| void | setAltitude (Length altitude) |
| Specify the altitude above sea level. More... | |
| void | setAltitude (double value, const std::string &units) |
| Specify the altitude above sea level, as value and units which will be used to construct a Length internally. More... | |
| void | setLatitude (Angle latitude) |
| Specify the latitude. More... | |
| void | setLatitude (double value, const std::string &units) |
| Specify the latitude, as value and units which will be used to construct an Angle internally. More... | |
| void | setLongitude (Angle longitude) |
| Specify the longitude. More... | |
| void | setLongitude (double value, const std::string &units) |
| Specify the longitude, as value and units which will be used to construct an Angle internally. More... | |
| carma::services::Vector< double > | vector () |
| the longitude, latitude and altitude (in that order!!!) as a carma:services::Vector. More... | |
Location specifies a location (observatory if you wish) on planet earth, as longitude, latitude, and altitude above sea-level.
Longitude increases from 0 at Greenwich, England in an easterly direction, and decreases in a westerly direction. East longitudes are positive numbers, between 0 and 180 degrees. West longitudes are negative numbers, between 0 and -180 degrees.
Definition at line 32 of file Location.h.
| carma::services::Location::Location | ( | ) |
default constructor, longitude = 0, latitude = 0, altitude = 0.
| carma::services::Location::Location | ( | const Angle & | longitude, |
| const Angle & | latitude, | ||
| const Length & | altitude | ||
| ) |
Full constructor where longitude, latitude and altitude are specified.
Recall west (e.g. CARMA) has longitude < 0
| longitude | Longitude of the observatory. (<0 means west) |
| latitude | Latitude |
| altitude | Altitude |
|
explicit |
Constructor using a name from the Observatory.cat catalog that should live in CARMA/conf/catalogs/Observatory.cat Examples are "carma", "ovro", "wsrt" etc.etc.
The match is case-insensitive. If this constructor were not explicit, Ephemeris(string) constructor could be ambiguously interpreted as meaning a Location or a Source.
| observatory | Name of the observatory |
| position | Name of the station/pad position for this location, defaults to "reference" meaning the array reference position |
| std::string carma::services::Location::getName | ( | ) | const |
| void carma::services::Location::setAltitude | ( | Length | altitude | ) |
Specify the altitude above sea level.
| altitude | The altitude above sea level represented as a carma::services::Length (may be negative) |
| void carma::services::Location::setAltitude | ( | double | value, |
| const std::string & | units | ||
| ) |
Specify the altitude above sea level, as value and units which will be used to construct a Length internally.
| value | The altitude value |
| units | The altitude units |
| void carma::services::Location::setLatitude | ( | Angle | latitude | ) |
Specify the latitude.
| latitude | The latitude represented as a carma::services::Angle |
| void carma::services::Location::setLatitude | ( | double | value, |
| const std::string & | units | ||
| ) |
Specify the latitude, as value and units which will be used to construct an Angle internally.
| value | The latitude value |
| units | The latitude units |
| void carma::services::Location::setLongitude | ( | Angle | longitude | ) |
Specify the longitude.
| longitude | The longitude represented as a carma::services::Angle |
| void carma::services::Location::setLongitude | ( | double | value, |
| const std::string & | units | ||
| ) |
Specify the longitude, as value and units which will be used to construct an Angle internally.
| value | The longitude value |
| units | The longitude units |
| carma::services::Vector<double> carma::services::Location::vector | ( | ) |
the longitude, latitude and altitude (in that order!!!) as a carma:services::Vector.
Note the units will be standard CARMA units, i.e., radians for the two angles, and meters for altitude.