List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
utl::ReferenceEllipsoid Class Reference

Reference ellipsoids for UTM transformations. More...

#include <utl/ReferenceEllipsoid.h>

Classes

class  InvalidEllipsoidException
 Report request for non-existent ellipsoid. More...
 

Public Types

enum  EllipsoidID { eWGS84 = 1 }
 ID's of known reference ellipsoid's. More...
 
typedef boost::tuple< double,
double, double > 
Triple
 Coordinate triple. More...
 

Public Member Functions

double GetEccentricity2 () const
 Get eccentricity. More...
 
const CoordinateSystemPtr GetECEF () const
 Get the ECEF. More...
 
double GetEquatorialRadius () const
 Get equatorial radius ( $ a $) More...
 
double GetFlattening () const
 Get flattening. More...
 
double GetPolarRadius () const
 Get Polar radius ( $ b $) More...
 
Point LatitudeLongitudeHeightToPoint (double const latitude, double const longitude, double const height) const
 Convert Lat/Long/Height to Point. More...
 
Point LatitudeLongitudeHeightToPoint (const Triple &theGeodeticCoordinates) const
 Convert Lat/Long/Height to Point. More...
 
bool operator!= (const ReferenceEllipsoid &r) const
 compare for inequality More...
 
bool operator== (const ReferenceEllipsoid &r) const
 compare for equality More...
 
Triple PointToLatitudeLongitudeHeight (const Point &thePoint) const
 Convert Point to Lat/Long/Height. More...
 
 ReferenceEllipsoid (double theEquatorialRadius, double theEccentricity2, const CoordinateSystemPtr theECEF)
 Construct reference ellipsoid from equatorial radius, eccentricity, and coordinate system. More...
 
boost::tuple
< TransformationMatrix,
TransformationMatrix
TransformECEFToLocalSystem (const Point &theOrigin) const
 Translation and rotation to go to local coordinate system. More...
 

Static Public Member Functions

static const ReferenceEllipsoidGet (const EllipsoidID theID)
 Get known ellipsoid by registered ID. More...
 
static EllipsoidID GetEllipsoidIDFromString (const std::string &str)
 Get EllipsoidID from string. More...
 
static const ReferenceEllipsoidGetWGS84 ()
 Get the auger standard ellipsoid: wgs84. More...
 
static void InitWithECEF (const CoordinateSystemPtr &theECEF)
 Initialise the registry specifying the ECEF (instead of the Root CS) More...
 

Private Types

typedef std::map< EllipsoidID,
const ReferenceEllipsoid
Registry
 

Private Member Functions

double GetRn (const double phi) const
 
 ReferenceEllipsoid ()
 

Static Private Member Functions

static void RegisterOneEllipsoid (const EllipsoidID theID, double theEquatorialRadius, double theEccentricity, const CoordinateSystemPtr &theECEF)
 

Private Attributes

double fEccentricity2
 first eccentricity squared $ e^2$ More...
 
CoordinateSystemPtr fECEF
 Coordinate system to use as ECEF (Earth Centred Earth Fixed) More...
 
double fEquatorialRadius
 Radius at equator. More...
 

Static Private Attributes

static RegistrygfRegistry = 0
 

Detailed Description

Reference ellipsoids for UTM transformations.

We only use global geodetic data, so the ellipsoids satisfy

centre coincides with centre of the earth

rotational ellipsoids (two of the three major axis are the same)

axis of rotational symmetry aligned with axis of rotation of the earth.

Uses standard auger units for length and angles.

Author
Lukas Nellen
Date
03 Aug 2003
Todo:
Calculate tangent plane at a given point in a given coordinate system.

Definition at line 39 of file ReferenceEllipsoid.h.

Member Typedef Documentation

Definition at line 140 of file ReferenceEllipsoid.h.

typedef boost::tuple<double, double, double> utl::ReferenceEllipsoid::Triple

Coordinate triple.

Definition at line 46 of file ReferenceEllipsoid.h.

Member Enumeration Documentation

ID's of known reference ellipsoid's.

Enumerator
eWGS84 

