#pragma once

#include "ros_bridge/include/JsonMethodes.h"
#include "ros_bridge/include/MessageBaseClass.h"
#include "ros_bridge/include/GenericMessages.h"

#include <QObject>
typedef ROSBridge::MessageBaseClass ROSMsg;
typedef ROSBridge::GenericMessages::GeographicMsgs::GeoPoint ROSGeoPoint;
namespace MsgGroups = ROSBridge::MessageGroups;
class GeoPoint3D : public QObject, public ROSGeoPoint
{
    Q_OBJECT
public:
    typedef MsgGroups::GeoPointGroup Group;

    explicit GeoPoint3D(QObject *parent = nullptr)
        : QObject(parent), ROSGeoPoint() {}
    explicit GeoPoint3D(double latitude,
                        double longitude,
                        double altitude,
                        QObject *parent = nullptr)
        : QObject(parent), ROSGeoPoint(latitude, longitude, altitude)
    {}
    explicit GeoPoint3D(const GeoPoint3D& p,
                        QObject *parent = nullptr)
        : QObject(parent), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
    {}
    explicit GeoPoint3D(const ROSGeoPoint& p,
                        QObject *parent = nullptr)
        : QObject(parent), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
    {}

    virtual GeoPoint3D *Clone() const override;
    GeoPoint3D &operator=(const GeoPoint3D&p);

};
