41 lines
917 B
C++
41 lines
917 B
C++
/*
|
||
* © Copyright 2014 – Urheberrechtshinweis
|
||
* Alle Rechte vorbehalten / All Rights Reserved
|
||
*
|
||
* Programmcode ist urheberrechtlich geschuetzt.
|
||
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
|
||
* Keine Verwendung ohne explizite Genehmigung.
|
||
* (vgl. § 106 ff UrhG / § 97 UrhG)
|
||
*/
|
||
|
||
#ifndef EARTHPOS_H
|
||
#define EARTHPOS_H
|
||
|
||
/** describes the location on the earth's surface */
|
||
struct EarthPos {
|
||
|
||
double lat;
|
||
|
||
double lon;
|
||
|
||
/** height above sea level */
|
||
float height;
|
||
|
||
/** empty ctor */
|
||
EarthPos() : lat(NAN), lon(NAN), height(NAN) {
|
||
;
|
||
}
|
||
|
||
/** ctor with values */
|
||
EarthPos(const double lat, const double lon, const float height) : lat(lat), lon(lon), height(height) {
|
||
;
|
||
}
|
||
|
||
std::string asString() const {
|
||
return "(lat: " + std::to_string(lat) + "°, lon: " + std::to_string(lon) + "°, alt: " + std::to_string(height) + ")";
|
||
}
|
||
|
||
};
|
||
|
||
#endif // EARTHPOS_H
|