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 ( ![]() | |
double | GetFlattening () const |
Get flattening. More... | |
double | GetPolarRadius () const |
Get Polar radius ( ![]() | |
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 ReferenceEllipsoid & | Get (const EllipsoidID theID) |
Get known ellipsoid by registered ID. More... | |
static EllipsoidID | GetEllipsoidIDFromString (const std::string &str) |
Get EllipsoidID from string. More... | |
static const ReferenceEllipsoid & | GetWGS84 () |
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 ![]() | |
CoordinateSystemPtr | fECEF |
Coordinate system to use as ECEF (Earth Centred Earth Fixed) More... | |
double | fEquatorialRadius |
Radius at equator. More... | |
Static Private Attributes | |
static Registry * | gfRegistry = 0 |
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.
Definition at line 39 of file ReferenceEllipsoid.h.
|
private |
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.
ID's of known reference ellipsoid's.
Enumerator | |
---|---|
eWGS84 |
Definition at line 43 of file ReferenceEllipsoid.h.
|
inline |
Construct reference ellipsoid from equatorial radius, eccentricity, and coordinate system.
Construct reference ellipsoid from
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.
|
private |
|
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().
|
inline |
Get eccentricity.
Definition at line 75 of file ReferenceEllipsoid.h.
References fEccentricity2.
Referenced by utl::UTMPoint::GetGeodeticCoordinates(), utl::UTMPoint::SetFromLatitudeLongitude(), and testReferenceEllipsoid::testEllipsoidCreation().
|
inline |
Get the ECEF.
Definition at line 79 of file ReferenceEllipsoid.h.
References fECEF.
Referenced by testAugerCoordinateSystem::checkOnePoint(), utl::AugerCoordinateSystemConstructor< Policy >::Create(), FdLightCollectionEfficiencyKG::SimMockEvent::FillSimEvent(), EventGeneratorOG::EventGenerator::GenerateSphereCentricCore(), GetLocalCS(), RdEVASimPreparator::GetRodrigoCS(), RdPolarizationReconstructor::GetRodrigoCS(), LaserLightSimulatorNA::LaserLightSimulator::Run(), EventGeneratorOG::EventGenerator::Run(), ShowerInventorNS::ShowerInventor::Run(), LocalCoordinateSystemTest::testCreate(), testAugerCoordinateSystem::testCS(), testReferenceEllipsoid::testLatLongConversion(), and testAugerCoordinateSystem::testSiteCS().
|
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).
Definition at line 241 of file ReferenceEllipsoid.cc.
References ERROR, and utl::StringEquivalent().
|
inline |
Get equatorial radius ( )
Definition at line 71 of file ReferenceEllipsoid.h.
References fEquatorialRadius.
Referenced by utl::UTMPoint::GetGeodeticCoordinates(), utl::Intersection(), utl::UTMPoint::SetFromLatitudeLongitude(), testReferenceEllipsoid::testEllipsoidCreation(), testReferenceEllipsoid::testLatLongConversion(), and testUTMPoint::testUTMConversions().
double ReferenceEllipsoid::GetFlattening | ( | ) | const |
Get flattening.
Definition at line 17 of file ReferenceEllipsoid.cc.
References sqrt().
Referenced by testReferenceEllipsoid::testEllipsoidCreation().
double ReferenceEllipsoid::GetPolarRadius | ( | ) | const |
Get Polar radius ( )
Definition at line 26 of file ReferenceEllipsoid.cc.
Referenced by utl::Intersection(), testReferenceEllipsoid::testEllipsoidCreation(), and testReferenceEllipsoid::testLatLongConversion().
|
private |
Definition at line 34 of file ReferenceEllipsoid.cc.
References RdGeoCeLDFFitter::a, and sqrt().
|
inlinestatic |
Get the auger standard ellipsoid: wgs84.
Definition at line 114 of file ReferenceEllipsoid.h.
Referenced by MultipleScatterer::AddPhotons(), FdProfileReconstructorKG::CherenkovFluorescenceMatrix::CalculateFluorescenceMatrix(), otoa::RdFiller::FillRadioShower(), HybridGeometryFinderWG::HybridGeometryFinder::FitAxis(), HybridGeometryFinderWG::HybridGeometryFinder::GetDataFromPreviousFit(), fdet::FTimeFitModel::GetTimeAtAperture(), FdProfileReconstructorKG::CherenkovFluorescenceMatrix::GillerFraction(), FdProfileReconstructorKG::CherenkovFluorescenceMatrix::GoraFraction(), HybridGeometryFinderWG::HybridGeometryFinder::MinuitFitFuncAxis(), HybridGeometryFinderWG::AxisParameterCalculator::operator()(), FdProfileReconstructorKG::CherenkovFluorescenceMatrix::PekalaFraction(), io::ZHAireSFile::Read(), HybridGeometryFinderWG::HybridGeometryFinder::RecalculateChiSquare(), PlotGOESNS::PlotGOES::Run(), and testReferenceEllipsoid::testEllipsoidComparison().
|
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.
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.
|
inline |
|
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().
|
staticprivate |
Definition at line 254 of file ReferenceEllipsoid.cc.
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:
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().
|
private |
first eccentricity squared
Definition at line 136 of file ReferenceEllipsoid.h.
Referenced by GetEccentricity2(), and operator==().
|
private |
Coordinate system to use as ECEF (Earth Centred Earth Fixed)
Definition at line 138 of file ReferenceEllipsoid.h.
Referenced by GetECEF(), and operator==().
|
private |
Radius at equator.
Definition at line 134 of file ReferenceEllipsoid.h.
Referenced by GetEquatorialRadius(), and operator==().
|
staticprivate |
Definition at line 141 of file ReferenceEllipsoid.h.