Updraft  1.0
Open source glider flight visualisation tool.
Updraft::Util::Location Class Reference

Class that represents position on (or above) earth. More...

#include <location.h>

List of all members.

Public Member Functions

 Location ()
qreal lat_radians () const
 Latitude in radians.
qreal lon_radians () const
 Longitude in radians.
void latFromRadians (qreal radians)
 Set latitude from radians.
void lonFromRadians (qreal radians)
 Set longitude from radians.
void latFromDMS (qreal d, qreal m, qreal s, char sign)
 Set latitude from degrees, minutes and seconds.
void lonFromDMS (qreal d, qreal m, qreal s, char sign)
 Set longitude from degrees, minutes and seconds.
void latToDMS (int *d, int *m, qreal *s, char *sign) const
 Retrieves degrees, minutes and seconds from latitude.
void lonToDMS (int *d, int *m, qreal *s, char *sign) const
 Retrieves degrees, minutes and seconds from longitude.
QString latToString () const
 Return latitude as string.
QString lonToString () const
 Return longitude as string.

Public Attributes

qreal lat
qreal lon
qreal alt

Static Private Member Functions

static QString dmsToString (int d, int m, qreal s, char sign)

Detailed Description

Class that represents position on (or above) earth.

Latitude and longitude are in degrees, altitude in meters.


Constructor & Destructor Documentation


Member Function Documentation

QString Updraft::Util::Location::dmsToString ( int  d,
int  m,
qreal  s,
char  sign 
) [static, private]
qreal Updraft::Util::Location::lat_radians ( ) const [inline]

Latitude in radians.

void Updraft::Util::Location::latFromDMS ( qreal  d,
qreal  m,
qreal  s,
char  sign 
)

Set latitude from degrees, minutes and seconds.

Parameters:
dDegrees
mMinutes
sSeconds
sign'N' for north or 'S' for south.
void Updraft::Util::Location::latFromRadians ( qreal  radians)

Set latitude from radians.

void Updraft::Util::Location::latToDMS ( int *  d,
int *  m,
qreal *  s,
char *  sign 
) const

Retrieves degrees, minutes and seconds from latitude.

Parameters:
dDegrees
mMinutes
sSeconds
sign'N' for north or 'S' for south

Return latitude as string.

Uses nice unicode characters for degree marks.

qreal Updraft::Util::Location::lon_radians ( ) const [inline]

Longitude in radians.

void Updraft::Util::Location::lonFromDMS ( qreal  d,
qreal  m,
qreal  s,
char  sign 
)

Set longitude from degrees, minutes and seconds.

Parameters:
dDegrees
mMinutes
sSeconds
sign'E' for east or 'W' for west.
void Updraft::Util::Location::lonFromRadians ( qreal  radians)

Set longitude from radians.

void Updraft::Util::Location::lonToDMS ( int *  d,
int *  m,
qreal *  s,
char *  sign 
) const

Retrieves degrees, minutes and seconds from longitude.

Parameters:
dDegrees
mMinutes
sSeconds
sign'E' for east or 'W' for west.

Return longitude as string.

Uses nice unicode characters for degree marks.


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines