/** * @file core.hpp * @brief Core DDS Sammel-Header * * Beinhaltet alle Core-Typen für DDS-Integration. * * STUB: Diese Datei wird normalerweise von DDS generiert. * Für die Qt6-Migration erstellen wir einen minimalen Stub. */ #pragma once #include #include #include #include namespace Core { /** * @brief GeoPosition - Stub für DDS GeoPosition * * Einfache Struktur für geographische Positionen. */ struct GeoPosition { double longitude = 0.0; double latitude = 0.0; double altitude = 0.0; GeoPosition() = default; GeoPosition(double lon, double lat, double z) : longitude(lon) , latitude(lat) , altitude(z) { } double lon() const { return longitude; } double lat() const { return latitude; } double z() const { return altitude; } void lon(double lon) { longitude = lon; } void lat(double lat) { latitude = lat; } void z(double z) { altitude = z; } void setLon(double lon) { longitude = lon; } void setLat(double lat) { latitude = lat; } void setZ(double z) { altitude = z; } }; /** * @brief GeoPosition2D - 2D GeoPosition (ohne Altitude) * * Wird für Koordinaten ohne Höheninformation verwendet. * Implizite Konversion von GeoPosition ermöglicht Downcast. */ struct GeoPosition2D { double longitude = 0.0; double latitude = 0.0; GeoPosition2D() = default; GeoPosition2D(double lon, double lat) : longitude(lon) , latitude(lat) { } // Implizite Konversion von GeoPosition (Downcast ignoriert altitude) GeoPosition2D(const GeoPosition& pos) : longitude(pos.lon()) , latitude(pos.lat()) { } double lon() const { return longitude; } double lat() const { return latitude; } void lon(double lon) { longitude = lon; } void lat(double lat) { latitude = lat; } void setLon(double lon) { longitude = lon; } void setLat(double lat) { latitude = lat; } }; /** * @brief ostream operator für GeoPosition (Debug/Logging) */ inline std::ostream& operator<<(std::ostream& os, const GeoPosition& pos) { os << "GeoPosition(lon=" << pos.lon() << ", lat=" << pos.lat() << ", alt=" << pos.z() << ")"; return os; } /** * @brief ostream operator für GeoPosition2D (Debug/Logging) */ inline std::ostream& operator<<(std::ostream& os, const GeoPosition2D& pos) { os << "GeoPosition2D(lon=" << pos.lon() << ", lat=" << pos.lat() << ")"; return os; } } // namespace Core