GeoPoint3D.h 1.25 KB
Newer Older
1 2
#pragma once

3 4
#include "ros_bridge/include/JsonMethodes.h"
#include "ros_bridge/include/MessageBaseClass.h"
Valentin Platzgummer's avatar
Valentin Platzgummer committed
5
#include "ros_bridge/include/GenericMessages.h"
6 7

#include <QObject>
Valentin Platzgummer's avatar
Valentin Platzgummer committed
8 9
typedef ROSBridge::MessageBaseClass ROSMsg;
typedef ROSBridge::GenericMessages::GeographicMsgs::GeoPoint ROSGeoPoint;
10
namespace MsgGroups = ROSBridge::MessageGroups;
Valentin Platzgummer's avatar
Valentin Platzgummer committed
11
class GeoPoint3D : public QObject, public ROSGeoPoint
12 13 14
{
    Q_OBJECT
public:
15
    typedef MsgGroups::GeoPointGroup Group;
16 17

    explicit GeoPoint3D(QObject *parent = nullptr)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
18
        : QObject(parent), ROSGeoPoint() {}
19 20 21 22
    explicit GeoPoint3D(double latitude,
                        double longitude,
                        double altitude,
                        QObject *parent = nullptr)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
23
        : QObject(parent), ROSGeoPoint(latitude, longitude, altitude)
24 25 26
    {}
    explicit GeoPoint3D(const GeoPoint3D& p,
                        QObject *parent = nullptr)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
27
        : QObject(parent), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
28
    {}
29
    explicit GeoPoint3D(const ROSGeoPoint& p,
30
                        QObject *parent = nullptr)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
31
        : QObject(parent), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
32 33 34 35 36 37
    {}

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

};