kstars
GeoLocation Class Reference
Contains all relevant information for specifying a location on Earth: City Name, State/Province name, Country Name, Longitude, Latitude, Elevation, Time Zone, and Daylight Savings Time rule. More...
#include <geolocation.h>
Public Member Functions | |
void | cartToGeod (void) |
void | changeEllipsoid (int i) |
QString | country () const |
int | ellipsoid () const |
QString | fullName () const |
void | geodToCart (void) |
GeoLocation (double x, double y, double z, QString name="Nowhere", QString province="Nowhere", QString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4) | |
GeoLocation (double lng, double lat, QString name="Nowhere", QString province="Nowhere", QString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4, double hght=-10) | |
GeoLocation (dms lng, dms lat, QString name="Nowhere", QString province="Nowhere", QString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4, double hght=-10) | |
GeoLocation (GeoLocation *g) | |
GeoLocation (const GeoLocation &g) | |
GeoLocation () | |
dms | GSTtoLST (const dms &gst) const |
double | height () const |
const dms * | lat () const |
const dms * | lng () const |
dms | LSTtoGST (const dms &lst) const |
KStarsDateTime | LTtoUT (const KStarsDateTime <) const |
QString | name () const |
QString | province () const |
void | reset (GeoLocation *g) |
void | setCountry (const QString &n) |
void | setEllipsoid (int i) |
void | setHeight (double hg) |
void | setLat (double l) |
void | setLat (dms l) |
void | setLong (double l) |
void | setLong (dms l) |
void | setName (const QString &n) |
void | setProvince (const QString &n) |
void | setTZ (double tz) |
void | setTZrule (TimeZoneRule *tzr) |
void | setXPos (double x) |
void | setYPos (double y) |
void | setZPos (double z) |
void | TopocentricVelocity (double vtopo[], dms gt) |
QString | translatedCountry () const |
QString | translatedName () const |
QString | translatedProvince () const |
double | TZ () const |
double | TZ0 () const |
TimeZoneRule * | tzrule () const |
KStarsDateTime | UTtoLT (const KStarsDateTime &ut) const |
double | xPos () const |
double | yPos () const |
double | zPos () const |
~GeoLocation () |
Detailed Description
Contains all relevant information for specifying a location on Earth: City Name, State/Province name, Country Name, Longitude, Latitude, Elevation, Time Zone, and Daylight Savings Time rule.Relevant data about an observing location on Earth.
- Version:
- 1.0
Definition at line 39 of file geolocation.h.
Constructor & Destructor Documentation
GeoLocation::GeoLocation | ( | ) |
GeoLocation::GeoLocation | ( | const GeoLocation & | g | ) |
Copy Constructor.
- Parameters:
-
g the GeoLocation to duplicate
Definition at line 30 of file geolocation.cpp.
GeoLocation::GeoLocation | ( | GeoLocation * | g | ) |
Copy Constructor.
Differs from the above function only in argument type.
- Parameters:
-
g pointer to the GeoLocation to duplicate
Definition at line 44 of file geolocation.cpp.
GeoLocation::GeoLocation | ( | dms | lng, | |
dms | lat, | |||
QString | name = "Nowhere" , |
|||
QString | province = "Nowhere" , |
|||
QString | country = "Nowhere" , |
|||
double | TZ = 0 , |
|||
TimeZoneRule * | TZrule = NULL , |
|||
int | iEllips = 4 , |
|||
double | hght = -10 | |||
) |
Constructor using dms objects to specify longitude and latitude.
- Parameters:
-
lng the longitude lat the latitude name the name of the city/town/location province the name of the province/US state country the name of the country TZ the base time zone offset from Greenwich, UK TZrule pointer to the daylight savings time rule iEllips type of geodetic ellipsoid model hght the elevation above sea level (in meters?)
Definition at line 58 of file geolocation.cpp.
GeoLocation::GeoLocation | ( | double | lng, | |
double | lat, | |||
QString | name = "Nowhere" , |
|||
QString | province = "Nowhere" , |
|||
QString | country = "Nowhere" , |
|||
double | TZ = 0 , |
|||
TimeZoneRule * | TZrule = NULL , |
|||
int | iEllips = 4 , |
|||
double | hght = -10 | |||
) |
Constructor using doubles to specify longitude and latitude.
- Parameters:
-
lng the longitude lat the latitude name the name of the city/town/location province the name of the province/US state country the name of the country TZ the base time zone offset from Greenwich, UK TZrule pointer to the daylight savings time rule iEllips type of geodetic ellipsoid model hght the elevation above sea level (in meters?)
Definition at line 73 of file geolocation.cpp.
GeoLocation::GeoLocation | ( | double | x, | |
double | y, | |||
double | z, | |||
QString | name = "Nowhere" , |
|||
QString | province = "Nowhere" , |
|||
QString | country = "Nowhere" , |
|||
double | TZ = 0 , |
|||
TimeZoneRule * | TZrule = NULL , |
|||
int | iEllips = 4 | |||
) |
Constructor using doubles to specify X, Y and Z referred to the center of the Earth.
- Parameters:
-
x the x-position, in m y the y-position, in m z the z-position, in m name the name of the city/town/location province the name of the province/US state country the name of the country TZ the base time zone offset from Greenwich, UK TZrule pointer to the daylight savings time rule iEllips type of geodetic ellipsoid model
Definition at line 88 of file geolocation.cpp.
GeoLocation::~GeoLocation | ( | ) | [inline] |
Member Function Documentation
void GeoLocation::cartToGeod | ( | void | ) |
Converts from cartesian coordinates in meters to longitude, latitude and height on a standard geoid for the Earth.
The geoid is characterized by two parameters: the semimajor axis and the flattening.
- Note:
- The astronomical zenith is defined as the perpendicular to the real geoid. The geodetic zenith is the perpendicular to the standard geoid. Both zeniths differ due to local gravitational anomalies.
Definition at line 142 of file geolocation.cpp.
void GeoLocation::changeEllipsoid | ( | int | i | ) |
Update Latitude, Longitude and Height according to new ellipsoid.
These are computed from XYZ which do NOT change on changing the ellipsoid. i
= index to identify the ellipsoid
Definition at line 135 of file geolocation.cpp.
QString GeoLocation::country | ( | ) | const [inline] |
int GeoLocation::ellipsoid | ( | ) | const [inline] |
- Returns:
- index identifying the geodetic ellipsoid model
Definition at line 120 of file geolocation.h.
QString GeoLocation::fullName | ( | ) | const |
- Returns:
- comma-separated city, province, country names (each localized)
Definition at line 102 of file geolocation.cpp.
void GeoLocation::geodToCart | ( | void | ) |
Converts from longitude, latitude and height on a standard geoid of the Earth to cartesian coordinates in meters.
The geoid is characterized by two parameters: the semimajor axis and the flattening.
- Note:
- The astronomical zenith is defined as the perpendicular to the real geoid. The geodetic zenith is the perpendicular to the standard geoid. Both zeniths differ due to local gravitational anomalies.
Definition at line 170 of file geolocation.cpp.
Definition at line 295 of file geolocation.h.
double GeoLocation::height | ( | ) | const [inline] |
const dms* GeoLocation::lat | ( | ) | const [inline] |
const dms* GeoLocation::lng | ( | ) | const [inline] |
Definition at line 296 of file geolocation.h.
KStarsDateTime GeoLocation::LTtoUT | ( | const KStarsDateTime & | lt | ) | const [inline] |
Definition at line 299 of file geolocation.h.
QString GeoLocation::name | ( | ) | const [inline] |
QString GeoLocation::province | ( | ) | const [inline] |
void GeoLocation::reset | ( | GeoLocation * | g | ) |
Set location data to that of the GeoLocation pointed to by argument.
Similar to copy constructor.
- Parameters:
-
g pointer to the GeoLocation which should be duplicated.
Definition at line 113 of file geolocation.cpp.
void GeoLocation::setCountry | ( | const QString & | n | ) | [inline] |
Set Country name according to argument.
n
new country name
Definition at line 239 of file geolocation.h.
void GeoLocation::setEllipsoid | ( | int | i | ) |
The geoid is an elliposid which fits the shape of the Earth.
It is characterized by two parameters: the semimajor axis and the flattening.
index
is the index which allows to identify the parameters for the chosen elliposid. 1="IAU76", 2="GRS80", 3="MERIT83", 4="WGS84", 5="IERS89"};
Definition at line 127 of file geolocation.cpp.
void GeoLocation::setHeight | ( | double | hg | ) | [inline] |
Set elevation above sea level.
- Parameters:
-
hg the new elevation (meters)
Definition at line 193 of file geolocation.h.
void GeoLocation::setLat | ( | double | l | ) | [inline] |
Set latitude according to argument.
Differs from above function only in argument type.
- Parameters:
-
l the new latitude
Definition at line 185 of file geolocation.h.
void GeoLocation::setLat | ( | dms | l | ) | [inline] |
Set latitude according to dms argument.
- Parameters:
-
l the new latitude
Definition at line 176 of file geolocation.h.
void GeoLocation::setLong | ( | double | l | ) | [inline] |
Set longitude according to argument.
Differs from above function only in argument type.
- Parameters:
-
l the new longitude
Definition at line 168 of file geolocation.h.
void GeoLocation::setLong | ( | dms | l | ) | [inline] |
Set longitude according to dms argument.
- Parameters:
-
l the new longitude
Definition at line 160 of file geolocation.h.
void GeoLocation::setName | ( | const QString & | n | ) | [inline] |
void GeoLocation::setProvince | ( | const QString & | n | ) | [inline] |
Set Province name according to argument.
n
new province name
Definition at line 234 of file geolocation.h.
void GeoLocation::setTZ | ( | double | tz | ) | [inline] |
Sets Time Zone according to argument.
tz
new timezone offset
Definition at line 244 of file geolocation.h.
void GeoLocation::setTZrule | ( | TimeZoneRule * | tzr | ) | [inline] |
Sets DST rule pointer according to argument.
txr
pointer to the new DST rule
Definition at line 249 of file geolocation.h.
void GeoLocation::setXPos | ( | double | x | ) | [inline] |
void GeoLocation::setYPos | ( | double | y | ) | [inline] |
void GeoLocation::setZPos | ( | double | z | ) | [inline] |
void GeoLocation::TopocentricVelocity | ( | double | vtopo[], | |
dms | gt | |||
) |
Definition at line 185 of file geolocation.cpp.
QString GeoLocation::translatedCountry | ( | ) | const [inline] |
QString GeoLocation::translatedName | ( | ) | const [inline] |
QString GeoLocation::translatedProvince | ( | ) | const [inline] |
double GeoLocation::TZ | ( | ) | const [inline] |
double GeoLocation::TZ0 | ( | ) | const [inline] |
TimeZoneRule* GeoLocation::tzrule | ( | ) | const [inline] |
KStarsDateTime GeoLocation::UTtoLT | ( | const KStarsDateTime & | ut | ) | const [inline] |
Definition at line 298 of file geolocation.h.
double GeoLocation::xPos | ( | ) | const [inline] |
double GeoLocation::yPos | ( | ) | const [inline] |
double GeoLocation::zPos | ( | ) | const [inline] |
The documentation for this class was generated from the following files: