85 lines
3.1 KiB
C++
85 lines
3.1 KiB
C++
/*! \file piellipsoidmodel.h
|
|
* \ingroup Geo
|
|
* \~\brief
|
|
* \~english Earth ellipsoid models
|
|
* \~russian Модели земного эллипсоида
|
|
*/
|
|
/*
|
|
PIP - Platform Independent Primitives
|
|
Contains geo ellipsoid models
|
|
Andrey Bychkov work.a.b@yandex.ru
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef PIELLIPSOIDMODEL_H
|
|
#define PIELLIPSOIDMODEL_H
|
|
|
|
|
|
#include "pimathbase.h"
|
|
|
|
//! \ingroup Geo
|
|
//! \~\brief
|
|
//! \~english Reference ellipsoid parameters used by geographic calculations.
|
|
//! \~russian Параметры опорного эллипсоида для географических вычислений.
|
|
class PIP_EXPORT PIEllipsoidModel {
|
|
public:
|
|
//! \~english Constructs an empty ellipsoid description.
|
|
//! \~russian Создает пустое описание эллипсоида.
|
|
PIEllipsoidModel();
|
|
|
|
//! \~english Returns squared eccentricity.
|
|
//! \~russian Возвращает квадрат эксцентриситета.
|
|
double eccSquared() const { return eccentricity * eccentricity; }
|
|
|
|
//! \~english Returns semi-minor axis in meters.
|
|
//! \~russian Возвращает малую полуось в метрах.
|
|
double b() const { return a * sqrt(1 - eccSquared()); }
|
|
|
|
//! \~english Returns the WGS84 reference ellipsoid.
|
|
//! \~russian Возвращает опорный эллипсоид WGS84.
|
|
static PIEllipsoidModel WGS84Ellipsoid();
|
|
|
|
//! \~english Returns the PZ-90 reference ellipsoid.
|
|
//! \~russian Возвращает опорный эллипсоид ПЗ-90.
|
|
static PIEllipsoidModel PZ90Ellipsoid();
|
|
|
|
//! \~english Returns the GPS ellipsoid variant used by this module.
|
|
//! \~russian Возвращает вариант GPS-эллипсоида, используемый в этом модуле.
|
|
static PIEllipsoidModel GPSEllipsoid();
|
|
|
|
//! \~english Returns the Krasovskiy reference ellipsoid.
|
|
//! \~russian Возвращает опорный эллипсоид Красовского.
|
|
static PIEllipsoidModel KrasovskiyEllipsoid();
|
|
|
|
//! \~english Semi-major axis in meters.
|
|
//! \~russian Большая полуось в метрах.
|
|
double a;
|
|
|
|
//! \~english Flattening coefficient.
|
|
//! \~russian Коэффициент сжатия.
|
|
double flattening;
|
|
|
|
//! \~english First eccentricity.
|
|
//! \~russian Первый эксцентриситет.
|
|
double eccentricity;
|
|
|
|
//! \~english Angular velocity in radians per second.
|
|
//! \~russian Угловая скорость в радианах в секунду.
|
|
double angVelocity;
|
|
};
|
|
|
|
|
|
#endif // PIELLIPSOIDMODEL_H
|