#include "GeoPoint3D.h"

GeoPoint3D::GeoPoint3D(QObject *parent)
    : QObject(parent), ROSGeoPoint() {}

GeoPoint3D::GeoPoint3D(double latitude, double longitude, double altitude, QObject *parent)
    : QObject(parent), ROSGeoPoint(latitude, longitude, altitude)
{}

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

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

GeoPoint3D::GeoPoint3D(const QGeoCoordinate &p, QObject *parent)
    : QObject(parent), ROSGeoPoint(p.latitude(), p.longitude(), p.altitude())
{}

GeoPoint3D *GeoPoint3D::Clone() const
{
    return new GeoPoint3D(*this);
}

GeoPoint3D &GeoPoint3D::operator=(const GeoPoint3D &p)
{
    this->setLatitude(p.latitude());
    this->setLongitude(p.longitude());
    this->setAltitude(p.altitude());

    return *this;
}
GeoPoint3D &GeoPoint3D::operator=(const QGeoCoordinate &p)
{
    this->setLatitude(p.latitude());
    this->setLongitude(p.longitude());
    this->setAltitude(p.altitude());

    return *this;
}
