1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/map/geocentric.h
2018-05-17 22:41:56 +02:00

30 lines
562 B
C++

#ifndef GEOCENTRIC_H
#define GEOCENTRIC_H
#include <cmath>
#include "common/coordinates.h"
class Ellipsoid;
class Point3D {
public:
Point3D() : _x(NAN), _y(NAN), _z(NAN) {}
Point3D(double x, double y, double z) : _x(x), _y(y), _z(z) {}
double x() const {return _x;}
double y() const {return _y;}
double z() const {return _z;}
private:
double _x;
double _y;
double _z;
};
namespace Geocentric {
Point3D fromGeodetic(const Coordinates &c, const Ellipsoid *e);
Coordinates toGeodetic(const Point3D &p, const Ellipsoid *e);
}
#endif // GEOCENTRIC_H