GeoLocation
#include <geolocation.h>
Public Member Functions | |
GeoLocation (const dms &lng, const dms &lat, const QString &name="Nowhere", const QString &province="Nowhere", const QString &country="Nowhere", double TZ=0, TimeZoneRule *TZrule=nullptr, double elevation=-10, bool readOnly=false, int iEllips=4) | |
GeoLocation (double x, double y, double z, const QString &name="Nowhere", const QString &province="Nowhere", const QString &country="Nowhere", double TZ=0, TimeZoneRule *TZrule=nullptr, double elevation=-10, bool readOnly=false, int iEllips=4) | |
void | cartToGeod () |
void | changeEllipsoid (int i) |
QString | country () const |
double | distanceTo (const dms &longitude, const dms &latitude) |
double | elevation () const |
int | ellipsoid () const |
QString | fullName () const |
void | geodToCart () |
dms | GSTtoLST (const dms &gst) const |
bool | isReadOnly () const |
const CachingDms * | lat () const |
double | LMST (double jd) |
const CachingDms * | lng () const |
dms | LSTtoGST (const dms &lst) const |
KStarsDateTime | LTtoUT (const KStarsDateTime <) const |
QString | name () const |
QString | province () const |
void | setCountry (const QString &n) |
void | setElevation (double hg) |
void | setEllipsoid (int i) |
void | setLat (const dms &l) |
void | setLong (const dms &l) |
void | setName (const QString &n) |
void | setProvince (const QString &n) |
void | setReadOnly (bool value) |
void | setTZ0 (double value) |
void | setTZRule (TimeZoneRule *value) |
void | setXPos (double x) |
void | setYPos (double y) |
void | setZPos (double z) |
void | TopocentricVelocity (double vtopo[], const dms >) |
QString | translatedCountry () const |
QString | translatedName () const |
QString | translatedProvince () const |
double | TZ () const |
double | TZ0 () const |
TimeZoneRule * | tzrule () |
KStarsDateTime | UTtoLT (const KStarsDateTime &ut) const |
double | xPos () const |
double | yPos () const |
double | zPos () const |
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 27 of file geolocation.h.
Constructor & Destructor Documentation
◆ GeoLocation() [1/2]
GeoLocation::GeoLocation | ( | const dms & | lng, |
const dms & | lat, | ||
const QString & | name = "Nowhere", | ||
const QString & | province = "Nowhere", | ||
const QString & | country = "Nowhere", | ||
double | TZ = 0, | ||
TimeZoneRule * | TZrule = nullptr, | ||
double | elevation = -10, | ||
bool | readOnly = false, | ||
int | iEllips = 4 ) |
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 elevation the elevation above sea level (in meters) readOnly whether the location is read only or updatable. iEllips type of geodetic ellipsoid model
Definition at line 12 of file geolocation.cpp.
◆ GeoLocation() [2/2]
GeoLocation::GeoLocation | ( | double | x, |
double | y, | ||
double | z, | ||
const QString & | name = "Nowhere", | ||
const QString & | province = "Nowhere", | ||
const QString & | country = "Nowhere", | ||
double | TZ = 0, | ||
TimeZoneRule * | TZrule = nullptr, | ||
double | elevation = -10, | ||
bool | readOnly = false, | ||
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 elevation the elevation above sea level (in meters) readOnly whether the location is read only or updatable. iEllips type of geodetic ellipsoid model
Definition at line 28 of file geolocation.cpp.
Member Function Documentation
◆ cartToGeod()
void GeoLocation::cartToGeod | ( | ) |
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.
Algorithm is from "GPS Satellite Surveying", A. Leick, page 184.
Definition at line 102 of file geolocation.cpp.
◆ changeEllipsoid()
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.
- Parameters
-
i index to identify the ellipsoid
Definition at line 70 of file geolocation.cpp.
◆ country()
|
inline |
- Returns
- untranslated Country name
Definition at line 124 of file geolocation.h.
◆ distanceTo()
distanceTo Return the distance in km from this location to the given longitude and latitude
- Parameters
-
longitude Target site longitude latitude Target site latitude
- Returns
- distance in kilometers between this site and the target site.
Definition at line 213 of file geolocation.cpp.
◆ elevation()
|
inline |
- Returns
- elevation above seal level (meters)
Definition at line 76 of file geolocation.h.
◆ ellipsoid()
|
inline |
- Returns
- index identifying the geodetic ellipsoid model
Definition at line 100 of file geolocation.h.
◆ fullName()
QString GeoLocation::fullName | ( | ) | const |
- Returns
- comma-separated city, province, country names (each localized)
Definition at line 46 of file geolocation.cpp.
◆ geodToCart()
void GeoLocation::geodToCart | ( | ) |
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.
Algorithm is from "GPS Satellite Surveying", A. Leick, page 184.
Definition at line 132 of file geolocation.cpp.
◆ GSTtoLST()
Definition at line 296 of file geolocation.h.
◆ isReadOnly()
bool GeoLocation::isReadOnly | ( | ) | const |
Definition at line 183 of file geolocation.cpp.
◆ lat()
|
inline |
- Returns
- pointer to the latitude dms object
Definition at line 70 of file geolocation.h.
◆ LMST()
double GeoLocation::LMST | ( | double | jd | ) |
- Returns
- Local Mean Sidereal Time.
- Parameters
-
jd Julian date
Definition at line 166 of file geolocation.cpp.
◆ lng()
|
inline |
- Returns
- pointer to the longitude dms object
Definition at line 64 of file geolocation.h.
◆ LSTtoGST()
Definition at line 300 of file geolocation.h.
◆ LTtoUT()
KStarsDateTime GeoLocation::LTtoUT | ( | const KStarsDateTime & | lt | ) | const |
Definition at line 203 of file geolocation.cpp.
◆ name()
|
inline |
- Returns
- untranslated City name
Definition at line 106 of file geolocation.h.
◆ province()
|
inline |
- Returns
- untranslated Province name
Definition at line 115 of file geolocation.h.
◆ setCountry()
|
inline |
Set Country name according to argument.
- Parameters
-
n new country name
Definition at line 245 of file geolocation.h.
◆ setElevation()
|
inline |
Set elevation above sea level.
- Parameters
-
hg the new elevation (meters)
Definition at line 189 of file geolocation.h.
◆ setEllipsoid()
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.
- Parameters
-
i 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 60 of file geolocation.cpp.
◆ setLat()
|
inline |
Set latitude according to dms argument.
- Parameters
-
l the new latitude
Definition at line 180 of file geolocation.h.
◆ setLong()
|
inline |
Set longitude according to dms argument.
- Parameters
-
l the new longitude
Definition at line 171 of file geolocation.h.
◆ setName()
|
inline |
Set City name according to argument.
- Parameters
-
n new city name
Definition at line 229 of file geolocation.h.
◆ setProvince()
|
inline |
Set Province name according to argument.
- Parameters
-
n new province name
Definition at line 237 of file geolocation.h.
◆ setReadOnly()
void GeoLocation::setReadOnly | ( | bool | value | ) |
Definition at line 188 of file geolocation.cpp.
◆ setTZ0()
|
inline |
◆ setTZRule()
|
inline |
Set Time zone rule.
- Parameters
-
value pointer to the new time zone rule
Definition at line 164 of file geolocation.h.
◆ setXPos()
|
inline |
◆ setYPos()
|
inline |
◆ setZPos()
|
inline |
◆ TopocentricVelocity()
void GeoLocation::TopocentricVelocity | ( | double | vtopo[], |
const dms & | gt ) |
Computes the velocity in km/s of an observer on the surface of the Earth referred to a system whose origin is the center of the Earth.
The X and Y axis are contained in the equator and the X axis is towards the nodes line. The Z axis is along the poles.
- Parameters
-
vtopo[] Topocentric velocity. The resultant velocity is available in this array. gt Greenwich sideral time for which we want to compute the topocentric velocity.
Definition at line 148 of file geolocation.cpp.
◆ translatedCountry()
QString GeoLocation::translatedCountry | ( | ) | const |
- Returns
- translated Country name
Definition at line 97 of file geolocation.cpp.
◆ translatedName()
QString GeoLocation::translatedName | ( | ) | const |
- Returns
- translated City name
Definition at line 76 of file geolocation.cpp.
◆ translatedProvince()
QString GeoLocation::translatedProvince | ( | ) | const |
- Returns
- translated Province name
Definition at line 90 of file geolocation.cpp.
◆ TZ()
|
inline |
- Returns
- time zone, including any DST correction.
Definition at line 142 of file geolocation.h.
◆ TZ0()
|
inline |
- Returns
- time zone without DST correction
Definition at line 136 of file geolocation.h.
◆ tzrule()
|
inline |
- Returns
- pointer to time zone rule object
Definition at line 150 of file geolocation.h.
◆ UTtoLT()
KStarsDateTime GeoLocation::UTtoLT | ( | const KStarsDateTime & | ut | ) | const |
Definition at line 193 of file geolocation.cpp.
◆ xPos()
|
inline |
- Returns
- X position in m
Definition at line 82 of file geolocation.h.
◆ yPos()
|
inline |
- Returns
- Y position in m
Definition at line 88 of file geolocation.h.
◆ zPos()
|
inline |
- Returns
- Z position in m
Definition at line 94 of file geolocation.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.