Geodetic conversions transfered to Transformer class

This commit is contained in:
Klaus Basan
2013-04-19 19:17:48 +02:00
parent 8ffa443a69
commit f98ec80680
3 changed files with 203 additions and 11 deletions

View File

@@ -30,11 +30,72 @@ namespace Geo
class CCoordinateTransformation
{
private:
/*!
* \brief Equatorial radius of WGS84 ellipsoid (6378137 m)
* \return
*/
static const qreal &EarthRadiusMeters()
{
static qreal erm = 6378137.0;
return erm;
}
/*!
* \brief Flattening of WGS84 ellipsoid (1/298.257223563)
* \return
*/
static const qreal &Flattening()
{
static qreal f = 1/298.257223563;
return f;
}
/*!
* \brief First eccentricity squared
* \return
*/
static const qreal &e2()
{
static qreal e2 = (Flattening() * (2 - Flattening()));
return e2;
}
/*!
* \brief First eccentricity to power of four
* \return
*/
static const qreal &e4()
{
static qreal e4 = BlackMisc::Math::CMath::square(e2());
return e4;
}
/*!
* \brief First eccentricity squared absolute
* \return
*/
static const qreal &e2abs()
{
static qreal e2abs = abs(e2());
return e2abs;
}
/*!
* \brief Eccentricity e2m
* \return
*/
static const qreal &e2m()
{
static qreal e2m = BlackMisc::Math::CMath::square(1 - Flattening());
return e2m;
}
/*!
* \brief Default constructor, avoid object instantiation
*/
CCoordinateTransformation() {}
public:
/*!
* \brief NED to ECEF
@@ -50,6 +111,13 @@ public:
*/
static CCoordinateNed toNed(const CCoordinateEcef &ecef, const CCoordinateGeodetic &geo);
/*!
* \brief ECEF to Geodetic
* \param geo
* \return
*/
static CCoordinateGeodetic toGeodetic(const CCoordinateEcef &ecef);
};
} // namespace