• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Public Member Functions | List of all members
GeoLocation Class Reference

#include <geolocation.h>

Public Member Functions

 GeoLocation (dms lng, dms lat, const QString &name="Nowhere", const QString &province="Nowhere", const QString &country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4, double hght=-10)
 
 GeoLocation (double x, double y, double z, const QString &name="Nowhere", const QString &province="Nowhere", const QString &country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4)
 
void cartToGeod ()
 
void changeEllipsoid (int i)
 
QString country () const
 
int ellipsoid () const
 
QString fullName () const
 
void geodToCart ()
 
dms GSTtoLST (const dms &gst) const
 
double height () const
 
const dms * lat () const
 
double LMST (double jd)
 
const dms * lng () const
 
dms LSTtoGST (const dms &lst) const
 
KStarsDateTime LTtoUT (const KStarsDateTime &lt) const
 
QString name () const
 
QString province () const
 
void setCountry (const QString &n)
 
void setEllipsoid (int i)
 
void setHeight (double hg)
 
void setLat (dms l)
 
void setLong (dms l)
 
void setName (const QString &n)
 
void setProvince (const QString &n)
 
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 ()
 
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.

Author
Jason Harris
Version
1.0

Definition at line 39 of file geolocation.h.

Constructor & Destructor Documentation

GeoLocation::GeoLocation ( dms  lng,
dms  lat,
const QString &  name = "Nowhere",
const QString &  province = "Nowhere",
const 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
lngthe longitude
latthe latitude
namethe name of the city/town/location
provincethe name of the province/US state
countrythe name of the country
TZthe base time zone offset from Greenwich, UK
TZrulepointer to the daylight savings time rule
iEllipstype of geodetic ellipsoid model
hghtthe elevation above sea level (in meters?)

Definition at line 24 of file geolocation.cpp.

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 = NULL,
int  iEllips = 4 
)

Constructor using doubles to specify X, Y and Z referred to the center of the Earth.

Parameters
xthe x-position, in m
ythe y-position, in m
zthe z-position, in m
namethe name of the city/town/location
provincethe name of the province/US state
countrythe name of the country
TZthe base time zone offset from Greenwich, UK
TZrulepointer to the daylight savings time rule
iEllipstype of geodetic ellipsoid model

Definition at line 39 of file geolocation.cpp.

Member Function Documentation

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 96 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.

Parameters
iindex to identify the ellipsoid

Definition at line 73 of file geolocation.cpp.

QString GeoLocation::country ( ) const
inline
Returns
untranslated Country name

Definition at line 109 of file geolocation.h.

int GeoLocation::ellipsoid ( ) const
inline
Returns
index identifying the geodetic ellipsoid model

Definition at line 94 of file geolocation.h.

QString GeoLocation::fullName ( ) const
Returns
comma-separated city, province, country names (each localized)

Definition at line 56 of file geolocation.cpp.

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 124 of file geolocation.cpp.

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

Definition at line 230 of file geolocation.h.

double GeoLocation::height ( ) const
inline
Returns
elevation above seal level (meters)

Definition at line 82 of file geolocation.h.

const dms* GeoLocation::lat ( ) const
inline
Returns
pointer to the latitude dms object

Definition at line 79 of file geolocation.h.

double GeoLocation::LMST ( double  jd)

Local Mean Sidereal Time.

Parameters
jdJulian date

Definition at line 157 of file geolocation.cpp.

const dms* GeoLocation::lng ( ) const
inline
Returns
pointer to the longitude dms object

Definition at line 76 of file geolocation.h.

dms GeoLocation::LSTtoGST ( const dms &  lst) const
inline

Definition at line 231 of file geolocation.h.

KStarsDateTime GeoLocation::LTtoUT ( const KStarsDateTime &  lt) const
inline

Definition at line 234 of file geolocation.h.

QString GeoLocation::name ( ) const
inline
Returns
untranslated City name

Definition at line 97 of file geolocation.h.

QString GeoLocation::province ( ) const
inline
Returns
untranslated Province name

Definition at line 103 of file geolocation.h.

void GeoLocation::setCountry ( const QString &  n)
inline

Set Country name according to argument.

Parameters
nnew country name

Definition at line 190 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.

Parameters
iis 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 64 of file geolocation.cpp.

void GeoLocation::setHeight ( double  hg)
inline

Set elevation above sea level.

Parameters
hgthe new elevation (meters)

Definition at line 144 of file geolocation.h.

void GeoLocation::setLat ( dms  l)
inline

Set latitude according to dms argument.

Parameters
lthe new latitude

Definition at line 136 of file geolocation.h.

void GeoLocation::setLong ( dms  l)
inline

Set longitude according to dms argument.

Parameters
lthe new longitude

Definition at line 128 of file geolocation.h.

void GeoLocation::setName ( const QString &  n)
inline

Set City name according to argument.

Parameters
nnew city name

Definition at line 180 of file geolocation.h.

void GeoLocation::setProvince ( const QString &  n)
inline

Set Province name according to argument.

Parameters
nnew province name

Definition at line 185 of file geolocation.h.

void GeoLocation::setXPos ( double  x)
inline

Set X.

Parameters
xthe new x-position (meters)

Definition at line 152 of file geolocation.h.

void GeoLocation::setYPos ( double  y)
inline

Set Y.

Parameters
ythe new y-position (meters)

Definition at line 159 of file geolocation.h.

void GeoLocation::setZPos ( double  z)
inline

Set Z.

Parameters
zthe new z-position (meters)

Definition at line 166 of file geolocation.h.

void GeoLocation::TopocentricVelocity ( double  vtopo[],
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.
gtGreenwich sideral time for which we want to compute the topocentric velocity.

Definition at line 139 of file geolocation.cpp.

QString GeoLocation::translatedCountry ( ) const
Returns
translated Country name

Definition at line 92 of file geolocation.cpp.

QString GeoLocation::translatedName ( ) const
Returns
translated City name

Definition at line 78 of file geolocation.cpp.

QString GeoLocation::translatedProvince ( ) const
Returns
translated Province name

Definition at line 88 of file geolocation.cpp.

double GeoLocation::TZ ( ) const
inline
Returns
time zone, including any DST correction.

Definition at line 121 of file geolocation.h.

double GeoLocation::TZ0 ( ) const
inline
Returns
time zone without DST correction

Definition at line 118 of file geolocation.h.

TimeZoneRule* GeoLocation::tzrule ( )
inline
Returns
pointer to time zone rule object

Definition at line 124 of file geolocation.h.

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

Definition at line 233 of file geolocation.h.

double GeoLocation::xPos ( ) const
inline
Returns
X position in m

Definition at line 85 of file geolocation.h.

double GeoLocation::yPos ( ) const
inline
Returns
Y position in m

Definition at line 88 of file geolocation.h.

double GeoLocation::zPos ( ) const
inline
Returns
Z position in m

Definition at line 91 of file geolocation.h.


The documentation for this class was generated from the following files:
  • geolocation.h
  • geolocation.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal