List of all members | Static Public Member Functions
utl::AnalyticCoordinateTransformator Class Reference

Utility class to do analytic coordinate transformation (especially error propagation) from spherical (radius, zenith, azimuth) to cartesian coordinates (x,y,z) and the other wayaround. More...

#include <AnalyticCoordinateTransformator.h>

Static Public Member Functions

static double GetAzimuthFromCartesianCoordinates (const double x, const double y)
 calculates the azimuth angle (spherical coordinates) from a cartesian representation (x,y,z), range = [0,2pi) More...
 
static double GetCartesianCovarianceFromSpherical (const unsigned int i, const unsigned int j, const double r, const double theta, const double phi, const double e00, const double e11, const double e22, const double e01, const double e02, const double e12)
 transforms the covariance matrix from spherical coordinates to cartesian coordinates (this conversion will get wrong results for zenith=0 because of the singularity of spherical coordinates there. If zenith > 6e-3deg everything works fine to a precision of 1e-10) (index is (x,y,z)) More...
 
static double GetRadiusFromCartesianCoordinates (const double x, const double y, const double z)
 calculates the radius (spherical coordinates) from a cartesian representation (x,y,z) More...
 
static double GetSphericalCovarianceFromCartesian (const unsigned int i, const unsigned int j, double x2, double y2, const double z2, const double e00, const double e11, const double e22, const double e01, const double e02, const double e12)
 transforms the covariance matrix from cartesian coordinates to spherical coordinates (index is (radius, zenith, azimuth)) More...
 
static double GetXFromSphericalCoordinates (const double r, const double zenith, const double azimuth)
 calculates the x coordinate (cartesian coordinates) from spherical coordinates (r,zenith,azimuth) More...
 
static double GetYFromSphericalCoordinates (const double r, const double zenith, const double azimuth)
 calculates the y coordinate (cartesian coordinates) from spherical coordinates (r,zenith,azimuth) More...
 
static double GetZenithFromCartesianCoordinates (const double x, const double y, const double z)
 calculates the zenith angle (spherical coordinates) from a cartesian representation (x,y,z) More...
 
static double GetZFromSphericalCoordinates (const double r, const double zenith)
 calculates the z coordinate (cartesian coordinates) from spherical coordinates (r,zenith,azimuth) More...
 

Detailed Description

Utility class to do analytic coordinate transformation (especially error propagation) from spherical (radius, zenith, azimuth) to cartesian coordinates (x,y,z) and the other wayaround.

Author
Christian Glaser

Definition at line 25 of file AnalyticCoordinateTransformator.h.

Member Function Documentation

double AnalyticCoordinateTransformator::GetAzimuthFromCartesianCoordinates ( const double  x,
const double  y 
)
static

calculates the azimuth angle (spherical coordinates) from a cartesian representation (x,y,z), range = [0,2pi)

Definition at line 129 of file AnalyticCoordinateTransformator.cc.

double AnalyticCoordinateTransformator::GetCartesianCovarianceFromSpherical ( const unsigned int  i,
const unsigned int  j,
const double  r,
const double  theta,
const double  phi,
const double  e00,
const double  e11,
const double  e22,
const double  e01,
const double  e02,
const double  e12 
)
static

transforms the covariance matrix from spherical coordinates to cartesian coordinates (this conversion will get wrong results for zenith=0 because of the singularity of spherical coordinates there. If zenith > 6e-3deg everything works fine to a precision of 1e-10) (index is (x,y,z))

these formulares are calculated via MAPLE and converted to an optimized C-code. (If you doubt the formulares please have a look at the unit test

Definition at line 10 of file AnalyticCoordinateTransformator.cc.

double AnalyticCoordinateTransformator::GetRadiusFromCartesianCoordinates ( const double  x,
const double  y,
const double  z 
)
static

calculates the radius (spherical coordinates) from a cartesian representation (x,y,z)

Definition at line 122 of file AnalyticCoordinateTransformator.cc.

References std::pow(), and sqrt().

double AnalyticCoordinateTransformator::GetSphericalCovarianceFromCartesian ( const unsigned int  i,
const unsigned int  j,
double  x2,
double  y2,
const double  z2,
const double  e00,
const double  e11,
const double  e22,
const double  e01,
const double  e02,
const double  e12 
)
static

transforms the covariance matrix from cartesian coordinates to spherical coordinates (index is (radius, zenith, azimuth))

these formulares are calculated via MAPLE and converted to an optimized C-code. (If you doubt the formulares please have a look at the unit test

Definition at line 72 of file AnalyticCoordinateTransformator.cc.

References sqrt().

double AnalyticCoordinateTransformator::GetXFromSphericalCoordinates ( const double  r,
const double  zenith,
const double  azimuth 
)
static

calculates the x coordinate (cartesian coordinates) from spherical coordinates (r,zenith,azimuth)

Definition at line 147 of file AnalyticCoordinateTransformator.cc.

double AnalyticCoordinateTransformator::GetYFromSphericalCoordinates ( const double  r,
const double  zenith,
const double  azimuth 
)
static

calculates the y coordinate (cartesian coordinates) from spherical coordinates (r,zenith,azimuth)

Definition at line 154 of file AnalyticCoordinateTransformator.cc.

double AnalyticCoordinateTransformator::GetZenithFromCartesianCoordinates ( const double  x,
const double  y,
const double  z 
)
static

calculates the zenith angle (spherical coordinates) from a cartesian representation (x,y,z)

Definition at line 140 of file AnalyticCoordinateTransformator.cc.

double AnalyticCoordinateTransformator::GetZFromSphericalCoordinates ( const double  r,
const double  zenith 
)
static

calculates the z coordinate (cartesian coordinates) from spherical coordinates (r,zenith,azimuth)

Definition at line 161 of file AnalyticCoordinateTransformator.cc.


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

, generated on Tue Sep 26 2023.