Updraft
1.0
Open source glider flight visualisation tool.
|
Class that represents position on (or above) earth. More...
#include <location.h>
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) |
Class that represents position on (or above) earth.
Latitude and longitude are in degrees, altitude in meters.
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.
d | Degrees |
m | Minutes |
s | Seconds |
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.
d | Degrees |
m | Minutes |
s | Seconds |
sign | 'N' for north or 'S' for south |
QString Updraft::Util::Location::latToString | ( | ) | const |
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.
d | Degrees |
m | Minutes |
s | Seconds |
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.
d | Degrees |
m | Minutes |
s | Seconds |
sign | 'E' for east or 'W' for west. |
QString Updraft::Util::Location::lonToString | ( | ) | const |
Return longitude as string.
Uses nice unicode characters for degree marks.