• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

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>

List of all members.


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 &lt) 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.

Author:
Jason Harris
Version:
1.0

Definition at line 39 of file geolocation.h.


Constructor & Destructor Documentation

GeoLocation::GeoLocation (  ) 

Default constructor; sets coordinates to zero.

Definition at line 25 of file geolocation.cpp.

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]

Destructor (empty).

Definition at line 98 of file geolocation.h.


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.
Algorithm is from "GPS Satellite Surveying", A. Leick, page 184.

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]

Returns:
untranslated Country name

Definition at line 136 of file geolocation.h.

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.
Algorithm is from "GPS Satellite Surveying", A. Leick, page 184.

Definition at line 170 of file geolocation.cpp.

dms GeoLocation::GSTtoLST ( const dms &  gst  )  const [inline]

Definition at line 295 of file geolocation.h.

double GeoLocation::height (  )  const [inline]

Returns:
elevation above seal level (meters)

Definition at line 108 of file geolocation.h.

const dms* GeoLocation::lat (  )  const [inline]

Returns:
pointer to the latitude dms object

Definition at line 105 of file geolocation.h.

const dms* GeoLocation::lng (  )  const [inline]

Returns:
pointer to the longitude dms object

Definition at line 102 of file geolocation.h.

dms GeoLocation::LSTtoGST ( const dms &  lst  )  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]

Returns:
untranslated City name

Definition at line 124 of file geolocation.h.

QString GeoLocation::province (  )  const [inline]

Returns:
untranslated Province name

Definition at line 130 of file geolocation.h.

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]

Set City name according to argument.

n new city name

Definition at line 229 of file geolocation.h.

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]

Set X.

Parameters:
x the new x-position (meters)

Definition at line 201 of file geolocation.h.

void GeoLocation::setYPos ( double  y  )  [inline]

Set Y.

Parameters:
y the new y-position (meters)

Definition at line 208 of file geolocation.h.

void GeoLocation::setZPos ( double  z  )  [inline]

Set Z.

Parameters:
z the new z-position (meters)

Definition at line 215 of file geolocation.h.

void GeoLocation::TopocentricVelocity ( double  vtopo[],
dms  gt 
)

Definition at line 185 of file geolocation.cpp.

QString GeoLocation::translatedCountry (  )  const [inline]

Returns:
translated Country name

Definition at line 139 of file geolocation.h.

QString GeoLocation::translatedName (  )  const [inline]

Returns:
translated City name

Definition at line 127 of file geolocation.h.

QString GeoLocation::translatedProvince (  )  const [inline]

Returns:
translated Province name

Definition at line 133 of file geolocation.h.

double GeoLocation::TZ (  )  const [inline]

Returns:
time zone, including any DST correction.

Definition at line 151 of file geolocation.h.

double GeoLocation::TZ0 (  )  const [inline]

Returns:
time zone without DST correction

Definition at line 147 of file geolocation.h.

TimeZoneRule* GeoLocation::tzrule (  )  const [inline]

Returns:
pointer to time zone rule object

Definition at line 155 of file geolocation.h.

KStarsDateTime GeoLocation::UTtoLT ( const KStarsDateTime &  ut  )  const [inline]

Definition at line 298 of file geolocation.h.

double GeoLocation::xPos (  )  const [inline]

Returns:
X position in m

Definition at line 111 of file geolocation.h.

double GeoLocation::yPos (  )  const [inline]

Returns:
Y position in m

Definition at line 114 of file geolocation.h.

double GeoLocation::zPos (  )  const [inline]

Returns:
Z position in m

Definition at line 117 of file geolocation.h.


The documentation for this class was generated from the following files:
  • geolocation.h
  • geolocation.cpp

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal