#include "GeoPoint3D.h"

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

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

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

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

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

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

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

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

    return *this;
}