Definition at line 43 of file ReferenceEllipsoid.h.

Constructor & Destructor Documentation

utl::ReferenceEllipsoid::ReferenceEllipsoid ( double  theEquatorialRadius,
double  theEccentricity2,
const CoordinateSystemPtr  theECEF 
)
inline

Construct reference ellipsoid from equatorial radius, eccentricity, and coordinate system.

Construct reference ellipsoid from

  • equatorial radius
  • eccentricity
  • coordinate system (ECEF at the center of the ellipsoid

This constructor should only be used for tests. Regular code should get ReferenceEllipsoids from the registry using a well-known id or, in special cases, string.

Definition at line 62 of file ReferenceEllipsoid.h.

utl::ReferenceEllipsoid::ReferenceEllipsoid ( )
private

Member Function Documentation

const ReferenceEllipsoid & ReferenceEllipsoid::Get ( const EllipsoidID  theID)
static

Get known ellipsoid by registered ID.

Provide a ReferenceEllipsoid based on its well-known name. If the underlying registry is not yet initialised, initialise it assuming that the root coordinate system is the ECEF to use.

Definition at line 186 of file ReferenceEllipsoid.cc.

References ERROR.

Referenced by FdSimEventCheckerOG::FdSimEventChecker::CalculateXmaxViewingAngle(), testAugerCoordinateSystem::checkOnePoint(), TelescopeSimulatorLX::FDsimG4Materials::ConstructTableOfMaterials(), utl::AugerCoordinateSystemConstructor< Policy >::Create(), atm::ParametricXMLMieModel::EvaluateMieAttenuation(), atm::NonParametricXMLMieModel::EvaluateMieAttenuation(), atm::ParametricXMLMieModel::GetAttenuationLength(), atm::NonParametricXMLMieModel::GetAttenuationLength(), utl::RadioGeometryUtilities::GetCoreAtObservationLevel(), atm::ParametricXMLMieModel::GetVerticalAerosolOpticalDepth(), GetWGS84(), atm::InclinedAtmosphericProfile::InclinedAtmosphericProfile(), fwk::CoordinateSystemRegistry::Init(), atm::ParametricXMLMieModel::Init(), atm::InclinedAtmosphericProfile::IntegratedGrammage(), testUTMPoint::testAssignement(), testUTMPoint::testConstructors(), testAugerCoordinateSystem::testCS(), testReferenceEllipsoid::testEllipsoidComparison(), testReferenceEllipsoid::testEllipsoidCreation(), testReferenceEllipsoid::testGetEllipsoid0(), testReferenceEllipsoid::testGetEllipsoid999(), testMagneticFieldModel::testIGRFValues(), testReferenceEllipsoid::testLatLongConversion(), testAugerCoordinateSystem::testSiteCS(), and testUTMPoint::testUTMConversions().

double utl::ReferenceEllipsoid::GetEccentricity2 ( ) const
inline
const CoordinateSystemPtr utl::ReferenceEllipsoid::GetECEF ( ) const
inline
ReferenceEllipsoid::EllipsoidID ReferenceEllipsoid::GetEllipsoidIDFromString ( const std::string &  str)
static

Get EllipsoidID from string.

The main use of this functions is for factories that has to obtain and EllipsoidID from an external representation (e.g. from xml).

Note
If possible, the user should use the EllipsoidId directly instead of getting it from a string.
Todo:
Should use a static array of strings (if the number of ellipsoids grows).

Definition at line 241 of file ReferenceEllipsoid.cc.

References ERROR, and utl::StringEquivalent().

double utl::ReferenceEllipsoid::GetEquatorialRadius ( ) const
inline
double ReferenceEllipsoid::GetFlattening ( ) const

Get flattening.

Definition at line 17 of file ReferenceEllipsoid.cc.

References sqrt().

Referenced by testReferenceEllipsoid::testEllipsoidCreation().

double ReferenceEllipsoid::GetPolarRadius ( ) const
double ReferenceEllipsoid::GetRn ( const double  phi) const
private

Definition at line 34 of file ReferenceEllipsoid.cc.

References RdGeoCeLDFFitter::a, and sqrt().

static const ReferenceEllipsoid& utl::ReferenceEllipsoid::GetWGS84 ( )
inlinestatic
void ReferenceEllipsoid::InitWithECEF ( const CoordinateSystemPtr theCS)
static

Initialise the registry specifying the ECEF (instead of the Root CS)

Initialise the registry of reference ellipsoids. An explicit call to this method is only needed if the user wants to use a particular ECEF. In normal applications, the first call to the Get() function initialises the registry.

Throw an InitSequenceException if trying to initialise for a second time.

Definition at line 213 of file ReferenceEllipsoid.cc.

References ERROR, and utl::m.

Referenced by fwk::CoordinateSystemRegistry::Init().

Point ReferenceEllipsoid::LatitudeLongitudeHeightToPoint ( double const  latitude,
double const  longitude,
double const  height 
) const

Convert Lat/Long/Height to Point.

Convert latitude, longitude, and height information for this reference ellipsoid to a point. The point uses the ellipsoid's ECEF as its initial coordinate system.

Definition at line 100 of file ReferenceEllipsoid.cc.

Referenced by utl::UTMPoint::GetPoint(), testMagneticFieldModel::testIGRFValues(), and testReferenceEllipsoid::testLatLongConversion().

Point ReferenceEllipsoid::LatitudeLongitudeHeightToPoint ( const Triple theGeodeticCoordinates) const

Convert Lat/Long/Height to Point.

Definition at line 121 of file ReferenceEllipsoid.cc.

bool utl::ReferenceEllipsoid::operator!= ( const ReferenceEllipsoid r) const
inline

compare for inequality

Definition at line 92 of file ReferenceEllipsoid.h.

References operator==().

bool utl::ReferenceEllipsoid::operator== ( const ReferenceEllipsoid r) const
inline

compare for equality

Definition at line 83 of file ReferenceEllipsoid.h.

References fEccentricity2, fECEF, and fEquatorialRadius.

Referenced by operator!=().

ReferenceEllipsoid::Triple ReferenceEllipsoid::PointToLatitudeLongitudeHeight ( const Point thePoint) const

Convert Point to Lat/Long/Height.

Convert a point to the latitude/longitude/height triple for this reference ellipsoid.

See http://www.oc.nps.navy.mil/oc2902w/coord/coordcvt.pdf for formulae. But there is a typo in the formula when calculating the first guess for the latitude.

Definition at line 57 of file ReferenceEllipsoid.cc.

References utl::abs(), G4StationSimulatorOG::p, and sqrt().

Referenced by FdEnergyDepositFinderKG::CFMatrixCalculator::AddBinsOutsideFOV(), MultipleScatterer::AddPhotons(), FdProfileReconstructorKG::FdProfileReconstructor::AddPointsOutsideFOV(), FdProfileReconstructorKG::FdProfileReconstructor::CalculateGeometryAndDepth(), otoa::LongitudinalXmaxScanner::CalculateLightFactor(), testAugerCoordinateSystem::checkOnePoint(), FdCherenkovFinderOG::FdCherenkovFinder::CherenkovFinderAtAperture(), ShowerLightSimulatorKG::ShowerLightSimulator::CherenkovLight(), TelescopeSimulatorLX::FDsimG4Materials::ConstructTableOfMaterials(), evt::ConvertEventToEc(), atm::AnalyticalCherenkovModel::EvaluateCherenkovPhotons(), atm::LidarCloudDBModel::EvaluateCloudCoverage(), atm::AnalyticalCherenkovModel::EvaluateDirectCherenkovProbability(), atm::ParametricXMLMieModel::EvaluateMieAttenuation(), atm::NonParametricXMLMieModel::EvaluateMieAttenuation(), atm::MeasuredDBMieModel::EvaluateMieAttenuation(), atm::HumidAirRayleighModel::EvaluateRayleighAttenuation(), atm::HumidAirRayleighModel::EvaluateScatteringAngle(), otoa::Detector2ADST::FillAerosols(), otoa::FD2ADST::FillAtmosphericProfileVars(), otoa::FD2ADST::FillFdRecStations(), ShowerLightSimulatorKG::ShowerLightSimulator::FluorescenceLight(), atm::ParametricXMLRayleighModel::GDistance(), atm::ParametricXMLMieModel::GetAttenuationLength(), atm::NonParametricXMLMieModel::GetAttenuationLength(), atm::HumidAirRayleighModel::GetAttenuationLength(), atm::MeasuredDBMieModel::GetAttenuationLength(), HybridGeometryFinderWG::HybridGeometryFinder::GetDataFromPreviousFit(), atm::ParametricXMLMieModel::GetVerticalAerosolOpticalDepth(), atm::ParametricXMLMieModel::Init(), FdCherenkovFinderOG::FdCherenkovFinder::InitialCherenkov(), FdProfileReconstructorKG::FdProfileReconstructor::InitializeAtmosphere(), FdProfileFinderOG::FdProfileFinder::LightAtApertureToSize(), FdProfileConstrainedGeometryFitPG::ChiZeroRegression::MinuitFitFunc(), ShowerPhotonGeneratorOG::ShowerPhotonGenerator::PlotLDF(), ShowerLightSimulatorKG::ShowerLightSimulator::PrimaryCherenkovLight(), ConexShowerGeneratorKG::ConexShowerGenerator::Run(), GeometryExampleNS::GeometryExample::Run(), LaserLightSimulatorNA::LaserLightSimulator::Run(), ShowerLightSimulatorKG::ShowerLightSimulator::Run(), LDFTestKG::LDFTest::Run(), SdSimpleSimKG::SdSimpleSim::Run(), LightAtDiaphragmSimulatorKG::LightAtDiaphragmSimulator::Run(), ShowerPhotonGeneratorOG::ShowerPhotonGenerator::Run(), utl::UTMPoint::SetFromCartesian(), MuonProductionDepthFinderGL::MuonProductionDepthFinder::SetMuonProductionDepthHist(), and testReferenceEllipsoid::testLatLongConversion().

void ReferenceEllipsoid::RegisterOneEllipsoid ( const EllipsoidID  theID,
double  theEquatorialRadius,
double  theEccentricity,
const CoordinateSystemPtr theECEF 
)
staticprivate

Definition at line 254 of file ReferenceEllipsoid.cc.

References ok(), and WARNING.

boost::tuple< TransformationMatrix, TransformationMatrix > ReferenceEllipsoid::TransformECEFToLocalSystem ( const Point theOrigin) const

Translation and rotation to go to local coordinate system.

Calculate the transformation matrix in the ECEF for transforming the ECEF into the auger coordinate system a given point.

The local coordinate system is defined as the system with the following properties:

  • The x-y plane is parallel to the tangent plane at height = 0.
  • The y axis points north
  • The x axis completes this to a right-handed coordinate system, i.e., it points east.

This method returns the translation and rotation, where the translation is the first step of the transformation.

Definition at line 145 of file ReferenceEllipsoid.cc.

References utl::TransformationMatrix::TransformToBasis(), and utl::TransformationMatrix::Translation().

Referenced by utl::AugerCoordinateSystemConstructor< Policy >::Create().

Member Data Documentation

double utl::ReferenceEllipsoid::fEccentricity2
private

first eccentricity squared $ e^2$

Definition at line 136 of file ReferenceEllipsoid.h.

Referenced by GetEccentricity2(), and operator==().

CoordinateSystemPtr utl::ReferenceEllipsoid::fECEF
private

Coordinate system to use as ECEF (Earth Centred Earth Fixed)

Definition at line 138 of file ReferenceEllipsoid.h.

Referenced by GetECEF(), and operator==().

double utl::ReferenceEllipsoid::fEquatorialRadius
private

Radius at equator.

Definition at line 134 of file ReferenceEllipsoid.h.

Referenced by GetEquatorialRadius(), and operator==().

ReferenceEllipsoid::Registry * ReferenceEllipsoid::gfRegistry = 0
staticprivate

Definition at line 141 of file ReferenceEllipsoid.h.


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.