This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/geo/EarthPos.h
2018-10-25 11:50:12 +02:00

41 lines
917 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © 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